feat(chart): add presentation mode
Some checks failed
Package component / package (push) Failing after 50s

This commit is contained in:
李启源
2026-07-29 12:12:03 +08:00
parent 312e7fde52
commit f97ff24cdf
22 changed files with 478 additions and 26 deletions

View File

@@ -92,19 +92,22 @@ describe('App workspace layout', { timeout: 20_000 }, () => {
wrapper.unmount()
})
it('passes clean view and zero-line controls to the chart', async () => {
it('passes clean view, presentation mode, and zero-line controls to the chart', async () => {
const wrapper = mount(App)
await flushPromises()
const chart = wrapper.getComponent(WaveformChart)
expect(chart.props('cleanView')).toBe(false)
expect(chart.props('presentationMode')).toBe(false)
expect(chart.props('zeroLine')).toMatchObject({ visible: false, color: '#98a2b3', width: 1 })
await wrapper.get('[aria-label="净图模式"]').trigger('click')
await wrapper.get('[aria-label="展示模式"]').trigger('click')
await wrapper.get('[aria-label="显示零值参考线"]').trigger('click')
await flushPromises()
expect(chart.props('cleanView')).toBe(true)
expect(chart.props('presentationMode')).toBe(true)
expect(chart.props('zeroLine')).toMatchObject({ visible: true, color: '#98a2b3', width: 1 })
wrapper.unmount()
})