fix(plugins): make official plugins project-wide
This commit is contained in:
@@ -4,7 +4,7 @@ import path from 'node:path';
|
||||
import { closeElectronApp, expect, getStableWindow, test } from './fixtures/electron';
|
||||
|
||||
test.describe('Unified project plugin workspace', () => {
|
||||
test('enables and disables a project plugin without configuring it, then opens Agent assignment', async ({ launchElectronApp }) => {
|
||||
test('enables and disables a project-wide official plugin without configuring or assigning it', async ({ launchElectronApp }) => {
|
||||
const projectPath = await mkdtemp(path.join(tmpdir(), 'makelore-project-plugins-e2e-'));
|
||||
const app = await launchElectronApp({ skipSetup: true });
|
||||
try {
|
||||
@@ -94,6 +94,9 @@ test.describe('Unified project plugin workspace', () => {
|
||||
await expect(page).toHaveURL(/\/plugins\?scope=project/);
|
||||
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 localProjectId = await app.evaluate(() => (
|
||||
(globalThis as typeof globalThis & { __projectPluginE2E?: { localProjectId: string } }).__projectPluginE2E?.localProjectId
|
||||
));
|
||||
@@ -111,8 +114,6 @@ test.describe('Unified project plugin workspace', () => {
|
||||
await page.getByRole('button', { name: '确认从当前项目禁用' }).click();
|
||||
await expect(page.getByRole('button', { name: '启用开发数据服务到当前项目' })).toBeVisible();
|
||||
|
||||
await page.getByRole('button', { name: '分配开发数据服务给伙伴' }).click();
|
||||
await expect(page.getByTestId('project-configuration-page')).toBeVisible();
|
||||
const state = await app.evaluate(() => (
|
||||
(globalThis as typeof globalThis & {
|
||||
__projectPluginE2E?: { dataServiceCalls: number; mutations: Array<{ enabled: boolean; projectId: string }> };
|
||||
|
||||
Reference in New Issue
Block a user