From b7c688d3282d5156c74f9ac50e0780908c895965 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 27 May 2020 12:40:38 +0100 Subject: [PATCH] test e2e tests workaround Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/end-to-end-tests/src/usecases/join.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/end-to-end-tests/src/usecases/join.js b/test/end-to-end-tests/src/usecases/join.js index 655c0be686..10a48bd71c 100644 --- a/test/end-to-end-tests/src/usecases/join.js +++ b/test/end-to-end-tests/src/usecases/join.js @@ -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);