mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
test(e2e): expect the login redirect to carry the requested path
This commit is contained in:
1 parent
19b52ecd58
commit
22ee356c10
1 file changed
+2
-2
+2
-2
@@ -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()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user