From 22ee356c101cdf9144bb95ff65600704223a4c4c Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Fri, 23 Oct 2026 14:41:48 -0400 Subject: [PATCH] test(e2e): expect the login redirect to carry the requested path --- e2e/routes.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/routes.spec.ts b/e2e/routes.spec.ts index 16d1bbba..4648b426 100644 --- a/e2e/routes.spec.ts +++ b/e2e/routes.spec.ts @@ -65,9 +65,9 @@ test.describe('unauthenticated routes', () => { await expect(page.getByRole('button', { name: 'Sign In', exact: true })).toBeVisible() }) - test('protected route redirects to login', async ({ page }) => { + test('protected route redirects to login with the requested path', async ({ page }) => { await page.goto('/schedules') - await expect(page).toHaveURL(/\/login$/) + await expect(page).toHaveURL(/\/login\?redirect=%2Fschedules$/) await expect(page.getByRole('button', { name: 'Sign In', exact: true })).toBeVisible() }) })