From aba512800e9da9296af2ad045253c8ff6eacd225 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Fri, 13 Nov 2026 13:35:48 +0100 Subject: [PATCH] test(35-03): add failing test for customized and outdated row badges Co-authored-by: Cursor --- admin/tests/form/mail-smoke.test.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/admin/tests/form/mail-smoke.test.ts b/admin/tests/form/mail-smoke.test.ts index f6c7199d..2ae0a26c 100644 --- a/admin/tests/form/mail-smoke.test.ts +++ b/admin/tests/form/mail-smoke.test.ts @@ -466,3 +466,27 @@ describe('CodeEditorField chunk failure', () => { expect(wrapper.emitted('update:modelValue')).toEqual([['

Edited

']]) }) }) + +describe('RowStateBadges mail states', () => { + it('renders customized then outdated after the existing three', async () => { + const Badges = (await import('../../src/components/list/RowStateBadges.vue')).default + const wrapper = mount(Badges, { + props: { + states: ['outdated', 'customized', 'disabled', 'deleted'], + labels: { + deleted: 'Deleted', + negative: 'Negative', + disabled: 'Disabled', + customized: 'Customized', + outdated: 'File changed', + }, + }, + }) + expect(wrapper.findAll('[data-row-state]').map((node) => node.attributes('data-row-state'))).toEqual([ + 'deleted', + 'disabled', + 'customized', + 'outdated', + ]) + }) +})