test: cover opening the shared inbox from a grouped notification #1499

This commit is contained in:
Linus Rath
2026-11-02 20:15:33 +01:00
parent 62906e45dc
commit 0c421f5557
@@ -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, '', '/');
}
});
});