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
commit 5aa12e25996e5954a02284f4a2b60dab88b96e9e 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 ba7a7697..c10952c1 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 618014cc..6e679728 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', () => {
