test e2e tests workaround

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-05-27 12:40:38 +01:00
parent 48de174576
commit b7c688d328
1 changed files with 9 additions and 0 deletions

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);