aboutsummaryrefslogtreecommitdiffstats
path: root/.cypress/cypress/integration/borsetshire.js
diff options
context:
space:
mode:
Diffstat (limited to '.cypress/cypress/integration/borsetshire.js')
-rw-r--r--.cypress/cypress/integration/borsetshire.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/.cypress/cypress/integration/borsetshire.js b/.cypress/cypress/integration/borsetshire.js
new file mode 100644
index 000000000..e3529a9aa
--- /dev/null
+++ b/.cypress/cypress/integration/borsetshire.js
@@ -0,0 +1,23 @@
+it('loads the right front page', function() {
+ cy.visit('http://borsetshire.localhost:3001/');
+ cy.contains('Borsetshire');
+});
+
+it('logs in without fuss', function() {
+ cy.contains('Sign in').click();
+ cy.contains('Customer service').click();
+ cy.url().should('include', '/reports');
+
+ cy.contains('Your account').click();
+ cy.contains('Sign out').click();
+ cy.contains('Sign in').click();
+ cy.contains('Inspector').click();
+ cy.url().should('include', '/my/planned');
+
+ cy.visit('http://borsetshire.localhost:3001/auth');
+ cy.get('[name=username]').type('super@example.org');
+ cy.contains('Sign in with a password').click();
+ cy.get('[name=password_sign_in]').type('password');
+ cy.get('[name=sign_in_by_password]').last().click();
+ cy.url().should('include', '/admin');
+});