mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-03 08:15:38 +00:00
test: cover opening the shared inbox from a grouped notification #1499
This commit is contained in:
@@ -281,4 +281,16 @@ describe('shared message deep link from the personal Inbox (#1491)', () => {
|
||||
window.history.replaceState(null, '', '/');
|
||||
}
|
||||
});
|
||||
|
||||
it('opens the shared Inbox for a grouped notification of the shared account', async () => {
|
||||
window.history.replaceState(null, '', '/mail/folder/inbox?owner=ce');
|
||||
useEmailStore.setState({ emails: [], selectedEmail: null, selectedMailbox: 'a', selectedKeyword: null } as never);
|
||||
const mounted = render(<MailApp linkSegments={['folder', 'inbox']} />);
|
||||
try {
|
||||
await waitFor(() => expect(useEmailStore.getState().selectedMailbox).toBe('ce:a'));
|
||||
} finally {
|
||||
mounted.unmount();
|
||||
window.history.replaceState(null, '', '/');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user