Let's say there is some hidden checkbox wrapped with a styled div
element:
<div class="wrapper beautiful-checkbox">
<input type="checkbox" style="display: none">
</div>
In Cypress I want to test when user clicks on this element to choose this option. Which cy
event is more suitable from the perspective of real user interaction:
cy.click('div.wrapper')
- test user click event on wrapper elementcy.check('input[type=checkbox]', { force: true })
- testcheck
event on the actual hidden checkbox usingforce: true
option
Aucun commentaire:
Enregistrer un commentaire