Skip to content

Commit d715063

Browse files
authored
Merge pull request #586 from cypress-io/issue-25134-should-as-query
fix: .should() new behavior
2 parents e23781b + 014acd9 commit d715063

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cypress/e2e/2-advanced-examples/connectors.cy.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ context('Connectors', () => {
2525
it('.invoke() - invoke a function on the current subject', () => {
2626
// our div is hidden in our script.js
2727
// $('.connectors-div').hide()
28+
cy.get('.connectors-div').should('be.hidden')
2829

2930
// https://on.cypress.io/invoke
30-
cy.get('.connectors-div').should('be.hidden')
31-
// call the jquery method 'show' on the 'div.container'
32-
.invoke('show')
33-
.should('be.visible')
31+
// call the jquery method 'show' on the 'div.container'
32+
cy.get('.connectors-div').invoke('show')
33+
34+
cy.get('.connectors-div').should('be.visible')
3435
})
3536

3637
it('.spread() - spread an array as individual args to callback function', () => {

0 commit comments

Comments
 (0)