MCPcopy Create free account
hub / github.com/gotify/server / waitForCount

Function waitForCount

ui/src/tests/utils.ts:33–44  ·  view source on GitHub ↗
(
    page: Page,
    selector: string,
    amount: number
)

Source from the content-addressed store, hash-verified

31 page.waitForFunction((_selector: string) => !document.querySelector(_selector), {}, selector);
32
33export 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
46export const waitForExists = async (page: Page, selector: string, text: string): Promise<void> => {
47 text = text.toLowerCase();

Callers 3

extractMessagesFunction · 0.90
hasReceivedMessageFunction · 0.90
plugin.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 2

extractMessagesFunction · 0.72
hasReceivedMessageFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…