/** 详情面板中关联事件/工单的「查看详情」必须一路接到外壳。 */ import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import { test } from 'node:test' const shell = readFileSync(new URL('../src/modules/cockpit/CockpitShell.vue', import.meta.url), 'utf8') const drawer = readFileSync(new URL('../src/modules/cockpit/components/EntityDetailDrawer.vue', import.meta.url), 'utf8') const sections = readFileSync(new URL('../src/modules/cockpit/components/EntityDetailSections.vue', import.meta.url), 'utf8') test('详情抽屉的关联打开事件没有在改版中被丢掉', () => { assert.match(sections, /@click\.stop="openRelation\(item\)"/) assert.match(drawer, /@open-relation="\(item\) => emit\('open-relation', item\)"/) assert.match(shell, /@open-relation="openRelationFromDetail"/) assert.match(shell, /function openRelationFromDetail\(item\)/) })