yeg
2026-09-08 cfd4511378aefa04d4e06058cee628b6edd8e9c1
tests/test-console-step-chart.contract.test.mjs
@@ -3,16 +3,28 @@
const chart = await readFile(new URL('../src/components/ConsoleChartPanel.vue', import.meta.url), 'utf8')
const consoleView = 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(chart, /PersistedTestRecord/)
assert.match(chart, /metricCode/)
assert.match(chart, /POSITIVE_POTENTIAL/)
assert.match(chart, /NEGATIVE_POTENTIAL/)
assert.match(chart, /selectedRecords\(\)/)
assert.match(chart, /record\.sourceType !== 'SNAPSHOT'/)
assert.doesNotMatch(chart, /全部循环/)
assert.match(chart, /saveTestConsoleDetail/)
assert.match(chart, /保存详情/)
assert.doesNotMatch(chart, /另存特殊字段模板/)
assert.match(chart, /Number\(selectedCycle\.value\)/)
assert.match(chart, /smooth: false/)
assert.match(chart, /暂无当前测试实时数据/)
assert.doesNotMatch(chart, /const stepOptions = \['5-21 恒流充电'/)
assert.doesNotMatch(chart, /function seriesValues\(/)
assert.match(consoleView, /getPersistedTestRecords/)
assert.match(consoleView, /:records="realtimeRecords"/)
assert.match(dataList, /<th>温度\(℃\)<\/th>/)
assert.match(dataList, /<th>正电位\(V\)<\/th>/)
assert.match(dataList, /<th>负电位\(V\)<\/th>/)
assert.match(dataList, /temperature: (?:extension\('TEMPERATURE'\)|snapshot \?)/)
console.log('Ticket02/03 工步图表实时数据契约通过')