include queryByTestId within await call
This commit is contained in:
parent
6be6a4289e
commit
47c80eb3f5
1 changed files with 3 additions and 3 deletions
|
|
@ -57,10 +57,10 @@ describe('OutgoingWebhooks', () => {
|
|||
test('It renders all retrieved webhooks', async () => {
|
||||
render(<OutgoingWebhooks {...getProps()} />);
|
||||
|
||||
const gTable = screen.queryByTestId('test__gTable');
|
||||
const rows = gTable.querySelectorAll('tbody tr');
|
||||
|
||||
await waitFor(() => {
|
||||
const gTable = screen.queryByTestId('test__gTable');
|
||||
const rows = gTable.querySelectorAll('tbody tr');
|
||||
|
||||
expect(() => queryEditForm()).toThrow(); // edit doesn't show for [id=undefined]
|
||||
expect(rows.length).toBe(outgoingWebhooks.length);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue