From d36d48233ccb470a0f151ea9dd0f5576b5a60783 Mon Sep 17 00:00:00 2001 From: Alexander Melo Date: Mon, 16 Dec 2024 12:41:42 -0500 Subject: [PATCH] fix: sidepanel tests --- .../src/components/SidePanel/SidePanel.test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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'); });