Fix Cypress Cloud Recording Configuration#672
Fix Cypress Cloud Recording Configuration#672vedantvakharia wants to merge 1 commit intoopenclimatefix:mainfrom
Conversation
Adds explicit placeholder configuration to cypress.config.ts that makes it clear when CYPRESS_PROJECT_ID environment variable is missing. This change: - Adds fallback placeholder value with clear TODO comment - Documents that maintainers need to add GitHub Secrets - Makes missing configuration obvious without breaking tests Maintainers need to add these GitHub Secrets to complete the fix: - CYPRESS_PROJECT_ID (from Cypress Dashboard) - CYPRESS_RECORD_KEY (from Cypress Dashboard) This enables Cypress Cloud recording in CI (currently failing).
|
@vedantvakharia is attempting to deploy a commit to the Open Climate Fix Team on Vercel. A member of the Team first needs to authorize it. |
CI Update: Additional Missing Secret DiscoveredHi maintainers! While testing this PR, I discovered there's another missing GitHub Secret that's preventing the Cypress tests from running. This is separate from the Cypress Cloud issue addressed in this PR. The IssueThe Cypress tests are failing with: This causes the Next.js server to crash with a 500 error when trying to load Root CauseThe AUTH0_SECRET: ${{ secrets.AUTH0_SECRET }}However, this secret hasn't been added to the repository's GitHub Secrets yet. What's NeededTo fix the CI tests completely, you'll need to add one more secret: Secret Name:
Summary of All Missing SecretsFor the CI to pass, these three secrets need to be added:
My RecommendationSince this is a separate issue from the Cypress Cloud configuration, you could:
Either way works! Happy to help if you need any clarification. Note: This Auth0 issue was already present in the repository - my PR just helped surface it while testing the Cypress fix. |
Problem
Hi maintainers! I noticed Cypress tests in CI are failing. Would you like to enable Cypress Cloud recording, or should I disable it instead?
Cypress tests in CI are failing with the following error:
Root Cause:
record: trueenabled (line 48 of .github/workflows/yarn_test.yaml)secrets.CYPRESS_PROJECT_IDandsecrets.CYPRESS_RECORD_KEYOption A: Enable Cypress Cloud (if you'd like)
Changes made to implement this fix
projectIdwith clear TODO commentIf you'd like to enable Cypress Cloud recording, I'd need some help getting the credentials. Here's what would be needed:
1. Getting Cypress Cloud Credentials
If you have access to the Cypress Dashboard:
abc123)2. Adding GitHub Secrets
If you could add these two secrets to the repository at:
https://github.com/openclimatefix/quartz-frontend/settings/secrets/actionsCYPRESS_PROJECT_IDabc123(example)CYPRESS_RECORD_KEYa1b2c3d4-e5f6-...(example)Once these are added, the CI should automatically pick them up and recording will work!
Testing
Before Secrets are Added
The configuration will use the placeholder value. Tests will run but may show warnings.
After Secrets are Added
Local Testing
Option B: Disable Recording
If you prefer not to use Cypress Cloud recording, you can instead:
record: falsein .github/workflows/yarn_test.yaml (line 48)CYPRESS_RECORD_KEYandCYPRESS_PROJECT_IDfrom env block (lines 61-62)Tests will still run locally and in CI, just not recorded to Cypress Cloud.
Let me know which approach you prefer!
Checklist
CYPRESS_PROJECT_IDto GitHub SecretsCYPRESS_RECORD_KEYto GitHub SecretsBenefits
Questions? Happy to help with either approach or discuss further! Let me know what works best for your team.