Skip to content

Commit

Permalink
Make sure map loaded in test before testing layers
Browse files Browse the repository at this point in the history
Have seen a situation (more likely with upgraded jQuery?) where
the test code runs before the map has initialised its layers.
  • Loading branch information
dracos committed Jul 15, 2020
1 parent 9fd3dfb commit a1e6881
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .cypress/cypress/integration/bathnes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ it('loads the staff layer correctly', function() {
cy.get('[name=pc]').parents('form').submit();
cy.url().should('include', '/around');
cy.window().its('fixmystreet.maps').should('have.property', 'banes_defaults');
cy.get('.olMap'); // Make sure map is loaded before testing its layers
cy.window().then(function(win){
var llpg = 0;
win.fixmystreet.map.layers.forEach(function(lyr) {
Expand Down

0 comments on commit a1e6881

Please sign in to comment.