MCPcopy Create free account
hub / github.com/Rello/analytics / waitForToast

Function waitForToast

tests/playwright/common.js:616–620  ·  view source on GitHub ↗
(page, timeout = 15000)

Source from the content-addressed store, hash-verified

614}
615
616async function waitForToast(page, timeout = 15000) {
617 const toast = page.locator('.toastify, [role="status"]:has(button[aria-label="Close"])').last();
618 await toast.waitFor({ state: 'visible', timeout });
619 return toast;
620}
621
622async function dismissToast(page) {
623 const closeButton = page.locator('.toast-close, [role="status"] button[aria-label="Close"]').last();

Callers 1

waitForToastAndDismissFunction · 0.85

Calls 1

lastMethod · 0.45

Tested by

no test coverage detected