style: compact new product survey options
parent
1c37b6f055
commit
01ca54cda2
@ -0,0 +1,15 @@
|
||||
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, /<section v-show="currentStep === 2" class="step-content active-step">[\s\S]*?<div class="step-card step-two-survey">/);
|
||||
const stepOne = source.match(/<section v-show="currentStep === 1" class="step-content active-step">([\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/);
|
||||
});
|
||||
Loading…
Reference in New Issue