diff options
author | Marius Halden <marius.h@lden.org> | 2021-10-07 13:32:40 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2021-10-07 13:32:40 +0200 |
commit | 09dacfc6b8bf62addeee16c20b1d90c2a256da96 (patch) | |
tree | 7caa2bf9e92227ab74448f9b746dd28bbcb81b2a /.cypress/cypress/integration/oxfordshire.js | |
parent | 585e57484f9c6332668bf1ac0a6a3b39dbe32223 (diff) | |
parent | cea89fb87a96943708a1db0f646492fbfaaf000f (diff) |
Merge tag 'v3.1' into fiksgatami-devfiksgatami-dev
Diffstat (limited to '.cypress/cypress/integration/oxfordshire.js')
-rw-r--r-- | .cypress/cypress/integration/oxfordshire.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.cypress/cypress/integration/oxfordshire.js b/.cypress/cypress/integration/oxfordshire.js new file mode 100644 index 000000000..f235802e6 --- /dev/null +++ b/.cypress/cypress/integration/oxfordshire.js @@ -0,0 +1,25 @@ +describe("Oxfordshire cobrand", function() { + it("allows inspectors to instruct defects", function() { + cy.server(); + cy.request({ + method: 'POST', + url: 'http://oxfordshire.localhost:3001/auth', + form: true, + body: { username: 'inspector-instructor@example.org', password_sign_in: 'password' } + }); + cy.visit('http://oxfordshire.localhost:3001/report/1'); + cy.contains('Oxfordshire'); + + cy.get('#report_inspect_form').should('be.visible'); + cy.get('#js-inspect-action-scheduled').should('not.be.visible'); + cy.get('#raise_defect_yes').should('not.have.attr', 'required'); + + cy.get('#report_inspect_form select[name=state]').select('Action scheduled'); + cy.get('#js-inspect-action-scheduled').should('be.visible'); + cy.get('#raise_defect_yes').should('have.attr', 'required', 'required'); + + cy.get('#report_inspect_form select[name=state]').select('No further action'); + cy.get('#js-inspect-action-scheduled').should('not.be.visible'); + cy.get('#raise_defect_yes').should('not.have.attr', 'required'); + }); +}); |