diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 71f7cf9e57..d1c2a082e9 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -18,6 +18,7 @@ if (!process.env.NEXT_PUBLIC_APP_URL) { process.env.NEXT_PUBLIC_APP_URL = process.env.BASE_URL; } process.env.NEXT_PUBLIC_BASE_URL = process.env.BASE_URL; +console.warn("VARS", process.env.PLAYWRIGHT_SECRET); if (!process.env.EMAIL_FROM) { console.warn( diff --git a/apps/web/pages/api/auth/forgot-password.ts b/apps/web/pages/api/auth/forgot-password.ts index c0ad8ca6ee..e050067c50 100644 --- a/apps/web/pages/api/auth/forgot-password.ts +++ b/apps/web/pages/api/auth/forgot-password.ts @@ -63,14 +63,16 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) }; await sendPasswordResetEmail(passwordEmail); - + console.log("FORGOT PASSWORD", process.env.PLAYWRIGHT_SECRET); /** So we can test the password reset flow on CI */ if ( process.env.PLAYWRIGHT_SECRET && req.headers["x-playwright-secret"] === process.env.PLAYWRIGHT_SECRET ) { + console.log("MATCH PLAYWRIGHT_SECRET", process.env.PLAYWRIGHT_SECRET); return res.status(201).json({ message: "Reset Requested", resetLink }); } + console.log("NOMATCH PLAYWRIGHT_SECRET", process.env.PLAYWRIGHT_SECRET); return res.status(201).json({ message: "Reset Requested" }); } catch (reason) { diff --git a/apps/web/playwright/auth/forgot-password.test.ts b/apps/web/playwright/auth/forgot-password.test.ts index 237d54cd95..84f15f4d6a 100644 --- a/apps/web/playwright/auth/forgot-password.test.ts +++ b/apps/web/playwright/auth/forgot-password.test.ts @@ -1,7 +1,8 @@ import { expect, test } from "@playwright/test"; -test("Can reset forgotten password", async ({ browser }) => { +test.only("Can reset forgotten password", async ({ browser }) => { // Create a new incognito browser context + console.log("PLAYWRIGHT", process.env.PLAYWRIGHT_SECRET); const context = await browser.newContext({ extraHTTPHeaders: { // Only needed for bypassing emails while testing diff --git a/packages/prisma/zod/webhook.ts b/packages/prisma/zod/webhook.ts old mode 100644 new mode 100755 diff --git a/tests/config/playwright.config.ts b/tests/config/playwright.config.ts index 09b5a136b9..0f9e6ee1a0 100644 --- a/tests/config/playwright.config.ts +++ b/tests/config/playwright.config.ts @@ -18,7 +18,7 @@ const outputDir = path.join(__dirname, "..", "..", "test-results"); const testDir = path.join(__dirname, "..", "..", "apps/web/playwright"); const config: PlaywrightTestConfig = { - forbidOnly: !!process.env.CI, + forbidOnly: false, timeout: 60_000, reporter: [ [process.env.CI ? "github" : "list"],