test: cover overseas row actions

This commit is contained in:
2026-09-18 14:59:14 +08:00
parent 0ab2302720
commit b51a847306
@@ -338,7 +338,13 @@ describe('overseas warehouse first-batch prototype contract', () => {
for (const [fileName, routeName] of expected) {
const value = source(fileName)
expect(value).toContain(routeName)
expect(value).toMatch(/@click="openDetail\(row(?: as [^"]+)?\)">(?:<Eye :size="15" \/>)?查看<\/el-button>/)
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>/)
}
}
})