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

@ -17,6 +17,7 @@ limitations under the License.
const assert = require('assert');
module.exports = async function join(session, roomName) {
session.log.step(`joins room ${roomName}`);
//TODO: brittle selector
const directoryButton = await session.waitAndQuerySelector('.mx_RoleButton[aria-label="Room directory"]');
await directoryButton.click();
@ -31,4 +32,5 @@ module.exports = async function join(session, roomName) {
await joinLink.click();
await session.waitForSelector('.mx_MessageComposer');
session.log.done();
}