mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Lens] remove warnings when running tests (#95637)
This commit is contained in:
parent
e4e4a01298
commit
a1748cb3a7
1 changed files with 4 additions and 3 deletions
|
@ -827,7 +827,7 @@ describe('IndexPattern Data Panel', () => {
|
|||
});
|
||||
|
||||
// wait for indx pattern to be loaded
|
||||
await new Promise((r) => setTimeout(r, 0));
|
||||
await act(async () => await new Promise((r) => setTimeout(r, 0)));
|
||||
|
||||
expect(props.indexPatternFieldEditor.openEditor).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
@ -860,10 +860,11 @@ describe('IndexPattern Data Panel', () => {
|
|||
.prop('children') as ReactElement).props.items[0].props.onClick();
|
||||
});
|
||||
// wait for indx pattern to be loaded
|
||||
await new Promise((r) => setTimeout(r, 0));
|
||||
await act(async () => await new Promise((r) => setTimeout(r, 0)));
|
||||
|
||||
await (props.indexPatternFieldEditor.openEditor as jest.Mock).mock.calls[0][0].onSave();
|
||||
// wait for indx pattern to be loaded
|
||||
await new Promise((r) => setTimeout(r, 0));
|
||||
await act(async () => await new Promise((r) => setTimeout(r, 0)));
|
||||
expect(props.onUpdateIndexPattern).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
fields: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue