mirror of
https://github.com/element-hq/element-web
synced 2024-10-23 11:15:47 +03:00
fix assertNoToasts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
61066b0c4c
commit
91811581bc
1 changed files with 6 additions and 2 deletions
|
@ -17,8 +17,12 @@ limitations under the License.
|
|||
const assert = require('assert');
|
||||
|
||||
async function assertNoToasts(session) {
|
||||
const toast = await session.query('.mx_Toast_toast');
|
||||
assert(!toast, 'toast found when none expected');
|
||||
try {
|
||||
await session.query('.mx_Toast_toast');
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
throw new Error('toast found when none expected');
|
||||
}
|
||||
|
||||
async function assertToast(session, expectedTitle) {
|
||||
|
|
Loading…
Reference in a new issue