salix/e2e/helpers.js

11 lines
513 B
JavaScript

import Nightmare from 'nightmare';
Nightmare.action('login', function(name, password, done) {
this.goto('http://localhost:5000/auth/?apiKey=salix')
.wait('body > vn-login > div > div > div > form > vn-textfield:nth-child(1) > div > input')
.type('body > vn-login > div > div > div > form > vn-textfield:nth-child(1) > div > input', name)
.type('body > vn-login > div > div > div > form > vn-textfield:nth-child(2) > div > input', password)
.click('input[type="submit"]')
.then(done);
});