From cf5470229d66a0f283d15bfcca8298f5d6a96fe4 Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 23 Nov 2026 09:08:52 +0100 Subject: [PATCH] test(editor): cover the fixed category label of an existing access --- apps/app/tests/unit/editor-access-category.test.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/app/tests/unit/editor-access-category.test.tsx b/apps/app/tests/unit/editor-access-category.test.tsx index 7b912061..70c71c72 100644 --- a/apps/app/tests/unit/editor-access-category.test.tsx +++ b/apps/app/tests/unit/editor-access-category.test.tsx @@ -259,6 +259,17 @@ describe('no ordinary category', () => { }) }) +describe('an existing access stored in it', () => { + it('shows the fixed label and no category select', async () => { + await mount(accessSheet()) + const { opened } = await openEdit('acc') + expect( + within(opened).queryByRole('combobox', { name: 'Catégorie' }), + ).toBeNull() + expect(within(opened).getByText(ACCESS_FR)).toBeInTheDocument() + }) +}) + describe('the head access', () => { it('keeps the category select with the ordinary categories (D22)', async () => { const text = insert(withDetail(drawnText()), {