Skip to content

Commit b56865f

Browse files
Copilothotlong
andcommitted
fix: update console test mocks to include useObjectLabel
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 88d95d9 commit b56865f

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

apps/console/src/__tests__/AppSidebar.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ vi.mock('@object-ui/i18n', () => ({
9898
direction: 'ltr',
9999
i18n: {},
100100
}),
101+
useObjectLabel: () => ({
102+
objectLabel: (obj: any) => obj.label,
103+
objectDescription: (obj: any) => obj.description,
104+
fieldLabel: (_objectName: string, _fieldName: string, fallback: string) => fallback,
105+
}),
101106
}));
102107

103108
// Mock @object-ui/components to keep most components but simplify some

apps/console/src/__tests__/app-creation-integration.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ vi.mock('@object-ui/i18n', () => ({
268268
language: 'en',
269269
direction: 'ltr',
270270
}),
271+
useObjectLabel: () => ({
272+
objectLabel: (obj: any) => obj.label,
273+
objectDescription: (obj: any) => obj.description,
274+
fieldLabel: (_objectName: string, _fieldName: string, fallback: string) => fallback,
275+
}),
271276
}));
272277

273278
describe('Console App Creation Integration', () => {

0 commit comments

Comments
 (0)