fix(e2e): use more permissive regex patterns for route mocking

Use wildcard patterns to match URLs with query parameters or trailing slashes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Barcode Betty
2026-04-15 11:00:56 +00:00
committed by Barcode Betty
parent c47252a342
commit 5e5f13c5b5
+3 -3
View File
@@ -15,7 +15,7 @@ const MOCK_USER_ID = "mock_user_123";
const MOCK_SESSION_ID = "mock_session_456";
function mockAuthRoutes(page: Page, authenticated = false) {
page.route(/\/auth\/sign-up\/email/, async (route) => {
page.route(/.*\/auth\/sign-up\/email.*/, async (route) => {
await route.fulfill({
status: 200,
contentType: "application/json",
@@ -41,7 +41,7 @@ function mockAuthRoutes(page: Page, authenticated = false) {
});
});
page.route(/\/auth\/sign-in\/email/, async (route) => {
page.route(/.*\/auth\/sign-in\/email.*/, async (route) => {
await route.fulfill({
status: 200,
contentType: "application/json",
@@ -67,7 +67,7 @@ function mockAuthRoutes(page: Page, authenticated = false) {
});
});
page.route(/\/auth\/get-session/, async (route) => {
page.route(/.*\/auth\/get-session.*/, async (route) => {
if (authenticated) {
await route.fulfill({
status: 200,