feat(chart): add configurable chart presentation
Some checks failed
CI / verify (push) Failing after 1m31s
CI / verify (pull_request) Failing after 31s

This commit is contained in:
李启源
2026-07-20 14:07:43 +08:00
parent f535e9611a
commit dda75b5d13
24 changed files with 2242 additions and 201 deletions

View File

@@ -457,7 +457,7 @@ function handleSeriesChange(event: Event) {
display: flex;
justify-content: flex-end;
gap: 8px;
padding-top: 2px;
padding-top: 8px;
border-top: 1px solid #eaecf0;
}

View File

@@ -1,5 +1,5 @@
import { flushPromises, mount } from '@vue/test-utils'
import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'
import { ColorPicker } from 'vue3-colorpicker'
import WaveformAnnotationContextMenu from './WaveformAnnotationContextMenu.vue'
@@ -77,8 +77,11 @@ 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 },
)
const colorPickers = wrapper.findAllComponents(ColorPicker)
expect(colorPickers).toHaveLength(3)
expect(wrapper.findAll('.waveform-annotation-editor__color-field')).toHaveLength(3)
expect(colorPickers.map((picker) => picker.props('pureColor'))).toEqual([
'#1677ff',
@@ -153,6 +156,10 @@ describe('waveform annotation controls', () => {
},
})
await flushPromises()
await vi.waitFor(
() => expect(wrapper.findAllComponents(ColorPicker)).toHaveLength(3),
{ timeout: 5000 },
)
expect(
wrapper.findAllComponents(ColorPicker).map((picker) => picker.props('pureColor')),