This is an automated email from the ASF dual-hosted git repository.

lizhimins pushed a commit to branch rocketmq-studio
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git


The following commit(s) were added to refs/heads/rocketmq-studio by this push:
     new 21d09842f test(web): stop two assertions from depending on antd motion 
timing (#6343)
21d09842f is described below

commit 21d09842f370398efad0cb37fe8df3a7670ce10e
Author: lizhimins <[email protected]>
AuthorDate: Mon Oct 12 16:52:44 2026 +0800

    test(web): stop two assertions from depending on antd motion timing (#6343)
    
    Two frontend tests passed in isolation and failed under the load of a 
full-suite run, because both depended on antd motion timing rather than on the 
behaviour they claim to pin.
    
    - `UserManagement.test.tsx` asserted synchronously that no dialog was left 
after the drawer closed, but rc-drawer keeps the node in the a11y tree until 
its timer-driven exit motion finishes. It failed three consecutive full-suite 
runs — and the same failure reproduces on the commit before #6113 landed, so it 
is not a regression from that change. Wrapped in `waitFor`, which still fails 
if the drawer genuinely stays open.
    - `K8sCertsPage.test.tsx` clicked an action button while the table's 
loading mask was still leaving and the buttons carried `pointer-events: none`. 
`userEvent.setup({ pointerEventsCheck: 0 })` is what the rest of the suite 
already uses for that case.
    
    Verified: 159 files / 1604 tests green in a full run, both files green in 
isolation, eslint and prettier clean.
---
 web/src/pages/cluster/__tests__/K8sCertsPage.test.tsx  | 4 +++-
 web/src/pages/studio/__tests__/UserManagement.test.tsx | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/web/src/pages/cluster/__tests__/K8sCertsPage.test.tsx 
b/web/src/pages/cluster/__tests__/K8sCertsPage.test.tsx
index 5ec63e8dd..e932ec10d 100644
--- a/web/src/pages/cluster/__tests__/K8sCertsPage.test.tsx
+++ b/web/src/pages/cluster/__tests__/K8sCertsPage.test.tsx
@@ -207,7 +207,9 @@ describe('K8sCertsPage', () => {
 
   it('deletes a certificate after confirmation', async () => {
     vi.mocked(deleteK8sCert).mockResolvedValue();
-    const user = userEvent.setup();
+    // The row is rendered before the table's loading mask finishes leaving, 
and while it does the
+    // action buttons carry `pointer-events: none`, so a strict pointer check 
flakes under load.
+    const user = userEvent.setup({ pointerEventsCheck: 0 });
     renderPage();
 
     await screen.findByText('rocketmq-prod-tls');
diff --git a/web/src/pages/studio/__tests__/UserManagement.test.tsx 
b/web/src/pages/studio/__tests__/UserManagement.test.tsx
index 858473782..cb75cd0c4 100644
--- a/web/src/pages/studio/__tests__/UserManagement.test.tsx
+++ b/web/src/pages/studio/__tests__/UserManagement.test.tsx
@@ -393,7 +393,10 @@ describe('UserManagementPage', () => {
     await act(async () => completeRevoke());
     await waitFor(() => expect(listStudioUsers).toHaveBeenCalledTimes(2));
     expect(listStudioUserSessions).toHaveBeenCalledTimes(1);
-    expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
+    // rc-drawer keeps the dialog node in the a11y tree until its exit motion 
finishes, and that
+    // motion is timer-driven: asserting synchronously passed in isolation and 
failed every
+    // full-suite run, where the timers lag behind the awaited reload.
+    await waitFor(() => 
expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
   });
 
   it('does not present a failed session read as an account without sessions', 
async () => {

Reply via email to