Open jonathanantoine opened 2 years ago
Hello @jonathanantoine.
If you're referring to component testing then yes, you can use the selectors precisely the same way.
The package itself is essentially a collection of decorators that translate a "selector" into a chain of cy.get
calls and therefore no matter what kind of test you're running (e2e or component), as long as cy.get
is in scope the selectors will work.
Than you for your reply. I meant unit testing with karma (example : https://angular.io/guide/testing).
I would need to be able to retrieve the element from the Selector object.
@jonathanantoine since this is a cypress-specific package, it's going to work only in Cypress tests. However, what you're aiming for can be done with cypress-angular-unit-test. With Cypress, it is possible to render a React/Angular/
Hello,
I would like my development team to create the selectors to be used by my QA teams while writing their own separated cypress tests. Is there a way to use the created cypress-selectors in the unit tests ?
Thanks !