-
Notifications
You must be signed in to change notification settings - Fork 3.3k
chore: (studio) set up infrastructure for cypress in cypress tests for cloud studio #31621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… for cloud studio
cypress
|
Project |
cypress
|
Branch Review |
ryanm/internal/cy-in-cy-cloud-studio
|
Run status |
|
Run duration | 12m 10s |
Commit |
|
Committer | Ryan Manuel |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
4
|
|
0
|
|
225
|
View all changes introduced in this branch ↗︎ |
UI Coverage
62.5%
|
|
---|---|
|
31
|
|
55
|
Accessibility
96.2%
|
|
---|---|
|
0 critical
4 serious
1 moderate
0 minor
|
|
197
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR sets up the infrastructure to support Cypress in Cypress tests for cloud Studio. Key changes include updating the environment variable logic to prioritize CYPRESS_CONFIG_ENV, adding new Cypress commands and helper functions to simulate studio and cloud interactions, and updating tests and documentation.
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/server/lib/project-base.ts | Updated environment variable logic to prioritize CYPRESS_CONFIG_ENV over CYPRESS_INTERNAL_ENV |
packages/server/lib/cloud/api/studio/get_and_initialize_studio_manager.ts | Updated environment variable logic to prioritize CYPRESS_CONFIG_ENV over CYPRESS_INTERNAL_ENV |
packages/server/lib/StudioLifecycleManager.ts | Updated environment variable logic to prioritize CYPRESS_CONFIG_ENV over CYPRESS_INTERNAL_ENV |
packages/frontend-shared/cypress/support/e2e.ts | Added interfaces and Cypress commands for mocking cloud studio requests and full snapshot behavior |
packages/frontend-shared/cypress/fixtures/dummy-protocol.js | Added a dummy protocol file for inner Cypress tests |
packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts | Extended task setup to support studio mocks and cleared cloud studio-related env variables and mocks |
packages/app/cypress/e2e/studio/studio.cy.ts | Added a new e2e test to validate the cloud studio session with AI enabled |
guides/studio-development.md / guides/README.md | Updated documentation to include studio development and protocol instructions |
Files not reviewed (1)
- packages/frontend-shared/package.json: Language not supported
Comments suppressed due to low confidence (3)
packages/server/lib/project-base.ts:410
- This update prioritizes CYPRESS_CONFIG_ENV over CYPRESS_INTERNAL_ENV for determining the cloud environment. Please ensure that this change is documented in the related configuration guides.
const cloudEnv = (process.env.CYPRESS_CONFIG_ENV || process.env.CYPRESS_INTERNAL_ENV || 'production') as 'development' | 'staging' | 'production'
packages/server/lib/cloud/api/studio/get_and_initialize_studio_manager.ts:128
- The updated environment variable logic here mirrors the change in project-base.ts, ensuring consistent behavior across modules. Verify that any references to the environment configuration in documentation and tests are updated accordingly.
const cloudEnv = (process.env.CYPRESS_CONFIG_ENV || process.env.CYPRESS_INTERNAL_ENV || 'production') as 'development' | 'staging' | 'production'
packages/server/lib/StudioLifecycleManager.ts:55
- The change to use CYPRESS_CONFIG_ENV first in the environment variable check promotes consistency. Ensure that any developer-facing materials reflect this new priority for configuring the cloud environment.
const cloudEnv = (process.env.CYPRESS_CONFIG_ENV || process.env.CYPRESS_INTERNAL_ENV || 'production') as 'development' | 'staging' | 'production'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice updates to the readmes/guides
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
This PR adds infrastructure to support cypress in cypress testing. See the README for specifics.
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?