test(routes): drop 2 setTimeout sleeps in AppNav (auto-wait via expect.element)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -133,7 +133,6 @@ describe('AppNav', () => {
|
|||||||
expect(backdrop).not.toBeNull();
|
expect(backdrop).not.toBeNull();
|
||||||
backdrop.click();
|
backdrop.click();
|
||||||
|
|
||||||
await new Promise((r) => setTimeout(r, 30));
|
|
||||||
await expect
|
await expect
|
||||||
.element(browserPage.getByRole('button', { name: /menü öffnen/i }))
|
.element(browserPage.getByRole('button', { name: /menü öffnen/i }))
|
||||||
.toHaveAttribute('aria-expanded', 'false');
|
.toHaveAttribute('aria-expanded', 'false');
|
||||||
@@ -149,7 +148,6 @@ describe('AppNav', () => {
|
|||||||
const overlay = document.querySelector('.fixed.inset-0') as HTMLElement;
|
const overlay = document.querySelector('.fixed.inset-0') as HTMLElement;
|
||||||
overlay.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
overlay.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
||||||
|
|
||||||
await new Promise((r) => setTimeout(r, 30));
|
|
||||||
await expect
|
await expect
|
||||||
.element(browserPage.getByRole('button', { name: /menü öffnen/i }))
|
.element(browserPage.getByRole('button', { name: /menü öffnen/i }))
|
||||||
.toHaveAttribute('aria-expanded', 'false');
|
.toHaveAttribute('aria-expanded', 'false');
|
||||||
|
|||||||
Reference in New Issue
Block a user