feat: consolidate plugin navigation
This commit is contained in:
@@ -92,4 +92,14 @@ describe('Project Plugin Center', () => {
|
||||
fireEvent.click(screen.getByRole('button', { name: '从项目禁用保留插件 makelore.removed' }));
|
||||
expect(onSetEnabled).toHaveBeenCalledWith('makelore.removed', false);
|
||||
});
|
||||
|
||||
it('embeds project enablement in configuration and returns to Agent assignment explicitly', () => {
|
||||
const onManageAgents = vi.fn();
|
||||
render(<MemoryRouter><ProjectPluginsView embedded projectName="Demo" projection={projection()} dataService={null} pending={{}} agentNames={{}} onRefresh={vi.fn()} onSetEnabled={vi.fn()} onConfigure={vi.fn()} onReset={vi.fn()} onRemoveCollection={vi.fn()} onRemoveProject={vi.fn()} onManageAgents={onManageAgents} /></MemoryRouter>);
|
||||
|
||||
expect(screen.getByTestId('project-plugins-page').tagName).toBe('SECTION');
|
||||
expect(screen.queryByRole('heading', { name: '项目插件' })).not.toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '分配给伙伴' }));
|
||||
expect(onManageAgents).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user