aboutsummaryrefslogtreecommitdiffstats
path: root/.cypress/cypress/integration/isleofwight.js
blob: ab7039a5fd849200078e0a90b60d917cb23d1a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
describe('When you look at the Island Roads site', function() {

  beforeEach(function() {
    cy.server();
    cy.fixture('roads.xml');
    cy.route('/report/new/ajax*').as('report-ajax');
    cy.visit('http://isleofwight.localhost:3001/');
    cy.contains('Island Roads');
    cy.get('[name=pc]').type('PO30 5XJ');
    cy.get('[name=pc]').parents('form').submit();
  });

  it('uses the correct name', function() {
    cy.get('#map_box').click();
    cy.wait('@report-ajax');
    cy.get('select:eq(4)').select('Potholes');
    cy.contains('sent to Island Roads');
    cy.get('select:eq(4)').select('Private');
    cy.contains('sent to Island Roads');
    cy.get('select:eq(4)').select('Extra');
    cy.contains('Help Island Roads');
  });
});