Skip to content

Commit 3a3bc04

Browse files
committed
Fix tests
1 parent 8a0f79e commit 3a3bc04

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

plugins/dev-ai-hub/src/components/AssetCard/AssetCard.test.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ jest.mock('../ToolIcon', () => ({
77
ToolIcon: ({ tool }: { tool: string }) => <span data-testid={`tool-icon-${tool}`} />,
88
}));
99

10+
jest.mock('../../context/UiConfigContext', () => ({
11+
useTypeConfig: () => ({
12+
typeColors: {
13+
instruction: '#2563EB',
14+
agent: '#7C3AED',
15+
skill: '#059669',
16+
workflow: '#D97706',
17+
prompt: '#EC4899',
18+
bundle: '#8B5CF6',
19+
},
20+
statsCards: ['instruction', 'agent', 'skill', 'workflow'],
21+
}),
22+
}));
23+
1024
jest.mock('@backstage/frontend-plugin-api', () => ({
1125
...jest.requireActual('@backstage/frontend-plugin-api'),
1226
useTranslationRef: () => ({
@@ -265,4 +279,4 @@ describe('AssetCard', () => {
265279
expect(screen.getByText('Universal')).toBeInTheDocument();
266280
});
267281
});
268-
});
282+
});

0 commit comments

Comments
 (0)