diff options
Diffstat (limited to '.cypress/cypress/integration/regressions.js')
-rw-r--r-- | .cypress/cypress/integration/regressions.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.cypress/cypress/integration/regressions.js b/.cypress/cypress/integration/regressions.js index 3bd208ede..ca3c902d0 100644 --- a/.cypress/cypress/integration/regressions.js +++ b/.cypress/cypress/integration/regressions.js @@ -71,6 +71,27 @@ describe('Regression tests', function() { cy.contains(/These will be sent to Northampton Borough Council and also/); }); + it('remembers extra fields when you sign in during reporting', function() { + cy.server(); + cy.route('/report/new/ajax*').as('report-ajax'); + cy.visit('/around?lon=-2.295894&lat=51.526877&zoom=6&js=1'); + cy.get('#map_box').click(); + cy.wait('@report-ajax'); + cy.get('[id=category_group]').select('Licensing'); + cy.get('[id=subcategory_Licensing]').select('Skips'); + cy.get('[name=title]').type('Title'); + cy.get('[name=detail]').type('Detail'); + cy.get('[name=start_date').type('2019-01-01'); + cy.get('.js-new-report-user-show').click(); + cy.get('.js-new-report-show-sign-in').should('be.visible').click(); + cy.get('#form_username_sign_in').type('user@example.org'); + cy.get('[name=password_sign_in]').type('password'); + cy.get('[name=password_sign_in]').parents('form').submit(); + cy.get('#map_sidebar').should('contain', 'check and confirm your details'); + cy.wait('@report-ajax'); + cy.get('#form_start_date').should('have.value', '2019-01-01'); + }); + it('hides everything when duplicate suggestions are shown', function() { cy.server(); cy.route('/report/new/ajax*').as('report-ajax'); |