diff --git a/components/drawer/__tests__/DrawerEvent.test.js b/components/drawer/__tests__/DrawerEvent.test.js index d5e9f18c5a..1d3219ac6b 100644 --- a/components/drawer/__tests__/DrawerEvent.test.js +++ b/components/drawer/__tests__/DrawerEvent.test.js @@ -88,21 +88,21 @@ describe('Drawer', () => { act(() => { jest.runAllTimers(); }); - fireEvent.animationEnd(container.querySelector('.ant-drawer-content')); - expect(container.querySelector('.ant-drawer-content-hidden')).toBeTruthy(); + fireEvent.animationEnd(container.querySelector('.ant-drawer-content-wrapper')); + expect(container.querySelector('.ant-drawer-content-wrapper-hidden')).toBeTruthy(); // Show rerender(getDrawer({ visible: true, getContainer: false })); - expect(container.querySelector('.ant-drawer-content')).toBeTruthy(); - expect(container.querySelector('.ant-drawer-content-hidden')).toBeFalsy(); + expect(container.querySelector('.ant-drawer-content-wrapper')).toBeTruthy(); + expect(container.querySelector('.ant-drawer-content-wrapper-hidden')).toBeFalsy(); // Hide rerender(getDrawer({ visible: false, getContainer: false })); act(() => { jest.runAllTimers(); }); - fireEvent.animationEnd(container.querySelector('.ant-drawer-content')); - expect(container.querySelector('.ant-drawer-content-hidden')).toBeTruthy(); + fireEvent.animationEnd(container.querySelector('.ant-drawer-content-wrapper')); + expect(container.querySelector('.ant-drawer-content-wrapper-hidden')).toBeTruthy(); }); it('test afterVisibleChange', async () => { @@ -113,7 +113,7 @@ describe('Drawer', () => { act(() => { jest.runAllTimers(); }); - fireEvent.animationEnd(container.querySelector('.ant-drawer-content')); + fireEvent.animationEnd(container.querySelector('.ant-drawer-content-wrapper')); expect(afterVisibleChange).toBeCalledTimes(1); }); diff --git a/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap b/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap index 8b734f11ad..a67cf551a7 100644 --- a/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap +++ b/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap @@ -15,7 +15,7 @@ exports[`Drawer className is test_drawer 1`] = ` tabindex="0" />