fix: close plugin workspace acceptance gaps

This commit is contained in:
2026-09-03 14:29:21 +08:00
parent 1b1f206dd8
commit c5020ae22c
10 changed files with 885 additions and 53 deletions

View File

@@ -44,6 +44,7 @@ describe('plugin workspace controller', () => {
{ kind: 'enable_local', packageId: 'j' },
{ kind: 'disable_local', packageId: 'k' },
{ kind: 'remove_local', packageId: 'l' },
{ kind: 'sign_in' },
{ kind: 'open_agent_assignment', projectId: 'project-a', pluginId: 'm' },
{ kind: 'open_settings', projectId: 'project-a', pluginId: 'n' },
] satisfies readonly PluginWorkspaceCommand[];
@@ -62,7 +63,7 @@ describe('plugin workspace controller', () => {
]);
expect(deps.device.setEnabled.mock.calls).toEqual([['j', true], ['k', false]]);
expect(deps.device.uninstall).toHaveBeenCalledExactlyOnceWith('l');
expect(deps.navigate).toHaveBeenCalledExactlyOnceWith('/project-config');
expect(deps.navigate.mock.calls).toEqual([['/login'], ['/project-config']]);
expect(deps.openSettings).toHaveBeenCalledExactlyOnceWith();
});