feat: consolidate plugin navigation
This commit is contained in:
@@ -36,6 +36,8 @@ test.describe('Plugin Marketplace', () => {
|
||||
});
|
||||
|
||||
await page.getByTestId('sidebar-nav-plugin-marketplace').click();
|
||||
await expect(page.getByTestId('sidebar-nav-my-plugins')).toHaveCount(0);
|
||||
await expect(page.getByTestId('sidebar-nav-project-plugins')).toHaveCount(0);
|
||||
await expect(page.getByTestId('plugin-marketplace-page')).toBeVisible();
|
||||
await expect(page.getByRole('heading', { name: '灵感笔记' })).toBeVisible();
|
||||
await page.getByRole('searchbox', { name: '搜索插件' }).fill('笔记');
|
||||
@@ -116,6 +118,10 @@ test.describe('Plugin Marketplace', () => {
|
||||
return response;
|
||||
}
|
||||
if (requestPath === '/api/auth/me') return result({ success: true, moduleAccess: { programming: true } });
|
||||
if (requestPath.startsWith('/api/coding/plugin-marketplace/catalog')) return result({
|
||||
items: [], nextCursor: null, total: 0, catalogGeneration: 1,
|
||||
etag: '"plugins-1-tp-none"', pricingVersionId: null, stale: false, fetchedAt: 1,
|
||||
});
|
||||
if (requestPath === '/api/coding/plugin-marketplace/library') return result(projection());
|
||||
if (requestPath === '/api/coding/plugin-marketplace/install/makelore.notes/beta' && method === 'POST') {
|
||||
installedChannel = 'beta';
|
||||
@@ -149,7 +155,8 @@ test.describe('Plugin Marketplace', () => {
|
||||
await programmingOption.click();
|
||||
await expect(page.getByTestId('main-layout')).toBeVisible();
|
||||
await page.keyboard.press('Escape');
|
||||
await page.getByTestId('sidebar-nav-my-plugins').click();
|
||||
await page.getByTestId('sidebar-nav-plugin-marketplace').click();
|
||||
await page.getByRole('tab', { name: '我的插件' }).click();
|
||||
await expect(page.getByTestId('my-plugins-page')).toBeVisible();
|
||||
await expect.poll(async () => app.evaluate(() => (
|
||||
((globalThis as typeof globalThis & { __marketplaceE2E?: { requests: string[] } }).__marketplaceE2E?.requests ?? [])
|
||||
|
||||
@@ -51,8 +51,12 @@ test.describe('Project Plugin Center', () => {
|
||||
});
|
||||
});
|
||||
|
||||
await page.getByTestId('sidebar-nav-project-plugins').click();
|
||||
await page.getByTestId('resource-card-plugins').click();
|
||||
await expect(page.getByTestId('project-plugins-page')).toBeVisible();
|
||||
await page.getByTestId('project-plugins-page').getByRole('button', { name: '刷新' }).click();
|
||||
await expect.poll(async () => app.evaluate(() => (
|
||||
(globalThis as typeof globalThis & { __projectPluginE2E?: { localProjectId: string } }).__projectPluginE2E?.localProjectId
|
||||
))).toBeTruthy();
|
||||
await expect(page.getByText('当前包含,不按单次调用扣点')).toBeVisible();
|
||||
const localProjectId = await app.evaluate(() => (
|
||||
(globalThis as typeof globalThis & { __projectPluginE2E?: { localProjectId: string } }).__projectPluginE2E?.localProjectId
|
||||
|
||||
Reference in New Issue
Block a user