more testing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-05-27 15:18:43 +01:00
parent cb07fa53f4
commit e35c9d5bbf
3 changed files with 42 additions and 13 deletions

View file

@ -22,7 +22,10 @@ async function assertNoToasts(session) {
} catch (e) {
return;
}
throw new Error('toast found when none expected');
const h2Element = await session.query('.mx_Toast_title h2');
const toastTitle = await session.innerText(h2Element);
throw new Error(`"${toastTitle}" toast found when none expected`);
}
async function assertToast(session, expectedTitle) {