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:
Marcel
2026-05-11 17:36:41 +02:00
committed by marcel
parent 1035527278
commit dccd000d66

View File

@@ -133,7 +133,6 @@ describe('AppNav', () => {
expect(backdrop).not.toBeNull();
backdrop.click();
await new Promise((r) => setTimeout(r, 30));
await expect
.element(browserPage.getByRole('button', { name: /menü öffnen/i }))
.toHaveAttribute('aria-expanded', 'false');
@@ -149,7 +148,6 @@ describe('AppNav', () => {
const overlay = document.querySelector('.fixed.inset-0') as HTMLElement;
overlay.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
await new Promise((r) => setTimeout(r, 30));
await expect
.element(browserPage.getByRole('button', { name: /menü öffnen/i }))
.toHaveAttribute('aria-expanded', 'false');