fix(marketplace): close client review findings

This commit is contained in:
brother7 committed 2026-08-29 12:36:21 +08:00
1 parent 57962591de
commit 3df794c2e7
14 files changed
+840 -68

No files matched your search

@@ -154,6 +154,25 @@ describe('My Plugins', () => {
expect(screen.getByText('设备版本 1.5.0')).toBeVisible();
});
it('does not present a no-version unavailable projection as an installed device package', () => {
render(<MemoryRouter><MyPluginsView
library={{ ...library, items: [library.items[0]] }}
installations={{
'makelore.notes': {
status: 'unavailable', pluginId: 'makelore.notes', reason: 'plugin_incompatible_client',
},
}}
state="ready" pending={{}} onRefresh={vi.fn()} onInstall={vi.fn()} onUpdate={vi.fn()}
onInstallBeta={vi.fn()} onUninstall={vi.fn()} onRemove={vi.fn()} onReacquire={vi.fn()}
/></MemoryRouter>);
expect(screen.getByText('尚未下载到设备')).toBeVisible();
expect(screen.getByRole('button', { name: '下载灵感笔记' })).toBeVisible();
expect(screen.queryByRole('button', { name: '删除设备上的灵感笔记' })).not.toBeInTheDocument();
expect(screen.queryByText('设备版本已是最新')).not.toBeInTheDocument();
expect(screen.getByText(/当前 MakeLore 版本不兼容/)).toBeVisible();
});
it('honestly groups stable Main failure codes without claiming hidden authority', () => {
const { rerender } = render(<MemoryRouter><MyPluginsView
library={{ ...library, items: [library.items[0]] }} installations={{}} state="ready"