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');
|
const assert = require('assert');
|
||||||
|
|
||||||
async function assertNoToasts(session) {
|
async function assertNoToasts(session) {
|
||||||
const toast = await session.query('.mx_Toast_toast');
|
try {
|
||||||
assert(!toast, 'toast found when none expected');
|
await session.query('.mx_Toast_toast');
|
||||||
|
} catch (e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new Error('toast found when none expected');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function assertToast(session, expectedTitle) {
|
async function assertToast(session, expectedTitle) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue