I have the following code
it( 'test', () => {
cy.get( '[data-test="test"]' )
.should( 'be.visible' )
.find( '[data-test="test-text"]' )
.should( kicker =>
expect( kicker.text().trim() ).to.equal( '' )
);
});
So, I want to verify if that element doesn't have text but in my code I don't have the code write [data-test='test-text'] for it and I am expecting for the test to fail, instead it pass whatever I put in find() method. Do you have any ideea?
Cypress version: 10.11.0