feat: move plugin center into project configuration

This commit is contained in:
inman
2026-08-31 16:57:26 +08:00
parent b3f4166f21
commit e237941399
13 changed files with 260 additions and 103 deletions

View File

@@ -3,7 +3,7 @@ import { tmpdir } from 'node:os';
import path from 'node:path';
import { closeElectronApp, expect, getStableWindow, test } from './fixtures/electron';
test.describe('Project Plugin Center', () => {
test.describe('Project Plugin Services', () => {
test('enables selection without configuring Data Service or duplicating project IDs', async ({ launchElectronApp }) => {
const projectPath = await mkdtemp(path.join(tmpdir(), 'makelore-project-plugins-e2e-'));
const app = await launchElectronApp({ skipSetup: true });
@@ -52,6 +52,11 @@ test.describe('Project Plugin Center', () => {
});
await page.getByTestId('resource-card-plugins').click();
await expect(page.getByRole('dialog', { name: '插件服务' })).toBeVisible();
await expect(page.getByRole('tab', { name: '发现插件' })).toBeVisible();
await expect(page.getByRole('tab', { name: '我的插件' })).toBeVisible();
await expect(page.getByRole('tab', { name: '项目启用' })).toHaveAttribute('aria-selected', 'true');
await expect(page.getByTestId('sidebar-nav-plugin-marketplace')).toHaveCount(0);
await expect(page.getByTestId('project-plugins-page')).toBeVisible();
await page.getByTestId('project-plugins-page').getByRole('button', { name: '刷新' }).click();
await expect.poll(async () => app.evaluate(() => (