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/market-opportunity-step4.st...

24 lines
1.1 KiB
JavaScript

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/market-opportunity-selection.vue"), "utf8");
test("第四步提供可预览的数据可视化结果图上传", () => {
assert.match(source, /accept="image\/png,image\/jpeg,image\/webp"/);
assert.match(source, /<el-image :src="visualization\.url" :preview-src-list="\[visualization\.url\]"/);
assert.match(source, /点击缩略图可放大查看/);
});
test("第四步下载含日综合得分汇总公式的 Excel 自动化模板", () => {
assert.match(source, /function downloadVisualizationTemplate\(\)/);
assert.match(source, /"日综合得分录入"/);
assert.match(source, /AVERAGEIF\(/);
assert.match(source, /MAXIFS\(/);
assert.match(source, /MINIFS\(/);
assert.match(source, /MAXIFS\([\s\S]*?,"<>"/);
assert.match(source, /MINIFS\([\s\S]*?,"<>"/);
assert.match(source, /XLSX\.writeFile\(workbook, "市场机会识别与选品-数据可视化模板\.xlsx"\)/);
});