feat: remove Learning module
This commit is contained in:
@@ -231,7 +231,7 @@ test.describe('AI Design V2 workspace', () => {
|
||||
e2eGlobal.__designE2eAuthReady = true;
|
||||
return respond({
|
||||
success: true,
|
||||
moduleAccess: { programming: true, design: true, learning: true, robot: true },
|
||||
moduleAccess: { programming: true, design: true, robot: true },
|
||||
});
|
||||
}
|
||||
if (path === '/api/works/user/agent-profile') {
|
||||
@@ -389,7 +389,7 @@ test.describe('AI Design V2 workspace', () => {
|
||||
deptId: null,
|
||||
authorities: [],
|
||||
},
|
||||
moduleAccess: { programming: true, design: true, learning: true, robot: true },
|
||||
moduleAccess: { programming: true, design: true, robot: true },
|
||||
},
|
||||
version: 2,
|
||||
}));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { closeElectronApp, expect, getStableWindow, test } from './fixtures/electron';
|
||||
|
||||
test.describe('Makelore module navigation without setup flow', () => {
|
||||
test('keeps the four module entries in a proportional vertical stack while resizing the window', async ({ launchElectronApp }) => {
|
||||
test('keeps the three module entries in a proportional vertical stack while resizing the window', async ({ launchElectronApp }) => {
|
||||
const app = await launchElectronApp({ skipSetup: true });
|
||||
|
||||
try {
|
||||
@@ -23,7 +23,7 @@ test.describe('Makelore module navigation without setup flow', () => {
|
||||
}));
|
||||
|
||||
const initialMetrics = await readCardMetrics();
|
||||
expect(initialMetrics).toHaveLength(4);
|
||||
expect(initialMetrics).toHaveLength(3);
|
||||
await expect(moduleCards.first().locator('.module-option-card-arrow')).toHaveCount(0);
|
||||
await expect(moduleCards.first().locator('.module-option-artwork')).toHaveCount(0);
|
||||
await expect.poll(async () => await moduleCards.first().evaluate((element) => {
|
||||
@@ -75,7 +75,7 @@ test.describe('Makelore module navigation without setup flow', () => {
|
||||
await expect.poll(async () => (await readCardMetrics())[0]?.width ?? 0).toBeLessThan(initialWidth - 1);
|
||||
|
||||
const resizedMetrics = await readCardMetrics();
|
||||
expect(resizedMetrics).toHaveLength(4);
|
||||
expect(resizedMetrics).toHaveLength(3);
|
||||
expect(Math.max(...resizedMetrics.map((card) => card.left)) - Math.min(...resizedMetrics.map((card) => card.left))).toBeLessThan(1);
|
||||
expect(resizedMetrics.map((card) => card.top)).toEqual(
|
||||
[...resizedMetrics].sort((top, bottom) => top.top - bottom.top).map((card) => card.top),
|
||||
@@ -108,23 +108,18 @@ test.describe('Makelore module navigation without setup flow', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('opens Learning from the module chooser and returns through the module switcher', async ({ launchElectronApp }) => {
|
||||
test('omits Learning from the module chooser and redirects its retired route', async ({ launchElectronApp }) => {
|
||||
const app = await launchElectronApp({ skipSetup: true });
|
||||
|
||||
try {
|
||||
const page = await getStableWindow(app);
|
||||
await expect(page.getByTestId('ai-module-selection-page')).toBeVisible();
|
||||
|
||||
const learningOption = page.getByTestId('ai-module-option-learning');
|
||||
await expect(learningOption).toBeVisible();
|
||||
await expect(learningOption).toBeEnabled();
|
||||
await learningOption.click();
|
||||
|
||||
await expect(page).toHaveURL(/\/learning$/);
|
||||
await expect(page.getByTestId('learning-home')).toBeVisible();
|
||||
await expect(page.getByRole('heading', { name: '学习项目' })).toBeVisible();
|
||||
|
||||
await page.getByTestId('sidebar-module-switcher-trigger').click();
|
||||
await expect(page.locator('[data-testid^="ai-module-option-"]')).toHaveCount(3);
|
||||
await expect(page.getByTestId('ai-module-option-learning')).toHaveCount(0);
|
||||
await page.evaluate(() => {
|
||||
window.location.hash = '#/learning';
|
||||
});
|
||||
await expect(page).toHaveURL(/\/module-select$/);
|
||||
await expect(page.getByTestId('ai-module-selection-page')).toBeVisible();
|
||||
} finally {
|
||||
|
||||
@@ -47,7 +47,7 @@ test.describe('Unified plugin workspace', () => {
|
||||
user: {
|
||||
username: 'plugins-e2e', userId: 'plugins-e2e-user', tenantId: null, deptId: null, authorities: [],
|
||||
},
|
||||
moduleAccess: { programming: true, design: true, learning: true, robot: true },
|
||||
moduleAccess: { programming: true, design: true, robot: true },
|
||||
});
|
||||
if (requestPath === '/api/works/user/agent-profile') return result({
|
||||
success: true,
|
||||
@@ -239,7 +239,7 @@ test.describe('Unified plugin workspace', () => {
|
||||
user: {
|
||||
username: 'plugins-e2e', userId: 'plugins-e2e-user', tenantId: null, deptId: null, authorities: [],
|
||||
},
|
||||
moduleAccess: { programming: true, design: true, learning: true, robot: true },
|
||||
moduleAccess: { programming: true, design: true, robot: true },
|
||||
});
|
||||
if (requestPath === '/api/works/user/agent-profile') return result({
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user