test e2e tests workaround

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-05-27 12:40:38 +01:00
parent 48de174576
commit b7c688d328

View file

@ -19,6 +19,15 @@ const {openRoomDirectory} = require('./create-room');
module.exports = async function join(session, roomName) {
session.log.step(`joins room "${roomName}"`);
while (true) {
try {
const toastDismissButton = await session.query('.mx_Toast_buttons .mx_AccessibleButton_kind_danger');
await toastDismissButton.click();
} catch (e) {
break;
}
}
await openRoomDirectory(session);
const roomInput = await session.query('.mx_DirectorySearchBox input');
await session.replaceInputText(roomInput, roomName);