Last active
December 13, 2018 14:35
-
-
Save codeofsumit/ba704d3d55c79f9c606237281d156b97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Draw & Edit Polygons', () => { | |
it('correctly draws a polygon', () => { | |
cy.toolbarButton('polygon') | |
.closest('.button-container') | |
.should('have.not.class', 'active'); | |
cy.toolbarButton('polygon') | |
.click() | |
.closest('.button-container') | |
.should('have.class', 'active'); | |
cy.get('#map') | |
.click(390, 250) | |
.click(400, 50) | |
.click(450, 50) | |
.click(450, 150) | |
.click(390, 250); | |
cy.hasVertexMarkers(0); | |
cy.toolbarButton('edit') | |
.click() | |
.closest('.button-container') | |
.should('have.class', 'active'); | |
cy.hasVertexMarkers(4); | |
cy.toolbarButton('cut') | |
.click() | |
.closest('.button-container') | |
.should('have.class', 'active'); | |
cy.get('#map') | |
.click(300, 200) | |
.click(320, 100) | |
.click(450, 100) | |
.click(450, 250) | |
.click(300, 200); | |
cy.hasVertexMarkers(0); | |
cy.toolbarButton('edit').click(); | |
cy.hasVertexMarkers(8); | |
cy.hasMiddleMarkers(8); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment