feat(chart): add multi-axis overlay controls

This commit is contained in:
李启源
2026-07-20 15:35:19 +08:00
parent 0cab86f7b6
commit c9e4dae25f
44 changed files with 1882 additions and 523 deletions

View File

@@ -77,10 +77,9 @@ describe('waveform annotation controls', () => {
)
expect(wrapper.get('.waveform-annotation-editor__coordinates').text()).toContain('Y2')
expect(wrapper.get('button.is-primary').attributes('disabled')).toBeDefined()
await vi.waitFor(
() => expect(wrapper.findAllComponents(ColorPicker)).toHaveLength(3),
{ timeout: 5000 },
)
await vi.waitFor(() => expect(wrapper.findAllComponents(ColorPicker)).toHaveLength(3), {
timeout: 5000,
})
const colorPickers = wrapper.findAllComponents(ColorPicker)
expect(wrapper.findAll('.waveform-annotation-editor__color-field')).toHaveLength(3)
expect(colorPickers.map((picker) => picker.props('pureColor'))).toEqual([
@@ -156,10 +155,9 @@ describe('waveform annotation controls', () => {
},
})
await flushPromises()
await vi.waitFor(
() => expect(wrapper.findAllComponents(ColorPicker)).toHaveLength(3),
{ timeout: 5000 },
)
await vi.waitFor(() => expect(wrapper.findAllComponents(ColorPicker)).toHaveLength(3), {
timeout: 5000,
})
expect(
wrapper.findAllComponents(ColorPicker).map((picker) => picker.props('pureColor')),