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', () => {