-
Notifications
You must be signed in to change notification settings - Fork 224
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
Cypress it.skip fails #3198
Comments
I will try to get feedback on this issue from public forums. The monkey-patch was posted on Stackoverflow, however it is unsupported code which goes deeply into the workings of Cypress. It doesn't seem like there is any open source maintenance for this code at this time. |
|
Hey @MikeMcC399 Internally, we don't work with test skipping. We would support downgrading a minor version, assuming no functionality breaks. Do you want to work on that and verify nothing breaks? Otherwise, we can do it when we have some space for it, but it wouldn't be a high priority for us. |
I wouldn't want to downgrade Cypress to 10.10.0 and it wouldn't solve the related it.only issue. In the meantime a community member who already proposed a solution for the I agree that this is not high impact or urgency and I have only shared it for completeness. Thanks anyway for your attention! |
Great, thank you! I wasn't aware there is already activity from cypress's side. Then we will monitor how things go and come back to the issue when there is a fix. |
Where to find the issue
Cypress tests under development in cypress/e2e.
Describe the issue
If a Cypress test is changed from
it
toit.skip
for debugging purposes, other tests which do not have theskip
attribute applied do not run and the following error is produced:This is a development issue only. It does not affect the website itself.
It is related to the open issue Cypress
it.only
fails #3010The issue occurs following the migration PR Migrate to Cypress 10.11.0 #3197 which updated cwa-website to use Cypress 10.11.0 instead of Cypress 9.7.0.
Steps to reproduce
Create a new test spec
test.skip.cy.js
incypress/e2e/
with the following contents:Execute
npm run test:open
Select
test.skip.cy.js
This produces the error
> Cannot set properties of undefined (setting 'body')
and no tests are executed.Regression with Cypress 10.11.0
Going back one minor version from Cypress 10.11.0 to 10.10.0 removes the issue:
Execute:
npm install cypress@10.10.0
Repeat the above test.
test 1 runs, test 2 is skipped. This is correct.
Regression with monkey-patch
npm install cypress@latest
Edit
cypress/support/e2e.js
and remove all code starting with the comment line// soft assert for finding broken links, see also check_links.js
to the end of the file.
Repeat the test.
test 1 runs, test 2 is skipped. This is correct.
Code issue
cypress/support/e2e.js
contains the code
cwa-website/cypress/support/e2e.js
Lines 93 to 109 in a0c749a
that modifies the standard behaviour of Cypress / mocha.
Without this code,
it.skip
works as expected.Reference
Cypress documentation
Excluding and Including Tests
"To skip a specified suite or test, append
.skip()
to the function. All nested suites will also be skipped."Suggestion
Since this is a minor development issue only, I suggest no change at this time.
Internal Tracking ID: EXPOSUREAPP-14292
The text was updated successfully, but these errors were encountered: