65 - Fix auth e2e to assert real empty state, not unseeded scenario

This commit is contained in:
myrmidex 2026-07-06 21:15:38 +02:00
parent bfaf5c49ed
commit 030a49da01

View file

@ -26,9 +26,10 @@ test('register, log in, then log out', async ({ page }) => {
await page.getByLabel(/password/i).fill(password) await page.getByLabel(/password/i).fill(password)
await page.getByRole('button', { name: /log in/i }).click() await page.getByRole('button', { name: /log in/i }).click()
// Lands on the authenticated app (the scenarios placeholder + the logout // Lands on the authenticated app: the scenarios list. A brand-new account
// control in the authed layout). // owns nothing, so this is the empty state — not seed data (the stack ships
await expect(page.getByText(/emergency fund/i)).toBeVisible() // no fixtures, so a fresh user genuinely has zero scenarios).
await expect(page.getByText(/you don.t have any scenarios yet/i)).toBeVisible()
await expect(page.getByRole('button', { name: /log out/i })).toBeVisible() await expect(page.getByRole('button', { name: /log out/i })).toBeVisible()
// --- Log out ------------------------------------------------------------ // --- Log out ------------------------------------------------------------
@ -36,5 +37,5 @@ test('register, log in, then log out', async ({ page }) => {
// Back to the login screen; the authed content is gone. // Back to the login screen; the authed content is gone.
await expect(page).toHaveURL(/\/login$/) await expect(page).toHaveURL(/\/login$/)
await expect(page.getByText(/emergency fund/i)).toHaveCount(0) await expect(page.getByText(/you don.t have any scenarios yet/i)).toHaveCount(0)
}) })