fix: disable ct testing when run via binary#21540
Conversation
|
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
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 |
||||||||||||||||||||||||||||||||||||||
tgriesser
left a comment
There was a problem hiding this comment.
Change seems fine to me - based on the test failures I'm assuming there's something else in the e2e setup layer that needs to be adjusted to make this work?
|
@tgriesser thanks for pointing me in that direction, a small tweak and the e2e tests should be passing now a14a112 |
BlueWinds
left a comment
There was a problem hiding this comment.
Some small suggestions, looks good overall. Thanks for the component refactors.
|
|
||
| const testingTypeStatus = computed(() => { | ||
| return { | ||
| e2eStatus: props.gql.currentProject?.isE2EConfigured && props.gql.currentProject.currentTestingType === 'e2e' |
There was a problem hiding this comment.
These nested conditionals are pretty unpleasant to read. Can they be pulled out / pulled apart, rather than computed inline and then immediately destructured? Eg.
e2eStatus = computed(() => {
if (!props.gql.currentProject?.isE2EConfigured) return 'notConfigured'
return props.gql.currentProject.currentTestingType === 'e2e' ? 'running' : 'configured'
})
componentStatus = computed(() => {
if (!props.gql.invokedFromCli) return 'disabled'
if (!props.gql.currentProject?.isCTConfigured) return 'notConfigured'
return props.gql.currentProject.currentTestingType === 'component' ? 'running' : 'configured'
})
or something.
There was a problem hiding this comment.
Reads a lot better, gonna throw this in.
| "description": "Testing your components requires {0} as an NPM dependency for this project.", | ||
| "link": "installing Cypress" |
There was a problem hiding this comment.
I'd prefer active over passive voice here.
| "description": "Testing your components requires {0} as an NPM dependency for this project.", | |
| "link": "installing Cypress" | |
| "description": "To test your components you must {0} as an NPM dependency for this project.", | |
| "link": "install Cypress" |
There was a problem hiding this comment.
I like this verbiage, @ryanjwilke what do you think and can we get this updated in Figma
| }) | ||
|
|
||
| t.nonNull.boolean('invokedFromCli', { | ||
| description: 'Whether the app was invoked from the CLI', |
There was a problem hiding this comment.
| description: 'Whether the app was invoked from the CLI', | |
| description: 'Whether the app was invoked from the CLI', False if user is using the binary without npm. |
Just imagining coming in on this later and not being sure how else the app can be invoked.
|
@marktnoonan @tgriesser bump |
…pack * develop: test(launchpad): skip failure due to recaptcha on windows, enable more windows jobs (#21620) docs: add "Steps to test" to PR template (#21606) feat: (origin) handle waiting for aliased intercepts (#21579) fix: handle git watch error (#21600) fix: Successfully create new specs files that do not have a known extension (#21593) chore: release 9.7.0 fix: do not allow experimentalSessionAndOrigin to be available in CT … (#21588) chore: sort the frameworks select dropdown in a more logical way (#21553) Trigger Build fix: disable ct testing when run via binary (#21540) chore: Update Chrome (beta) to 102.0.5005.61 (#21556) chore: release @cypress/react-v5.12.5 fix: add support for Next.js v12.1.6 (#21516) chore: release @cypress/schematic-v1.7.0 feat(cypress/schematic): add headed option and other fixes (#21415) chore: release @cypress/vite-dev-server-v2.2.3 fix: handle specs with white space in vite-dev-server (#21386) Empty commit

User facing changelog
Disable CT Testing when invoked from the binary
Additional details
CT Testing requires the binary to be invoked from the cli due to the need to source the user's
node_moduledependencies. If the project is not invoked from the cli, we will now disable the option for the user to choose CT Testing from the page.I did a small refactor of the testing type status. Since we are now adding another one (disabled), the attributes were getting hard to manage. I also had to make some changes to the
Card.vuecomponent as it hadpointer-events-nonewhen disabled which was preventing the link from being clicked.How has the user experience changed?
Screen.Recording.2022-05-17.at.5.07.18.PM.mov
PR Tasks
cypress-documentation?type definitions?cypress.schema.json?