diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-01 15:00:59 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-02 11:10:36 +0100 |
commit | fb86b4dd50ad68b8f14351037d077d6cf9bc82b5 (patch) | |
tree | 972b9567003425c4771bd4a9b0ec1a9e7f0fde5d /.cypress | |
parent | c2dfa30bad7f17f702985a535f8a0d72b0f47183 (diff) |
Fix history API bug.
replace_query_parameter() was stringifying select multiples, meaning
they were incorrectly recorded by the pushState and thus breaking on
navigation.
Diffstat (limited to '.cypress')
-rw-r--r-- | .cypress/cypress/integration/around_filters.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.cypress/cypress/integration/around_filters.js b/.cypress/cypress/integration/around_filters.js index 18a086e29..3facf9e8c 100644 --- a/.cypress/cypress/integration/around_filters.js +++ b/.cypress/cypress/integration/around_filters.js @@ -27,6 +27,12 @@ describe('Around page filtering and push state', function() { cy.should('not.contain', 'Street light not working'); cy.url().should('not.include', 'fixed'); cy.get('#status_2').should('not.be.checked'); + cy.go('forward'); + cy.wait('@update-results'); + cy.contains('1 to 6 of 6'); + cy.contains('Street light not working'); + cy.url().should('include', 'status=closed%2Cfixed'); + cy.get('#status_2').should('be.checked'); }); it('allows me to filter by report category', function() { @@ -47,6 +53,12 @@ describe('Around page filtering and push state', function() { cy.contains('1 to 4 of 4'); cy.contains('Loose drain cover'); cy.should('not.contain', 'Large pothole'); + cy.go('back'); + cy.go('back'); + cy.wait('@update-results'); + cy.url().should('include', 'filter_category=Potholes'); + cy.contains('1 to 4 of 4'); + cy.contains('Large pothole'); }); it('allows me to sort', function() { |