We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcfa412 commit 8882e41Copy full SHA for 8882e41
src/utils.js
@@ -6,7 +6,10 @@ function getFirstElement(jqueryOrElement) {
6
}
7
8
function getContainer(container) {
9
- const subject = cy.state('subject')
+ // Cypress 10 deprecated cy.state('subject') usage and suggest to use new cy.currentSubject.
10
+ // https://docs.cypress.io/guides/references/changelog#10-5-0
11
+ // Below change ensures we do not get spam of warnings and are backward compatible with older cypress versions.
12
+ const subject = cy.currentSubject ? cy.currentSubject() : cy.state('subject');
13
const withinContainer = cy.state('withinSubject')
14
15
if (!subject && withinContainer) {
0 commit comments