Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(skills): cover the explorer detail dialog for an entry that cannot be installed

M3gA-Mind82325a5d39db
diff --git a/app/src/components/skills/__tests__/SkillsExplorerTab.test.tsx b/app/src/components/skills/__tests__/SkillsExplorerTab.test.tsx
index 83e2e3ef99..3724d14c4c 100644
--- a/app/src/components/skills/__tests__/SkillsExplorerTab.test.tsx
+++ b/app/src/components/skills/__tests__/SkillsExplorerTab.test.tsx
@@ -645,6 +645,34 @@ describe('SkillsExplorerTab', () => {
expect(screen.queryByTestId('registry-install-lobehub/prompt-agent')).toBeNull();
});
+ it('explains in the detail dialog why an entry with no SKILL.md download cannot be installed', async () => {
+ const { skillsApi } = await import('../../../services/api/skillsApi');
+ const { skillRegistryApi } = await import('../../../services/api/skillRegistryApi');
+ vi.mocked(skillsApi.listWorkflows).mockResolvedValue([]);
+ vi.mocked(skillRegistryApi.browse).mockResolvedValue([
+ {
+ ...MOCK_CATALOG_ENTRY,
+ id: 'lobehub/prompt-agent',
+ name: 'Prompt Agent',
+ source: 'LobeHub',
+ download_url: '',
+ },
+ ]);
+
+ render(<SkillsExplorerTab />);
+
+ const tile = await screen.findByTestId('registry-tile-lobehub/prompt-agent');
+ await act(async () => {
+ fireEvent.click(tile);
+ });
+
+ const hint = await screen.findByText(
+ 'This entry has no SKILL.md to download, so it cannot be installed from here.'
+ );
+ expect(hint.closest('[data-slot="dialog-content"]')).not.toBeNull();
+ expect(screen.queryByRole('button', { name: 'Install' })).toBeNull();
+ });
+
it('shows error toast when registry install fails', async () => {
const { skillsApi } = await import('../../../services/api/skillsApi');
const { skillRegistryApi } = await import('../../../services/api/skillRegistryApi');