Skip to content

Instantly share code, notes, and snippets.

@codeofsumit
Last active December 13, 2018 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeofsumit/1261065d681504097b932a40eb79b445 to your computer and use it in GitHub Desktop.
Save codeofsumit/1261065d681504097b932a40eb79b445 to your computer and use it in GitHub Desktop.
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);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment