test(e2e): expect the login redirect to carry the requested path

This commit is contained in:
Chris Scott committed 2026-10-23 14:41:48 -04:00
1 parent 19b52ecd58
commit 22ee356c10
1 file changed
+2 -2
+2 -2
View File
@@ -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()
})
})