fix: make sure all tests pass

This commit is contained in:
thecodrr
2022-02-15 10:21:52 +05:00
parent f449fb6c33
commit 111ffa94ce
18 changed files with 125 additions and 100 deletions

View File

@@ -18,15 +18,15 @@ async function openContextMenu(selector) {
}
async function closeContextMenu() {
await page.click("body", { button: "left" });
await page.keyboard.press("Escape");
}
async function useContextMenu(selector, action) {
async function useContextMenu(selector, action, close = false) {
await openContextMenu(selector);
await action();
await closeContextMenu();
if (close) await closeContextMenu();
}
async function confirmDialog() {