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

break: addSelector, and rework of cy.should() #23631

Closed
wants to merge 38 commits into from

Conversation

BlueWinds
Copy link
Contributor

User facing changelog

This PR targets a newly created feature branch rather than develop, so these 'user facing changes' are incomplete and will be added to by future PRs before ending up in the changelog.

This PR contains three major changes:

  • The addition of Cypress.Commands.addSelector(), in packages/driver/src/cypress/commands.ts and packages/driver/src/cypress/command_queue.ts
  • Migration of .should() from a special-case utility command that "folds into" earlier commands via verifyUpcomingAssertios to its own, full-fledged independent command, in packages/driver/src/cy/commands/asserting.ts.
  • Moving .get() to be the first selector, and moving Aliases to use concept of "subject chains" rather than re-running commands via the command queue, in packages/driver/src/cy/commands/querying/querying.ts and packages/driver/src/cy/commands/aliasing.ts.

Additional details

Many tests are currently failing, and others have been commented out. Red builds are expected at the moment.

The intention is to have all tests passing and no tests skipped by the time this work is ready to merge into develop - but getting everything passing again will require further code churn, and I wanted to limit the scope of this already large PR as much as possible.

Fixing these commented out and failing tests will be the work of future PRs against the same branch.

Steps to test

For now please focus on the tests and functionality in /packages/driver.

All commands should be functional, but .should() will fail on many of them at the moment. .get() and .root() should be completely working, but, eg. .contains(), .attr(), .location() will not retry correctly.

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • [n/a] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 30, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Aug 30, 2022



Test summary

38718 27 3692 546Flakiness 6


Run details

Project cypress
Status Failed
Commit cf2deff
Started Aug 30, 2022 9:02 PM
Ended Aug 30, 2022 9:16 PM
Duration 14:16 💡
OS Linux Debian - 11.3
Browser Multiple

View run in Cypress Dashboard ➡️


Failures

Run group: 5x-driver-electron-experimentalSessionAndOrigin (Linux, Electron )
e2e/origin/cookie_login.cy.ts Failed
1 cy.origin - cookie login > document.cookie > gets cookie set by http request
2 cy.origin - cookie login > document.cookie > works when setting cookie in addition to cookie that already exists from http request
e2e/origin/commands/aliasing.cy.ts Failed
1 cy.origin aliasing > .as() > fails for dom elements outside origin
e2e/origin/commands/misc.cy.ts Failed
1 verifies number of cy commands
commands/querying/within.cy.js Failed
1 ... > logs immediately before resolving
Run group: 5x-driver-electron (Linux, Electron )
Run group: 5x-driver-firefox (Linux, Firefox )
Run group: 5x-driver-chrome-experimentalSessionAndOrigin (Linux, Chrome )
e2e/origin/cookie_login.cy.ts Failed
1 cy.origin - cookie login > document.cookie > gets cookie set by http request
2 cy.origin - cookie login > document.cookie > works when setting cookie in addition to cookie that already exists from http request
e2e/origin/commands/aliasing.cy.ts Failed
1 cy.origin aliasing > .as() > fails for dom elements outside origin
Run group: 5x-driver-chrome:beta-experimentalSessionAndOrigin (Linux, Chrome beta )
e2e/origin/cookie_login.cy.ts Failed
1 cy.origin - cookie login > document.cookie > gets cookie set by http request
2 cy.origin - cookie login > document.cookie > works when setting cookie in addition to cookie that already exists from http request
Run group: 5x-driver-firefox-experimentalSessionAndOrigin (Linux, Firefox )
Run group: 5x-driver-webkit (Linux, Webkit )

Flakiness

e2e/origin/navigation.cy.ts Flakiness
1 errors > never returns to the primary origin
2 errors > never returns to the primary origin
3 errors > never returns to the primary origin
4 errors > never returns to the primary origin
commands/actions/select.cy.js Flakiness
1 ... > ends
This comment includes only the first 5 flaky tests. See all 6 flaky tests in the 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

@BlueWinds
Copy link
Contributor Author

After discussing with the team, came to the conclusion that many of these changes are unnecessary. Closing this in favor of a clean branch / PR incoming shortly.

@BlueWinds BlueWinds closed this Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant