diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2018-03-19 12:09:57 +0000 |
---|---|---|
committer | Zarino Zappia <mail@zarino.co.uk> | 2018-03-20 10:06:42 +0000 |
commit | 3d012b7007a44d3be01400c0acb4166d0f73ba3f (patch) | |
tree | e0f5e60858493e7bca45b1c5fb66e6203ea0b8e0 /.cypress | |
parent | ff2a390dda475c24607365103e3ef72adc73aa63 (diff) |
Clicking "big green banner" on /around begins a report
Data collected by #2001 has shown that some people are clicking the big
green "Click map to report a problem" banner on fixmystreet.com/around.
We assume the same is true for other cobrands.
As suggested in #2016, this commit adds a click handler to that banner
element, which will begin a new report at the centre of the screen. It
might not be the exact right location, but the pin can be repositioned
from the /report/new form, and beginning a report is better than just
soaking up the click and doing nothing.
Diffstat (limited to '.cypress')
-rw-r--r-- | .cypress/cypress/integration/simple_spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.cypress/cypress/integration/simple_spec.js b/.cypress/cypress/integration/simple_spec.js index 39000a022..fe0867c76 100644 --- a/.cypress/cypress/integration/simple_spec.js +++ b/.cypress/cypress/integration/simple_spec.js @@ -14,3 +14,17 @@ describe('My First Test', function() { cy.get('form').submit(); }); }); + +describe('Clicking the "big green banner" on a map page', function() { + before(function() { + cy.visit('/'); + cy.get('[name=pc]').type('BS10 5EE'); + cy.get('#postcodeForm').submit(); + cy.get('.big-green-banner').click(); + }); + + it('begins a new report', function() { + cy.url().should('include', '/report/new'); + cy.get('#form_title').should('be.visible'); + }); +}); |