The Cypress for some reason produces a duplicate of an element, which makes it hard to make certain assertions.
We're working in the WordPress environment with our plugin and the flow of the test is:
- Creating a page with our plugin
- Adding an element (Post Grid in this case)
- Changing some attributes
- Saving the page
- Viewing the page
E.g. A post grid is a usual div
element wich contains two items (links to blog posts) in it, but due to its being duplicate, the following assertion fails.
cy.get('.vce-posts-grid-list')
.find('.vce-posts-grid-item')
.its('length')
.should('be.eq', 2)
Our plugin utilizes an iframe
and generates content (HTML) inside it.
Note: This issue occurs only sometimes, NOT 100% of the time.
Is it a Cypress specific issue or a reaction for WordPress and possibly our plugin environment?
Aucun commentaire:
Enregistrer un commentaire