diff --git a/packages/ibm-products/src/components/SidePanel/SidePanel.test.js b/packages/ibm-products/src/components/SidePanel/SidePanel.test.js index 12cf981362..4692e9cc9d 100644 --- a/packages/ibm-products/src/components/SidePanel/SidePanel.test.js +++ b/packages/ibm-products/src/components/SidePanel/SidePanel.test.js @@ -223,9 +223,11 @@ describe('SidePanel', () => { ); const outerElement = container.querySelector(`.${blockClass}`); await act(() => userEvent.click(closeIconButton)); - fireEvent.animationStart(outerElement); - fireEvent.animationEnd(outerElement); - rerender(); + await act(() => fireEvent.animationStart(outerElement)); + await act(() => fireEvent.animationEnd(outerElement)); + await act(() => + rerender() + ); const updatedStyles = getComputedStyle(pageContent); expect(updatedStyles.marginInlineEnd).toBe('0'); });