Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a funciton in cypress that looks for "not contains" words?

I want to test the search filter in screen. When I enter the word in the search bar, I want to see that it words that only contains entered. I can not find a function that provide in Cypress

like image 331
Elif1111 Avatar asked Oct 22 '19 10:10

Elif1111


1 Answers

You could easily use the not.contain option. Syntax would be like this:

cy.get('element').should('not.contain', 'value_it_should_not_contain')
like image 60
Mr. J. Avatar answered Oct 13 '22 20:10

Mr. J.