e2e test toasts v2
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
7b6d49c416
commit
d9552c7f5c
2 changed files with 12 additions and 12 deletions
|
@ -23,21 +23,13 @@ async function assertToast(session, expectedTitle) {
|
|||
}
|
||||
|
||||
async function acceptToast(session, expectedTitle) {
|
||||
const foundToast = await assertToast(session, expectedTitle);
|
||||
if (!foundToast) {
|
||||
throw new Error("could not find expected toast");
|
||||
}
|
||||
|
||||
await assertToast(session, expectedTitle);
|
||||
const btn = await session.query('.mx_Toast_buttons .mx_AccessibleButton_kind_primary');
|
||||
await btn.click();
|
||||
}
|
||||
|
||||
async function rejectToast(session, expectedTitle) {
|
||||
const foundToast = await assertToast(session, expectedTitle);
|
||||
if (!foundToast) {
|
||||
throw new Error("could not find expected toast");
|
||||
}
|
||||
|
||||
await assertToast(session, expectedTitle);
|
||||
const btn = await session.query('.mx_Toast_buttons .mx_AccessibleButton_kind_danger');
|
||||
await btn.click();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue