From 757dbdc1e556ac27024a63c8bab7136e54a49a70 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 4 Nov 2026 11:29:54 +0100 Subject: [PATCH] =?UTF-8?q?test:=20open=20calendar=20delete=20and=20clear?= =?UTF-8?q?=20from=20the=20row's=20=E2=8B=AE=20in=20the=20settings=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The settings pass tested the hover icons for delete, clear and edit; pim-20 replaced them with one Edit… button and a ⋮ menu, so the tests now go through those. --- .../settings/__tests__/settings-delete-confirm.test.tsx | 7 +++++-- .../settings/__tests__/settings-row-actions-touch.test.tsx | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/components/settings/__tests__/settings-delete-confirm.test.tsx b/components/settings/__tests__/settings-delete-confirm.test.tsx index 5ef846700..5d827cabe 100644 --- a/components/settings/__tests__/settings-delete-confirm.test.tsx +++ b/components/settings/__tests__/settings-delete-confirm.test.tsx @@ -92,7 +92,9 @@ describe('deleting a calendar and clearing its events', () => { it('confirms a delete in a dialog, not an inline strip', async () => { render(); - fireEvent.click(screen.getByTitle('delete')); + // Delete and clear live in the row's ⋮ since pim-20. + fireEvent.click(screen.getByRole('button', { name: 'row_actions' })); + fireEvent.click(screen.getByRole('menuitem', { name: 'delete_calendar' })); expect(confirmDialog().getByText('delete_title')).toBeTruthy(); fireEvent.click(confirmDialog().getByRole('button', { name: 'delete' })); await waitFor(() => expect(removeCalendar).toHaveBeenCalledWith(expect.anything(), 'work')); @@ -100,7 +102,8 @@ describe('deleting a calendar and clearing its events', () => { it('confirms clearing the events in a dialog', async () => { render(); - fireEvent.click(screen.getByTitle('clear_events')); + fireEvent.click(screen.getByRole('button', { name: 'row_actions' })); + fireEvent.click(screen.getByRole('menuitem', { name: 'clear_all_events' })); expect(confirmDialog().getByText('clear_title')).toBeTruthy(); fireEvent.click(confirmDialog().getByRole('button', { name: 'clear_events' })); await waitFor(() => expect(clearCalendarEvents).toHaveBeenCalledWith(expect.anything(), 'work')); diff --git a/components/settings/__tests__/settings-row-actions-touch.test.tsx b/components/settings/__tests__/settings-row-actions-touch.test.tsx index 351532931..4cae43cc3 100644 --- a/components/settings/__tests__/settings-row-actions-touch.test.tsx +++ b/components/settings/__tests__/settings-row-actions-touch.test.tsx @@ -50,7 +50,12 @@ describe('settings row actions on touch and keyboard', () => { icalSubscriptions: [], } as never); render(); - expectReachable(screen.getByTitle('edit')); + // No hover icons since pim-20: Edit… and the ⋮ are always shown. + for (const name of ['edit_calendar', 'row_actions']) { + const button = screen.getByRole('button', { name }); + expect(button.className).not.toContain('opacity-0'); + expect((button.parentElement as HTMLElement).className).not.toContain('opacity-0'); + } }); it('address books', () => {