move step logging to tests, DRY; put test scenario in separate file, less globals

This commit is contained in:
Bruno Windels 2018-08-07 17:58:58 +02:00
parent 5fe3861190
commit 4e7df2126b
6 changed files with 90 additions and 63 deletions

View file

@ -18,6 +18,7 @@ const acceptTerms = require('./consent');
const assert = require('assert');
module.exports = async function signup(session, username, password, homeserver) {
session.log.step("signs up");
await session.goto(session.riotUrl('/#/register'));
//click 'Custom server' radio button
if (homeserver) {
@ -64,4 +65,5 @@ module.exports = async function signup(session, username, password, homeserver)
const url = session.page.url();
assert.strictEqual(url, session.riotUrl('/#/home'));
session.log.done();
}