Skip to content

Commit 1c7f76b

Browse files
committed
Update a test case
1 parent 52512d4 commit 1c7f76b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

frontend/tests/login.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,9 @@ test("Logged-out user cannot access protected routes", async ({ page }) => {
116116
await page.waitForURL("/login")
117117
})
118118

119-
test("Redirects to /login when token is wrong", async ({ page }) => {
120-
await page.goto("/settings")
121-
await page.evaluate(() => {
122-
localStorage.setItem("access_token", "invalid_token")
123-
})
119+
test("Redirects to /login when authentication is invalid", async ({ page }) => {
120+
await page.context().clearCookies()
121+
124122
await page.goto("/settings")
125123
await page.waitForURL("/login")
126124
await expect(page).toHaveURL("/login")

0 commit comments

Comments
 (0)