test: cover overseas row actions

This commit is contained in:
2026-09-18 14:59:14 +08:00
parent 0ab2302720
commit b51a847306
@@ -338,8 +338,14 @@ describe('overseas warehouse first-batch prototype contract', () => {
for (const [fileName, routeName] of expected) { for (const [fileName, routeName] of expected) {
const value = source(fileName) const value = source(fileName)
expect(value).toContain(routeName) expect(value).toContain(routeName)
if (fileName === 'DispatchesView.vue') {
expect(value).toContain('<RowActions :actions="rowActions(row as DispatchListItem)"')
expect(value).toContain("{ key: 'detail', label: '查看', priority: 300 }")
expect(value).toContain("if (command === 'detail') openDetail(row)")
} else {
expect(value).toMatch(/@click="openDetail\(row(?: as [^"]+)?\)">(?:<Eye :size="15" \/>)?查看<\/el-button>/) expect(value).toMatch(/@click="openDetail\(row(?: as [^"]+)?\)">(?:<Eye :size="15" \/>)?查看<\/el-button>/)
} }
}
}) })
it('connects the dispatch prototype detail to the real overseas API', () => { it('connects the dispatch prototype detail to the real overseas API', () => {