-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Queries, Detached DOM, and Retry-Ability (#24628)
* feat: Commands.addSelector, and migrate .get() to be a selector * Fix for failed tests * Last test fix * More test fixes * Self review changes * Remove the concept of prevSubject from selectors entirely * Rename addSelector to addQuery * Quick fix for last commit * Fix TS * Fix merge from develop * Add types and other review updates * Increase timeout to try fixing flakiness * Rename addQuery to _addQuery * Fix typo in previous commit * Fix TS * Include AUT assertion in cy.get() * Fix for previous commit * Review feedback * Minor test improvement * Swifter failure on sizzle syntax error * Better solution for refetching current subject in verifyUpcomingAssertions * Command IDs now include their chainerId * Revert "chore: Revert "feat: _addQuery() (#23665)" (#24022)" This reverts commit f399994. * feat: move .contains() and .shadow() to be queries; remove cy.ng() (#23791) * First stab at removing old .get() implementation * Fix TS and a couple of tests * Fix tests and TS * Fix case-sensitivity for .contains() * Stop TS complaining * Rework cy-contains jquery expression * Add comments, make ts happy * Fix one test, review feedback * Review updates * Fix additional tests * Fix accidental deletion of vital code * One more try at getting logs right * Fix race condition in cross-origin .contains * Add commented out test to ensure .within() works properly with selectors * Fix for sessions + query subject chaining * Fix mixing .within() shadow DOM and .contains() in same chainer * One more attempt at .within + .contains * Fix rebase commits * feat: addQuery Remaining Queries (#24203) * First stab at removing old .get() implementation * Fix TS and a couple of tests * Fix tests and TS * Fix case-sensitivity for .contains() * Stop TS complaining * Rework cy-contains jquery expression * Add comments, make ts happy * Fix one test, review feedback * Review updates * Fix additional tests * Fix accidental deletion of vital code * One more try at getting logs right * Fix race condition in cross-origin .contains * Add commented out test to ensure .within() works properly with selectors * Fix for sessions + query subject chaining * Fix mixing .within() shadow DOM and .contains() in same chainer * One more attempt at .within + .contains * Fix rebase commits * Update many commands to be queries; improve log message around invalid subjects * Update connectors, location, focused and window commands to queries * Return noop to a command and not a query (to avoid implicit assertions) * More test fixes * Fix test failures * Fix for weird-ass frontend-component test * Error message improvements * Fix for broken system test * Update withinSubject to use subject chain * Test clarifications * Unbreak cypress-testing-library via withinState backwards compatibility * Typo in last commit * Improvement for assertion following failed traversal * feat: Fix detached DOM errors for all Cypress commands (#24417) * First stab at removing old .get() implementation * Fix TS and a couple of tests * Fix tests and TS * Fix case-sensitivity for .contains() * Stop TS complaining * Rework cy-contains jquery expression * Add comments, make ts happy * Fix one test, review feedback * Review updates * Fix additional tests * Fix accidental deletion of vital code * One more try at getting logs right * Fix race condition in cross-origin .contains * Add commented out test to ensure .within() works properly with selectors * Fix for sessions + query subject chaining * Fix mixing .within() shadow DOM and .contains() in same chainer * One more attempt at .within + .contains * Fix rebase commits * Update many commands to be queries; improve log message around invalid subjects * Update connectors, location, focused and window commands to queries * Return noop to a command and not a query (to avoid implicit assertions) * More test fixes * Fix test failures * Fix for weird-ass frontend-component test * Error message improvements * Fix for broken system test * Update withinSubject to use subject chain * Test clarifications * Unbreak cypress-testing-library via withinState backwards compatibility * Typo in last commit * Improvement for assertion following failed traversal * WIP adding query support to * More work on actionability + detached dom * Fix TS, rename _addQuery to addQuery * Another try to fix types * Fix lint * Fix for bad merge * Fixes for a couple more tests * Increase timeout 50ms -> 100ms on certain tests failing in CI * Switch to new branch of cypress-testing-library * Update lockfile * Fix yarn.lock with latest version of forked testing-library * More test fixes * Fix TS again * Increase test assertion timeout so it passes on slow browsers (webkit) * Apply suggestions from code review Co-authored-by: Emily Rohrbough <[email protected]> Co-authored-by: Zach Bloomquist <[email protected]> * More review changes * Fix selectFile tests based on updated error message * Improve types and type comments for Commands.add * Undo change to Commands.add types * Update yarn lockfiles again * Remove overwriteQuery from Cy12; .focused() now respects passed in timeout * Update cli/types/cypress.d.ts Co-authored-by: Chris Breiding <[email protected]> * Restore .uncheck() tests Co-authored-by: Emily Rohrbough <[email protected]> Co-authored-by: Zach Bloomquist <[email protected]> Co-authored-by: Chris Breiding <[email protected]> * Fix for hanging driver test after merge * Fix for app component test Co-authored-by: Emily Rohrbough <[email protected]> Co-authored-by: Zach Bloomquist <[email protected]> Co-authored-by: Chris Breiding <[email protected]>
- Loading branch information
1 parent
9e2ece1
commit 9ae911f
Showing
103 changed files
with
2,371 additions
and
3,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
9ae911f
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.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
9ae911f
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.
Circle has built the
linux arm64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
9ae911f
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.
Circle has built the
darwin arm64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
9ae911f
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.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
9ae911f
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.
Circle has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: