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/borsetshire.js | |
parent | 585e57484f9c6332668bf1ac0a6a3b39dbe32223 (diff) | |
parent | cea89fb87a96943708a1db0f646492fbfaaf000f (diff) |
Merge tag 'v3.1' into fiksgatami-devfiksgatami-dev
Diffstat (limited to '.cypress/cypress/integration/borsetshire.js')
-rw-r--r-- | .cypress/cypress/integration/borsetshire.js | 23 |
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'); +}); |