Skip to content

Commit

Permalink
fix: wait for grid row Timeout is optional (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
matttdawson authored Aug 16, 2023
1 parent 5e31ec1 commit 4e33f40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ export const clickActionButton = async (text: string, container?: HTMLElement):
await user.click(button);
};

export const waitForGridReady = async (props?: { grid?: HTMLElement; timeout: number }) =>
export const waitForGridReady = async (props?: { grid?: HTMLElement; timeout?: number }) =>
waitFor(() => expect(getAllQuick({ classes: ".Grid-ready" }, props?.grid)).toBeInTheDocument(), {
timeout: props?.timeout ?? 5000,
});

export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout: number }) =>
export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: number }) =>
waitFor(async () => expect(getAllQuick({ classes: ".ag-row" }, props?.grid).length > 0).toBe(true), {
timeout: props?.timeout ?? 5000,
});

0 comments on commit 4e33f40

Please sign in to comment.