fix(e2e): correct Better Auth mock route patterns
- Changed sign-up route from /auth/register to /auth/sign-up/email - Changed session route from /auth/session to /auth/get-session Better Auth hits /auth/sign-up/email for registration and /auth/get-session for session checks. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Barcode Betty
parent
00f3c86276
commit
c47252a342
+2
-2
@@ -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\/register/, async (route) => {
|
||||
page.route(/\/auth\/sign-up\/email/, async (route) => {
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: "application/json",
|
||||
@@ -67,7 +67,7 @@ function mockAuthRoutes(page: Page, authenticated = false) {
|
||||
});
|
||||
});
|
||||
|
||||
page.route(/\/auth\/session/, async (route) => {
|
||||
page.route(/\/auth\/get-session/, async (route) => {
|
||||
if (authenticated) {
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
|
||||
Reference in New Issue
Block a user