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 87f70c3 test: fix frontend baseline assertions (#498)
87f70c3 is described below
commit 87f70c3c9e782c6bc1d771897a2fd7bed2fd0eaf
Author: aias00 <[email protected]>
AuthorDate: Thu Jul 23 22:42:23 2026 -0700
test: fix frontend baseline assertions (#498)
Fix test assertions to align with backend PageResult contract and current
i18n labels.
---
web/src/api/ops.test.ts | 6 +++++-
web/src/pages/studio/__tests__/BrokerCluster.test.tsx | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/web/src/api/ops.test.ts b/web/src/api/ops.test.ts
index ba7a769..c10952c 100644
--- a/web/src/api/ops.test.ts
+++ b/web/src/api/ops.test.ts
@@ -218,7 +218,7 @@ describe('Ops API - System Alerts & Audit', () => {
mock.onGet('/audit-logs').reply(200, {
code: 200,
data: {
- list: [
+ items: [
{
id: 'r1',
timestamp: '2026-01-01',
@@ -231,11 +231,15 @@ describe('Ops API - System Alerts & Audit', () => {
},
],
total: 1,
+ page: 1,
+ size: 20,
},
});
const result = await listAuditRecords({ page: 1 });
expect(result.items).toHaveLength(1);
expect(result.total).toBe(1);
+ expect(result.page).toBe(1);
+ expect(result.size).toBe(20);
});
it('cleans up audit logs', async () => {
diff --git a/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
b/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
index 618014c..6e67972 100644
--- a/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
+++ b/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
@@ -56,12 +56,12 @@ const renderWithProviders = (ui: React.ReactElement) => {
describe('BrokerCluster Page', () => {
it('should render the page title', () => {
renderWithProviders(<BrokerCluster />);
- expect(screen.getByText('RocketMQ 集群')).toBeInTheDocument();
+ expect(screen.getByText('Broker 集群')).toBeInTheDocument();
});
it('should render create cluster button', () => {
renderWithProviders(<BrokerCluster />);
- expect(screen.getByText('新建集群')).toBeInTheDocument();
+ expect(screen.getByText('创建集群')).toBeInTheDocument();
});
it('should render reset button', () => {