Function: waitForElementToBeRemoved()
waitForElementToBeRemoved(
elementOrCallback,options?):Promise<void>
Defined in: wait-for.ts:84
Waits for an element to be removed from the widget tree.
Polls until the element no longer has a parent or no longer exists.
Parameters
| Parameter | Type | Description |
|---|---|---|
elementOrCallback | ElementOrCallback | Element or function returning element to watch |
options? | WaitForOptions | Timeout and interval configuration |
Returns
Promise<void>
Example
import { waitForElementToBeRemoved } from "@gtkx/testing";
const loader = await screen.findByRole(Gtk.AccessibleRole.PROGRESS_BAR);
await waitForElementToBeRemoved(loader);
// Loader is now gone