diff options
-rw-r--r-- | .cypress/cypress/fixtures/bus_stops.json (renamed from .cypress/cypress/fixtures/trees.json) | 0 | ||||
-rw-r--r-- | .cypress/cypress/fixtures/bus_stops_none.json (renamed from .cypress/cypress/fixtures/trees_none.json) | 0 | ||||
-rw-r--r-- | .cypress/cypress/integration/northamptonshire.js | 50 | ||||
-rwxr-xr-x | bin/fixmystreet.com/fixture | 2 |
4 files changed, 26 insertions, 26 deletions
diff --git a/.cypress/cypress/fixtures/trees.json b/.cypress/cypress/fixtures/bus_stops.json index f3808c912..f3808c912 100644 --- a/.cypress/cypress/fixtures/trees.json +++ b/.cypress/cypress/fixtures/bus_stops.json diff --git a/.cypress/cypress/fixtures/trees_none.json b/.cypress/cypress/fixtures/bus_stops_none.json index 3102a72dd..3102a72dd 100644 --- a/.cypress/cypress/fixtures/trees_none.json +++ b/.cypress/cypress/fixtures/bus_stops_none.json diff --git a/.cypress/cypress/integration/northamptonshire.js b/.cypress/cypress/integration/northamptonshire.js index dc683e4e6..76ce8ff44 100644 --- a/.cypress/cypress/integration/northamptonshire.js +++ b/.cypress/cypress/integration/northamptonshire.js @@ -5,10 +5,10 @@ it('loads the right front page', function() { it('prevents clicking unless asset selected', function() { cy.server(); - cy.fixture('trees.json'); - cy.fixture('trees_none.json'); - cy.route('**/render-layer/**', 'fixture:trees_none.json').as('empty-trees-layer'); - cy.route('**/16301/10787**', 'fixture:trees.json').as('trees-layer'); + cy.fixture('bus_stops.json'); + cy.fixture('bus_stops_none.json'); + cy.route('**/render-layer/**', 'fixture:bus_stops_none.json').as('empty-bus_stops-layer'); + cy.route('**/16301/10787**', 'fixture:bus_stops.json').as('bus_stops-layer'); cy.route('/report/new/ajax*').as('report-ajax'); cy.visit('http://northamptonshire.localhost:3001/'); cy.get('[name=pc]').type('NN1 1NS'); @@ -17,20 +17,20 @@ it('prevents clicking unless asset selected', function() { cy.get('#map_box').click(); cy.wait('@report-ajax'); - cy.get('[id=category_group]').select('Fallen Tree'); + cy.get('[id=category_group]').select('Shelter Damaged'); - cy.wait('@trees-layer'); - cy.wait('@empty-trees-layer'); - cy.contains(/Please select a.*tree.*from the map/); + cy.wait('@bus_stops-layer'); + cy.wait('@empty-bus_stops-layer'); + cy.contains(/Please select a.*bus stop.*from the map/); cy.get('#js-councils_text').should('be.hidden'); }); it('selecting an asset allows a report', function() { cy.server(); - cy.fixture('trees.json'); - cy.fixture('trees_none.json'); - cy.route('**/render-layer/**', 'fixture:trees_none.json').as('empty-trees-layer'); - cy.route('**/16301/10787**', 'fixture:trees.json').as('trees-layer'); + cy.fixture('bus_stops.json'); + cy.fixture('bus_stops_none.json'); + cy.route('**/render-layer/**', 'fixture:bus_stops_none.json').as('empty-bus_stops-layer'); + cy.route('**/16301/10787**', 'fixture:bus_stops.json').as('bus_stops-layer'); cy.route('/report/new/ajax*').as('report-ajax'); cy.visit('http://northamptonshire.localhost:3001/'); cy.get('[name=pc]').type('NN1 2NS'); @@ -39,21 +39,21 @@ it('selecting an asset allows a report', function() { cy.get('#map_box').click(); cy.wait('@report-ajax'); - cy.get('[id=category_group]').select('Fallen Tree'); + cy.get('[id=category_group]').select('Shelter Damaged'); - cy.wait('@trees-layer'); - cy.wait('@empty-trees-layer'); + cy.wait('@bus_stops-layer'); + cy.wait('@empty-bus_stops-layer'); cy.get('#js-councils_text').should('be.visible'); }); it('detects multiple assets at same location', function() { cy.server(); - cy.fixture('trees.json'); - cy.fixture('trees_none.json'); - cy.route('**/render-layer/**', 'fixture:trees_none.json').as('empty-trees-layer'); - cy.route('**/16301/10787**', 'fixture:trees.json').as('trees-layer'); - cy.route('**/16301/10788**', 'fixture:trees.json').as('trees-layer2'); + cy.fixture('bus_stops.json'); + cy.fixture('bus_stops_none.json'); + cy.route('**/render-layer/**', 'fixture:bus_stops_none.json').as('empty-bus_stops-layer'); + cy.route('**/16301/10787**', 'fixture:bus_stops.json').as('bus_stops-layer'); + cy.route('**/16301/10788**', 'fixture:bus_stops.json').as('bus_stops-layer2'); cy.route('/report/new/ajax*').as('report-ajax'); cy.visit('http://northamptonshire.localhost:3001/'); cy.get('[name=pc]').type('NN1 2NS'); @@ -62,13 +62,13 @@ it('detects multiple assets at same location', function() { cy.get('#map_box').click(); cy.wait('@report-ajax'); - cy.get('[id=category_group]').select('Fallen Tree'); + cy.get('[id=category_group]').select('Shelter Damaged'); - cy.wait('@trees-layer'); - cy.wait('@trees-layer2'); - cy.wait('@empty-trees-layer'); + cy.wait('@bus_stops-layer'); + cy.wait('@bus_stops-layer2'); + cy.wait('@empty-bus_stops-layer'); - cy.contains('more than one tree at this location'); + cy.contains('more than one bus stop at this location'); }); it('shows the emergency message', function() { diff --git a/bin/fixmystreet.com/fixture b/bin/fixmystreet.com/fixture index 98b086eb2..53e0b142d 100755 --- a/bin/fixmystreet.com/fixture +++ b/bin/fixmystreet.com/fixture @@ -94,7 +94,7 @@ for my $cat ('Dropped Kerbs', 'Skips') { if ($opt->test_fixtures) { my $bodies; foreach ( - { area_id => 2234, categories => ['Fallen Tree', 'Very Urgent'], name => 'Northamptonshire County Council' }, + { area_id => 2234, categories => ['Shelter Damaged', 'Very Urgent'], name => 'Northamptonshire County Council' }, { area_id => 2217, categories => ['Flytipping', 'Roads', 'Parks'], name => 'Buckinghamshire County Council' }, { area_id => 2257, categories => ['Flytipping', 'Graffiti'], name => 'Chiltern District Council' }, { area_id => 2397, categories => [ 'Graffiti' ], name => 'Northampton Borough Council' }, |