diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-12 13:53:43 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-15 08:55:11 +0000 |
commit | b5c88eda2e87502872419edda10044c2d5b7c607 (patch) | |
tree | 7a98090f8e36835e70cab173c3927824927f1a3b /.cypress | |
parent | dbbf26e8ba5b41e3672566addfc7d67e9dc1af67 (diff) |
Add Cypress testing.
Diffstat (limited to '.cypress')
-rw-r--r-- | .cypress/.gitignore | 2 | ||||
-rw-r--r-- | .cypress/cypress.json | 4 | ||||
-rw-r--r-- | .cypress/cypress/integration/simple_spec.js | 16 |
3 files changed, 22 insertions, 0 deletions
diff --git a/.cypress/.gitignore b/.cypress/.gitignore new file mode 100644 index 000000000..f677bfcd7 --- /dev/null +++ b/.cypress/.gitignore @@ -0,0 +1,2 @@ +/cypress/videos +/cypress/screenshots diff --git a/.cypress/cypress.json b/.cypress/cypress.json new file mode 100644 index 000000000..dd3beceef --- /dev/null +++ b/.cypress/cypress.json @@ -0,0 +1,4 @@ +{ + "baseUrl": "http://localhost:3001", + "projectId": "y8vvs1" +} diff --git a/.cypress/cypress/integration/simple_spec.js b/.cypress/cypress/integration/simple_spec.js new file mode 100644 index 000000000..39000a022 --- /dev/null +++ b/.cypress/cypress/integration/simple_spec.js @@ -0,0 +1,16 @@ +describe('My First Test', function() { + it('Visits the home page', function() { + cy.visit('/'); + cy.contains('Go'); + cy.get('[name=pc]').type('BS10 5EE'); + cy.get('#postcodeForm').submit(); + cy.url().should('include', '/around'); + cy.get('#map_box').click(200, 200); + cy.get('[name=title]').type('Title'); + cy.get('[name=detail]').type('Detail'); + cy.get('[name=username]').type('user@example.org'); + cy.get('[name=password_sign_in]').type('password'); + cy.get('form').submit(); + cy.get('form').submit(); + }); +}); |