Skip to content
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

Show a better error message during cypress run when CT/E2E has not been configured. #21909

Closed
sync-by-unito bot opened this issue May 30, 2022 · 8 comments · Fixed by #22000 or cypress-io/cypress-example-kitchensink#554
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented May 30, 2022

Summary

CT testing is not configured, but there is a cypress.config.js file configured for E2E.

When running cypress run --ct   I'm seeing no supportFile found. Should I expect a message like not configured, not tests to run  to align with open-mode's not configured verbiage?

!Screen Shot 2022-05-17 at 2.39.15 PM.png|width=942,height=247!

https://cypressio.slack.com/archives/C02MW5QBD4K/p1652816461805149

Acceptance Criteria

  • Show a better error message in the case of running cypress run --component when CT testing has never been setup that instructs users to run cypress open to configure their CT tests.

┆Issue is synchronized with this Jira Task by Unito
┆Attachments: Screen Shot 2022-05-17 at 2.39.15 PM.png | Screen Shot 2022-05-19 at 3.27.11 PM.png | Screen Shot 2022-06-02 at 12.20.51 PM.png
┆author: Emily Rohrbough
┆epic: CT Post Unification Release
┆friendlyId: UNIFY-1766
┆priority: Medium
┆sprint: Fast Follows 1
┆taskType: Task

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 30, 2022

➤ Jennifer Shehane commented:

The is also the same message that display if you don’t have E2E configured.

Via Bill Glesias

!Screen Shot 2022-05-19 at 3.27.11 PM.png|width=1845,height=945!

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 30, 2022

➤ Brian Mann commented:

Yeah the CLI logic spreadsheet documents the correct behavior. We’re missing a check higher up in the process and should validate it’s been configured prior to trying to open the testing type and thus subsequently failing

@brian-mann
Copy link
Member

yes you need to have both e2e + component configured. It should always throw when trying to run them when they are not configured.

...and yes this error message is just completely wrong… the problem isn't that the error needs to be improved, its that we need to ADD the error state for what happens when you try to run a mode that isn’t configured

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jun 3, 2022

➤ Alejandro Estrada commented:

Should this throw an error as well if e2e is not configured? currently, you can run e2e tests without any extra configuration on the cypress.config.js file, the only need is that the supportFile exists (the default one) so, should we throw on e2e as well or only on component?

!Screen Shot 2022-06-02 at 12.20.51 PM.png|width=1228,height=823!

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jun 3, 2022

➤ Brian Mann commented:

yes you need to have both e2e + component configured. It should always throw when trying to run them when they are not configured.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jun 3, 2022

➤ Brian Mann commented:

and yes this error message is just completely wrong… the problem isn't that the error needs to be improved, its that we need to ADD the error state for what happens when you try to run a mode that isn’t configured

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 7, 2022

The code for this is done in cypress-io/cypress#22000, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jun 7, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 10, 2022

Released in 10.1.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.1.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants