import assert from 'node:assert/strict'
|
import { readFile } from 'node:fs/promises'
|
|
const view = await readFile(new URL('../src/views/TestConsole.vue', import.meta.url), 'utf8')
|
const dataList = await readFile(new URL('../src/components/ConsoleDataListPanel.vue', import.meta.url), 'utf8')
|
|
assert.match(view, /<strong>项目参数<\/strong><span>STEP PARAMETERS<\/span>/)
|
assert.match(view, /testPlan\?\.rows/)
|
assert.match(view, /row\.rowType === 'CYCLE'/)
|
assert.match(view, /当前循环/)
|
assert.doesNotMatch(view, /<strong>工步数据<\/strong><span>STEP SUMMARY<\/span>/)
|
assert.doesNotMatch(view, /visibleStepRows/)
|
assert.match(view, /:logic-step-mappings="backendDetail\.logicStepMappings"/)
|
assert.match(dataList, /mappingFor\(stepNo: number\)/)
|
assert.match(dataList, /逻辑工步/)
|
assert.match(dataList, /起始电压\(V\)/)
|
assert.match(dataList, /放电谷值\(V\)/)
|
|
console.log('Ticket23 实时工步方案与数据列表工步映射回归契约通过')
|