fix(admin): restore suite after colorpicker and codeeditor registration

- Expect colorpicker/codeeditor as registered controls; use notatype for unsupported cases
- Seed DatePicker placeholder from the model value so the calendar opens on that month
- Make CodeEditor chunk-failure mock reject the dynamic import

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-13 13:53:44 +01:00
parent 5f62cd6b92
commit e81cfde7b2
6 changed files with 32 additions and 16 deletions

View File

@@ -442,12 +442,12 @@ describe('CodeEditorField chunk failure', () => {
it('shows the load_failed note and a monospace textarea that still emits', async () => {
vi.resetModules()
vi.unmock('../../src/components/form/codeeditor/editor')
vi.doMock('../../src/components/form/codeeditor/editor', () => ({
createCodeEditor: () => {
throw new Error('chunk failed')
},
}))
vi.doUnmock('../../src/components/form/codeeditor/editor')
// Reject the dynamic import itself so a prior suite that already
// evaluated the real editor chunk cannot keep createCodeEditor working.
vi.doMock('../../src/components/form/codeeditor/editor', () => {
throw new Error('chunk failed')
})
;(await import('../../src/app/i18n')).setBundle({ ...mailPreviewBundle, ...codeeditorBundle }, 'en')
const Field = (await import('../../src/components/form/fields/CodeEditorField.vue')).default
const wrapper = mount(Field, {