const assert = require("node:assert/strict"); const fs = require("node:fs"); const path = require("node:path"); const test = require("node:test"); const source = fs.readFileSync(path.join(__dirname, "../src/views/foundation/new-product-survey.vue"), "utf8"); test("实训一第二步标题与短选项采用紧凑双列布局", () => { assert.match(source, /
[\s\S]*?
/); const stepOne = source.match(/
([\s\S]*?)<\/section>/)?.[1] || ""; assert.doesNotMatch(stepOne, /step-two-survey/); assert.match(source, /\.step-two-survey\s*\{[\s\S]*?\.step-title-row\s*\{[\s\S]*?h3\s*\{[\s\S]*?font-size:\s*19px/); assert.match(source, /\.step-two-survey\s*\{[\s\S]*?\.survey-options\s*\{[\s\S]*?grid-template-columns:\s*repeat\(2, minmax\(0, 1fr\)\)/); assert.match(source, /@media \(max-width: 720px\)\s*\{[\s\S]*?\.step-two-survey\s*\{[\s\S]*?\.survey-options\s*\{[\s\S]*?grid-template-columns:\s*1fr/); });