Copilot commented on code in PR #881:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/881#discussion_r3705486862


##########
web/src/pages/instance/__tests__/MessagePage.test.tsx:
##########
@@ -213,4 +226,22 @@ describe('Message page query history', () => {
     expect(screen.queryByText(/invalid/)).not.toBeInTheDocument();
     expect(screen.queryByText(/order-create/)).not.toBeInTheDocument();
   });
+
+  it('does not report consume verification success without a backend API', 
async () => {
+    const user = userEvent.setup();
+    
messageServiceMocks.queryMessages.mockResolvedValue([createMessage('MID-CONSUME-VERIFY-001')]);
+    renderWithProviders(<MessagePage />);
+
+    await user.click(screen.getByText('按 Message ID'));
+    await user.type(screen.getByPlaceholderText('输入 Message ID'), 
'MID-CONSUME-VERIFY-001');
+    await user.click(screen.getByRole('button', { name: /^search查询$/ }));

Review Comment:
   This selector is brittle because it depends on the accessible-name 
composition (`search查询`), which can change with icon accessibility behavior or 
library updates. Prefer selecting the button by its visible label (e.g., name: 
'查询') or by a stable test id to reduce test flakiness.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to