cy.should()
doesn't exist, you need to yield something before you run an assertion on it. You can read more about the command here.
The syntax mentioned in the documentation:
.should(chainers)
it does not start with cy.
, so it means you have to have another command that yields something before you use .should()
.
You can compare it to what documentation mentions for cy.get()
command that could be directly chained with cy
:
cy.get(selector)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…