-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore: Add e2e tests for global mode #18719
chore: Add e2e tests for global mode #18719
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
If we get --global
and have a project (eg, launched from within a project workspace, or with --project given explicitly) at the same time, which should take precedence? I'm assuming --global.
Might be worth at least having to verify that you can access global mode from within a project workspace (which I think is the purpose of the flag).
Speaking of flags... planning on doing some work in a separate PR to get our CLI flags working a bit better with the new workflow, it's a bit inconsistent right now, both in the code and in testing setup. Was thinking that we could be able to specify them in the standard CLI format, which would run them through the validator: // equivalent to cypress open --project=path/to/project-name, or cypress open in that directory
cy.setupE2E('project-name')
cy.setupE2E('project-name', '--component') // yarn cypress open --project=path/to/project-name --component
cy.setupE2E('project-name', '--global') // yarn cypress open --project=path/to/project-name --global @BlueWinds @chrisbreiding thoughts? |
That sounds really nice. We could run the args directly through the CLI parser (cli/lib/cli.js), which would make it more truly e2e by including a bunch of our cli code directly in every test. |
I think we should probably error if you pass both flags, since they're mutually incompatible.
True. I'm not sure there's a way to write a test for that though. |
// load the cached user & validate the token on start | ||
this.actions.auth.getUser(), | ||
] | ||
|
||
if (this._config._internalOptions.loadCachedProjects) { |
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.
Loading cached projects leads to test pollution for any tests concerning the projects list since the cache is empty in CI and different between different developers' machines. This allows the e2e test infrastructure to skip loading cached projects while defaulting to loading them in production. @tgriesser I'm open to other ideas on how to implement this.
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.
Yeah, that's fine - going to be cleaning up a lot of DataContext things in #18776 and will add this to the list of things to look at
…ve-activeProject * unified-desktop-gui: (57 commits) chore: Add e2e tests for global mode (#18719) chore: add percy to app and launchpad package (#18781) chore: update test refactor: move settings in app (#18729) feat: setup launchpad lifecycle (#18734) feat(app): decouple event manager from driver (#18695) chore: Force single resolution for core modules, infinite loop guard (#18764) fix(driver): Sticky elements within a fixed container will not prevent an element from being scrolled to (#18441) chore: cleaning up the runner container pattern (#18741) feat: Use .config files (#18578) chore(app): basic style and example to stop scrollIntoView bug (#18736) chore: make `create` function on server.ts obsolete (#18615) feat: add codegen utility (#18708) docs: Add instructions to squash commits to develop in Contributing (#18728) fix(@cypress/react): throw if using Next.js swc-loader without nodeVersion=system (#18686) refactor: remove Ramda (#18723) fix: support using create-cypress-tests as part of build process (#18714) chore: Increase paralleled machines for desktop-gui tests (#18725) fix(app): do not cache graphql (#18716) chore: Update Chrome (stable) to 95.0.4638.69 (#18696) ...
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?