mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-04 08:15:41 +00:00
Merge branch 'main' into feat/assistant-everywhere
This commit is contained in:
@@ -444,7 +444,10 @@ describe('confirm before sending (MO-16)', () => {
|
||||
fireEvent.keyDown(screen.getByTestId('composer-subject'), { key: 'Enter', ctrlKey: true });
|
||||
|
||||
const dialog = await screen.findByRole('alertdialog');
|
||||
fireEvent.keyDown(dialog, { key: 'Escape' });
|
||||
// The dialog takes the focus in the same effect that starts listening
|
||||
// for Escape, which can run after the dialog is already in the DOM.
|
||||
await waitFor(() => expect(dialog).toContainElement(document.activeElement as HTMLElement));
|
||||
fireEvent.keyDown(document.activeElement!, { key: 'Escape' });
|
||||
await waitFor(() => expect(screen.queryByRole('alertdialog')).toBeNull());
|
||||
await act(async () => {});
|
||||
expect(onSend).not.toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user