You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dianshang-qianduan/tests/after-sales-classification-...

20 lines
1.2 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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/product/after-sales-service.vue"), "utf8");
test("实训任务14待分类区使用紧凑的横向故障卡", () => {
assert.match(source, /\.classification-workspace\s*\{[^}]*grid-template-columns:\s*minmax\(0,\s*1fr\)\s+minmax\(260px,\s*\.45fr\);[^}]*gap:\s*16px;/);
assert.match(source, /\.unassigned-list\s*\{[^}]*gap:\s*8px;[^}]*max-height:\s*560px;[^}]*overflow-y:\s*auto;/);
assert.match(source, /\.fault-card\s*\{[^}]*grid-template-columns:\s*18px\s+minmax\(0,\s*1fr\);[^}]*align-items:\s*start;[^}]*gap:\s*8px;[^}]*padding:\s*9px\s+10px;/);
});
test("实训任务14分类标签保持完整,故障文字具有清晰对比度", () => {
assert.match(source, /\.fault-card p\s*\{[^}]*grid-column:\s*2;[^}]*color:\s*#e8f7ff;/);
assert.match(source, /\.fault-select-label\s*\{[^}]*grid-column:\s*2;[^}]*justify-content:\s*flex-start;/);
assert.match(source, /\.fault-select-label span\s*\{\s*white-space:\s*nowrap;/);
assert.match(source, /\.unassigned-panel\s*>\s*p\s*\{[^}]*color:\s*#c3e0ec;/);
});