From a2fefb5a07b7f9159c782689fcdb9d75aa3ae1a0 Mon Sep 17 00:00:00 2001 From: fuomag9 <1580624+fuomag9@users.noreply.github.com> Date: Mon, 23 Mar 2026 09:35:48 +0100 Subject: [PATCH] fix: use .last() for empty state check in L4 hosts E2E test DataTable renders mobile (block md:hidden) and desktop (hidden md:block) variants. .first() resolved to the hidden mobile element at desktop viewport. Co-Authored-By: Claude Opus 4.6 --- tests/e2e/l4-proxy-hosts.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/l4-proxy-hosts.spec.ts b/tests/e2e/l4-proxy-hosts.spec.ts index b83ca6fb..9f798ae5 100644 --- a/tests/e2e/l4-proxy-hosts.spec.ts +++ b/tests/e2e/l4-proxy-hosts.spec.ts @@ -16,7 +16,7 @@ test.describe('L4 Proxy Hosts page', () => { test('shows empty state when search has no results', async ({ page }) => { await page.goto('/l4-proxy-hosts'); await page.getByPlaceholder(/search/i).fill('zzz-nonexistent-host-zzz'); - await expect(page.getByText(/no l4 hosts match/i).first()).toBeVisible({ timeout: 5_000 }); + await expect(page.getByText(/no l4 hosts match/i).last()).toBeVisible({ timeout: 5_000 }); }); test('create dialog opens and contains expected fields', async ({ page }) => {