-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
element selector: ":last" vs ":last-child" #753
Comments
@zeromquan Interesting find! The one line of code is not the only place where DocumentationThe reason that The Cypress find command documentation says: The querying behavior of this command matches exactly how jQuery > Category: Selectors includes the :last Selector. HOWEVER, this positional selector is deprecated! DeprecationThe jQuery > :last Selector was deprecated in jQuery 3.4.0 released on April 10, 2019. See section "Deprecating positional selectors and the sunset of Sizzle", where it says:
SuggestionReview and revise all use of the deprecated jQuery positional selectors such as |
for the positional selector, |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Now Cypress is using jquery 3.4.1 https://docs.cypress.io/app/references/changelog#13-15-2:~:text=Updated%20jquery%20from%203.1.1%20to%203.4.1 |
Thanks for spotting that Cypress >= The suggestion in #753 (comment) to update the usage is still valid and the tests continue to work with the current Cypress |
cypress-example-kitchensink/cypress/e2e/2-advanced-examples/assertions.cy.js
Line 12 in 277e055
should be changed to
.find('tbody tr:last-child')
to get the last element. The:last-child
is accepted in CSS while not:last
.The text was updated successfully, but these errors were encountered: