diff --git a/e2e/helpers/extensions.js b/e2e/helpers/extensions.js index 3a36eaa56..65c39268e 100644 --- a/e2e/helpers/extensions.js +++ b/e2e/helpers/extensions.js @@ -8,12 +8,12 @@ function child(selector, childNumber) { return selector.replace(aux[0], `${aux[0]}:nth-child(${childNumber})`); } -Nightmare.action('login', function(name, password, done) { +Nightmare.action('login', function(done) { try { this.goto(`${config.url}auth/?apiKey=salix`) .wait(`${components.textFieldInput}`) - .write(`${child(components.textFieldInput, 1)}`, name) - .write(`${child(components.textFieldInput, 2)}`, password) + .write(`${child(components.textFieldInput, 1)}`, 'nightmare') + .write(`${child(components.textFieldInput, 2)}`, 'nithmarePassword') .click(components.submitButton) .then(done); } catch (err) { diff --git a/e2e/paths/clients_path.spec.js b/e2e/paths/clients_path.spec.js index d7679e68f..f9bd00061 100644 --- a/e2e/paths/clients_path.spec.js +++ b/e2e/paths/clients_path.spec.js @@ -8,8 +8,8 @@ const nightmare = createNightmare(); describe('Clients path', () => { fit('should log in', done => { nightmare - .login('nightmare', 'NightmarePassword') - .wait(1000) + .login() + .wait(200) .url() .then(url => { expect(url).toBe(config.url + '#!/');