(
page: Page,
selector: string,
amount: number
)
| 31 | page.waitForFunction((_selector: string) => !document.querySelector(_selector), {}, selector); |
| 32 | |
| 33 | export const waitForCount = async ( |
| 34 | page: Page, |
| 35 | selector: string, |
| 36 | amount: number |
| 37 | ): Promise<JSHandle> => |
| 38 | page.waitForFunction( |
| 39 | (_selector: string, _amount: number) => |
| 40 | document.querySelectorAll(_selector).length === _amount, |
| 41 | {}, |
| 42 | selector, |
| 43 | amount |
| 44 | ); |
| 45 | |
| 46 | export const waitForExists = async (page: Page, selector: string, text: string): Promise<void> => { |
| 47 | text = text.toLowerCase(); |
no outgoing calls
searching dependent graphs…