diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataTransformationsTab.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataTransformationsTab.test.tsx index fd6af7a8aa0..f975f7256a8 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataTransformationsTab.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataTransformationsTab.test.tsx @@ -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: {} },