diff --git a/.changeset/grumpy-plants-think.md b/.changeset/grumpy-plants-think.md new file mode 100644 index 00000000000..62feadee749 --- /dev/null +++ b/.changeset/grumpy-plants-think.md @@ -0,0 +1,5 @@ +--- +'@clerk/testing': patch +--- + +Add experimental console warning on Cypress setup function diff --git a/packages/testing/README.md b/packages/testing/README.md index e00e63d2dfe..06d35f24c31 100644 --- a/packages/testing/README.md +++ b/packages/testing/README.md @@ -89,6 +89,8 @@ test("sign up", async ({ page }) => { ### Cypress +⚠️ **Please note:** Support for Cypress is still experimental. Be aware that there are limitations and potential issues at this stage. Please open an issue with a minimal reproduction so that these issues can be fixed. Thanks! + Firstly, add your Clerk keys (`CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY`) to your environment variables file (e.g. `.env.local` or `.env.`). You can find these keys in your Clerk Dashboard. diff --git a/packages/testing/src/cypress/setup.ts b/packages/testing/src/cypress/setup.ts index 0000160e9ac..a9da0ae4cf5 100644 --- a/packages/testing/src/cypress/setup.ts +++ b/packages/testing/src/cypress/setup.ts @@ -23,6 +23,11 @@ type ClerkSetupParams = { * @throws An error if the Cypress config object is not provided. */ export const clerkSetup = async ({ config, options }: ClerkSetupParams) => { + console.log( + '\x1b[33m%s\x1b[0m', + '@clerk/testing: Support for Cypress is experimental and subject to change in the future.', + ); + if (!config) { throw new Error('The Cypress config object is required.'); }