diff options
-rw-r--r-- | .cypress/cypress/integration/regressions.js | 22 | ||||
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | templates/web/base/report/new/duplicate_suggestions.html | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/.cypress/cypress/integration/regressions.js b/.cypress/cypress/integration/regressions.js index ca3c902d0..73f6900a6 100644 --- a/.cypress/cypress/integration/regressions.js +++ b/.cypress/cypress/integration/regressions.js @@ -104,4 +104,26 @@ describe('Regression tests', function() { cy.get('.extra-category-questions').should('not.be.visible'); cy.visit('http://borsetshire.localhost:3001/_test/teardown/regression-duplicate-hide'); }); + + it('does not show duplicate suggestions when signing in during reporting', function() { + cy.server(); + cy.route('/report/new/ajax*').as('report-ajax'); + cy.route('/around/nearby*').as('nearby-ajax'); + cy.visit('http://borsetshire.localhost:3001/report/1'); + cy.contains('Report another problem here').click(); + cy.wait('@report-ajax'); + cy.get('[id=category_group]').select('Potholes'); + cy.wait('@nearby-ajax'); + cy.get('.js-hide-duplicate-suggestions:first').should('be.visible').click(); + cy.get('[name=title]').type('Title'); + cy.get('[name=detail]').type('Detail'); + 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.get('#js-duplicate-reports').should('not.exist'); + }); + }); diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e2eea580..5427de162 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Handle missing category when sending open311 reports #2502 - Fix label associations with category groups. #2541 - Hide category extras when duplicate suggestions shown. + - Hide duplicate suggestions when signing in during reporting. - Retain extra data if signing in during reporting. - Front end improvements: - Set report title autocomplete to off to prevent email autocompleting diff --git a/templates/web/base/report/new/duplicate_suggestions.html b/templates/web/base/report/new/duplicate_suggestions.html index 582ba58e9..dd05dc9a4 100644 --- a/templates/web/base/report/new/duplicate_suggestions.html +++ b/templates/web/base/report/new/duplicate_suggestions.html @@ -1,4 +1,4 @@ -[% IF c.cobrand.suggest_duplicates %] +[% IF c.cobrand.suggest_duplicates AND NOT login_success AND NOT oauth_need_email %] [% extra_js.push( version('/js/duplicates.js'), ) -%] |