mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: fixing PanelDataTransformationsTab Test (#81329)
* fixing An update to Input inside a test was not wrapped in act(...). * no need to await twice * looks like we do need to await twice
This commit is contained in:
parent
7230ec88a1
commit
802012385d
@ -102,8 +102,9 @@ describe('PanelDataTransformationsTab', () => {
|
||||
selectors.components.TransformTab.newTransform('Add field from calculation')
|
||||
);
|
||||
const button = transformationCard.getElementsByTagName('button').item(0);
|
||||
|
||||
await userEvent.click(button!);
|
||||
await act(async () => {
|
||||
await userEvent.click(button!);
|
||||
});
|
||||
|
||||
expect(onChangeTransformation).toHaveBeenCalledWith([{ id: 'calculateField', options: {} }]);
|
||||
});
|
||||
@ -129,9 +130,9 @@ describe('PanelDataTransformationsTab', () => {
|
||||
selectors.components.TransformTab.newTransform('Add field from calculation')
|
||||
);
|
||||
const button = transformationCard.getElementsByTagName('button').item(0);
|
||||
|
||||
await userEvent.click(button!);
|
||||
|
||||
await act(async () => {
|
||||
await userEvent.click(button!);
|
||||
});
|
||||
expect(onChangeTransformation).toHaveBeenCalledWith([
|
||||
{ id: 'calculateField', options: {} },
|
||||
{ id: 'calculateField', options: {} },
|
||||
|
Loading…
Reference in New Issue
Block a user