feat(project-config): simplify plugin and model drawers

This commit is contained in:
inman
2026-09-07 14:58:30 +08:00
parent 918f8f80dc
commit d278785da8
16 changed files with 583 additions and 709 deletions

View File

@@ -1,7 +1,6 @@
import { describe, expect, it, vi } from 'vitest';
import {
dispatchPluginWorkspaceCommand,
settlePluginWorkspaceLoads,
type PluginWorkspaceDispatchDependencies,
} from '@/pages/Plugins/plugin-workspace-controller';
import type { PluginWorkspaceCommand } from '@/pages/Plugins/plugin-workspace-model';
@@ -70,19 +69,4 @@ describe('plugin workspace controller', () => {
]);
expect(deps.openSettings).toHaveBeenCalledExactlyOnceWith();
});
it('starts every available source load even when one source rejects', async () => {
const catalog = vi.fn().mockRejectedValue(new Error('catalog offline'));
const library = vi.fn().mockResolvedValue(undefined);
const device = vi.fn().mockResolvedValue(undefined);
const project = vi.fn().mockResolvedValue(undefined);
const results = await settlePluginWorkspaceLoads({ catalog, library, device, project });
expect(catalog).toHaveBeenCalledOnce();
expect(library).toHaveBeenCalledOnce();
expect(device).toHaveBeenCalledOnce();
expect(project).toHaveBeenCalledOnce();
expect(results.map(({ status }) => status)).toEqual(['rejected', 'fulfilled', 'fulfilled', 'fulfilled']);
});
});