perf: 优化工作流与智能体编排界面性能
- 使用登录态独立全屏壳层承载编排页面 - 保留鉴权、锁屏、水印及原有设计器功能 - 增加独立路由回归测试
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import agentDesignRoutes from '../routes/external/agent-design';
|
||||
import agentRoutes from '../routes/modules/agent';
|
||||
|
||||
describe('agent design route', () => {
|
||||
it('keeps the standalone designer outside dynamic menu routes', () => {
|
||||
const designRoute = agentDesignRoutes.find(
|
||||
(route) => route.name === 'AgentDesigner',
|
||||
);
|
||||
|
||||
expect(agentRoutes.some((route) => route.name === 'AgentDesigner')).toBe(
|
||||
false,
|
||||
);
|
||||
expect(designRoute).toBeDefined();
|
||||
expect(designRoute?.path).toBe('/ai/agents/designer/:id');
|
||||
expect(designRoute?.meta).toMatchObject({
|
||||
activePath: '/ai/agents',
|
||||
hideInBreadcrumb: true,
|
||||
hideInMenu: true,
|
||||
hideInTab: true,
|
||||
noBasicLayout: true,
|
||||
openInNewWindow: true,
|
||||
});
|
||||
expect(designRoute?.meta?.ignoreAccess).not.toBe(true);
|
||||
expect(designRoute?.component).toBeTypeOf('function');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import workflowRoutes from '../routes/modules/workflow';
|
||||
|
||||
describe('workflow design route', () => {
|
||||
it('uses the authenticated standalone shell without exposing a menu or tab', () => {
|
||||
const designRoute = workflowRoutes.find(
|
||||
(route) => route.name === 'WorkflowDesign',
|
||||
);
|
||||
|
||||
expect(designRoute).toBeDefined();
|
||||
expect(designRoute?.path).toBe('/ai/workflow/design');
|
||||
expect(designRoute?.meta).toMatchObject({
|
||||
activePath: '/ai/workflow',
|
||||
hideInBreadcrumb: true,
|
||||
hideInMenu: true,
|
||||
hideInTab: true,
|
||||
noBasicLayout: true,
|
||||
});
|
||||
expect(designRoute?.meta?.ignoreAccess).not.toBe(true);
|
||||
expect(designRoute?.component).toBeTypeOf('function');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user