From f2fb56698d05fa0ae81f076cf8959e9374dc9eb6 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 4 Nov 2026 11:52:09 +0100 Subject: [PATCH] test: find the reader's Archive and Delete by their tooltips with the key The toolbar tooltips are now the label plus the menus' key ("archive (E)", "delete (Del)") instead of the old tooltip strings, so the tests look for those. --- components/email/__tests__/archive-gate-viewer.test.tsx | 6 +++--- .../email/__tests__/reader-spam-trash-actions.test.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/email/__tests__/archive-gate-viewer.test.tsx b/components/email/__tests__/archive-gate-viewer.test.tsx index 8fb33636e..9713c8519 100644 --- a/components/email/__tests__/archive-gate-viewer.test.tsx +++ b/components/email/__tests__/archive-gate-viewer.test.tsx @@ -82,13 +82,13 @@ function viewer() { describe('the viewer and the Archive action gate', () => { it('shows the Archive button while the gate is on', () => { viewer(); - expect(screen.getByTitle('tooltips.archive')).toBeInTheDocument(); + expect(screen.getByTitle('archive (E)')).toBeInTheDocument(); }); it('has no Archive button with the gate off, Delete still there', () => { setArchiveGate(false); viewer(); - expect(screen.queryByTitle('tooltips.archive')).toBeNull(); - expect(screen.getByTitle('tooltips.delete')).toBeInTheDocument(); + expect(screen.queryByTitle('archive (E)')).toBeNull(); + expect(screen.getByTitle('delete (Del)')).toBeInTheDocument(); }); }); diff --git a/components/email/__tests__/reader-spam-trash-actions.test.tsx b/components/email/__tests__/reader-spam-trash-actions.test.tsx index 815449deb..29a2670c6 100644 --- a/components/email/__tests__/reader-spam-trash-actions.test.tsx +++ b/components/email/__tests__/reader-spam-trash-actions.test.tsx @@ -56,7 +56,7 @@ async function viewer(folder: string, h = handlers()) { return h; } -const archiveButton = () => document.querySelector('button[title="tooltips.archive"]'); +const archiveButton = () => document.querySelector('button[title="archive (E)"]'); beforeEach(() => { useSettingsStore.setState({ deleteAction: 'trash', permanentlyDeleteJunk: false, quickReplyEnabled: true });