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

@@ -103,10 +103,11 @@ test.describe('Unified project plugin workspace', () => {
includeHidden: true,
})).toBeAttached();
await page.getByRole('button', { name: '查看开发数据服务详情' }).click();
await expect(page.getByText('按平台包含,不按单次插件调用扣点。')).toBeVisible();
await expect(page.getByRole('heading', { name: '生效范围' })).toBeVisible();
await expect(page.getByText(/启用当前项目后.*无需单独分配/)).toBeVisible();
await expect(page.getByRole('button', { name: '分配开发数据服务给伙伴' })).toHaveCount(0);
const pluginDialog = page.getByRole('dialog', { name: '开发数据服务' });
await expect(pluginDialog).toContainText('为当前项目提供数据。');
await expect(pluginDialog).not.toContainText('Token Point');
await expect(pluginDialog).not.toContainText('data-service.control');
await expect(page.getByRole('button', { name: '将开发数据服务分配给智能体' })).toHaveCount(0);
const localProjectId = await app.evaluate(() => (
(globalThis as typeof globalThis & { __projectPluginE2E?: { localProjectId: string } }).__projectPluginE2E?.localProjectId
));
@@ -114,15 +115,15 @@ test.describe('Unified project plugin workspace', () => {
await expect(page.getByText(localProjectId as string)).toHaveCount(0);
await expect(page.getByText('11111111-1111-4111-8111-111111111111')).toHaveCount(0);
await page.getByRole('button', { name: '启用开发数据服务到当前项目' }).click();
await expect(page.getByRole('button', { name: '从当前项目禁用开发数据服务' })).toBeVisible();
await expect(page.getByText('插件专属设置')).toBeVisible();
await page.getByRole('button', { name: '将开发数据服务添加到项目' }).click();
await expect(page.getByRole('button', { name: '从项目移除开发数据服务' })).toBeVisible();
await expect(page.getByText('使用设置')).toBeVisible();
await expect(page.getByRole('button', { name: '创建开发数据空间' })).toBeDisabled();
await page.getByRole('button', { name: '从当前项目禁用开发数据服务' }).click();
await expect(page.getByRole('alertdialog')).toContainText('从当前项目禁用开发数据服务');
await page.getByRole('button', { name: '确认从当前项目禁用' }).click();
await expect(page.getByRole('button', { name: '启用开发数据服务到当前项目' })).toBeVisible();
await page.getByRole('button', { name: '从项目移除开发数据服务' }).click();
await expect(page.getByRole('alertdialog')).toContainText('从当前项目移除开发数据服务');
await page.getByRole('button', { name: '确认从项目移除' }).click();
await expect(page.getByRole('button', { name: '将开发数据服务添加到项目' })).toBeVisible();
const state = await app.evaluate(() => (
(globalThis as typeof globalThis & {