From efe86a074b2baea9a95b548e6b3108f4d44d70f4 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 11 May 2026 17:25:08 +0200 Subject: [PATCH] test(admin): rewrite EntityNav flyout tests with behavioral assertions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the vacuous expect(true).toBe(true) sleep test with a real flyout-open assertion (role=dialog appears after trigger click) and turns the Escape-keydown smoke test into a full open→Escape→closed behavioral test. Routes the Escape event through document (matches the svelte:document binding) instead of window. Co-Authored-By: Claude Opus 4.7 --- .../src/routes/admin/EntityNav.svelte.test.ts | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/frontend/src/routes/admin/EntityNav.svelte.test.ts b/frontend/src/routes/admin/EntityNav.svelte.test.ts index ec94cc41..af809408 100644 --- a/frontend/src/routes/admin/EntityNav.svelte.test.ts +++ b/frontend/src/routes/admin/EntityNav.svelte.test.ts @@ -97,30 +97,37 @@ describe('EntityNav', () => { expect(mintIcons.length).toBeGreaterThan(0); }); - it('opens the flyout on tablet trigger button click', async () => { + it('opens the flyout dialog when a tablet section trigger is clicked', async () => { mockPage.url = new URL('http://localhost/admin/users'); const EntityNav = await loadComponent(); render(EntityNav, { props: baseProps() }); - // The tablet flyout triggers are the section buttons (not links) + // The first