aboutsummaryrefslogtreecommitdiffstats
path: root/.cypress/cypress/integration/oxfordshire.js
diff options
context:
space:
mode:
Diffstat (limited to '.cypress/cypress/integration/oxfordshire.js')
-rw-r--r--.cypress/cypress/integration/oxfordshire.js25
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');
+ });
+});