mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-05 08:16:22 +00:00
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.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user