Skip to content

Commit e800ed2

Browse files
committed
fix: use regex pattern for URL assertion after logout
toHaveURL('/') matches the complete URL string, not the path. Use /\/$/ regex to match URLs ending with '/' so the assertion works with full URLs like http://localhost:4173/
1 parent 46df168 commit e800ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/e2e/auth/login.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ test.describe('Logout', () => {
149149
await mapPage.logout();
150150

151151
// Should be back on login page
152-
await expect(page).toHaveURL('/');
152+
await expect(page).toHaveURL(/\/$/);
153153
await expect(loginPage.loginButton).toBeVisible();
154154
});
155155

0 commit comments

Comments
 (0)