X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2f83fcd45b4b23db2bb5bb4afbe1e863ebd77ec6..67068b56fcbe322f04d0107dc6c19a6b12e248fa:/services/workbench2/cypress/integration/login.spec.js diff --git a/services/workbench2/cypress/integration/login.spec.js b/services/workbench2/cypress/integration/login.spec.js index 2c539e4902..79f73670a3 100644 --- a/services/workbench2/cypress/integration/login.spec.js +++ b/services/workbench2/cypress/integration/login.spec.js @@ -27,17 +27,10 @@ describe('Login tests', function() { .as('inactiveUser').then(function() { inactiveUser = this.inactiveUser; } - ); - randomUser.username = `randomuser${Math.floor(Math.random() * 999999)}`; - randomUser.password = { - crypt: 'zpAReoZzPnwmQ', - clear: 'topsecret', - }; - cy.exec(`useradd ${randomUser.username} -p ${randomUser.password.crypt}`); - }) - - after(function() { - cy.exec(`userdel ${randomUser.username}`); + ); + // Username/password match Login.Test section of arvados_config.yml + randomUser.username = 'randomuser1234'; + randomUser.password = 'topsecret'; }) beforeEach(function() { @@ -128,14 +121,14 @@ describe('Login tests', function() { cy.get('#username').type(randomUser.username); cy.get('#password').type('wrong password'); cy.get("button span:contains('Log in')").click(); - cy.get('p#password-helper-text').should('contain', 'PAM: Authentication failure'); + cy.get('p#password-helper-text').should('contain', 'authentication failed'); cy.url().should('not.contain', '/projects/'); }) it('successfully authenticates using the login form', function() { cy.visit('/'); cy.get('#username').type(randomUser.username); - cy.get('#password').type(randomUser.password.clear); + cy.get('#password').type(randomUser.password); cy.get("button span:contains('Log in')").click(); cy.url().should('contain', '/projects/'); cy.get('div#root').should('contain', 'Arvados Workbench (zzzzz)');