fix: 统一详情页返回上级列表

- 修正管理端插件、工作流与系统详情页返回目标

- 修正用户中心执行记录与助手详情返回目标

- 保留审批页签及关联资源筛选上下文
This commit is contained in:
2026-07-28 12:23:36 +08:00
parent 1404c2ddc5
commit dc35ddc3e4
14 changed files with 144 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { describe, expect, it } from 'vitest';
function readViewSource(relativePath: string) {
return readFileSync(resolve('app/src/views', relativePath), 'utf8');
}
describe('detail return navigation', () => {
it.each([
['execHistory/details/index.vue', '/execHistory'],
['assistantMarket/assistant/index.vue', '/assistantMarket'],
])('returns %s to its fixed parent list', (relativePath, parentPath) => {
const source = readViewSource(relativePath);
expect(source).not.toMatch(/router\.(?:back|go)\s*\(/);
expect(source).toContain(`path: '${parentPath}'`);
});
});