2026-02-07 16:01:13 +00:00
|
|
|
import { defineConfig } from "cypress";
|
2026-02-08 14:52:03 +00:00
|
|
|
import { clerkSetup } from "@clerk/testing/cypress";
|
2026-02-07 16:01:13 +00:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-02-07 19:15:02 +00:00
|
|
|
env: {
|
2026-02-08 21:37:20 +05:30
|
|
|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY:
|
|
|
|
|
process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,
|
2026-02-07 19:15:02 +00:00
|
|
|
// Optional overrides.
|
|
|
|
|
CLERK_ORIGIN: process.env.CYPRESS_CLERK_ORIGIN,
|
|
|
|
|
CLERK_TEST_EMAIL: process.env.CYPRESS_CLERK_TEST_EMAIL,
|
|
|
|
|
CLERK_TEST_OTP: process.env.CYPRESS_CLERK_TEST_OTP,
|
|
|
|
|
},
|
2026-02-07 16:01:13 +00:00
|
|
|
e2e: {
|
2026-02-07 19:02:17 +00:00
|
|
|
baseUrl: "http://localhost:3000",
|
2026-02-07 19:15:02 +00:00
|
|
|
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
|
2026-02-07 16:01:13 +00:00
|
|
|
supportFile: "cypress/support/e2e.ts",
|
2026-02-12 11:08:51 +00:00
|
|
|
// Clerk helpers perform async work inside `cy.then()`. CI can be slow enough
|
|
|
|
|
// that Cypress' 4s default command timeout flakes.
|
|
|
|
|
defaultCommandTimeout: 20_000,
|
|
|
|
|
retries: {
|
|
|
|
|
runMode: 2,
|
|
|
|
|
openMode: 0,
|
|
|
|
|
},
|
2026-02-08 14:52:03 +00:00
|
|
|
setupNodeEvents(on, config) {
|
|
|
|
|
return clerkSetup({ config });
|
|
|
|
|
},
|
2026-02-07 16:01:13 +00:00
|
|
|
},
|
|
|
|
|
});
|