优化
This commit is contained in:
@@ -113,7 +113,7 @@ describe('FinanceCustomerArapView G2 operations', () => {
|
||||
expect(actions.findAll('button').map(button => button.text().trim())).toEqual(labels)
|
||||
expect(actions.find('.el-dropdown').exists()).toBe(overflow)
|
||||
if (overflow) {
|
||||
const trigger = actions.get('button[title="更多费用来源操作"]')
|
||||
const trigger = actions.get('button[title^="更多费用来源操作"]')
|
||||
expect(trigger.text()).toBe('')
|
||||
await trigger.trigger('click')
|
||||
await flushPromises()
|
||||
@@ -268,18 +268,18 @@ describe('FinanceCustomerArapView G2 operations', () => {
|
||||
expect(page).not.toContain('max-width: 520px')
|
||||
})
|
||||
|
||||
it('renders permitted fee-source row operations as shared outlined text buttons', () => {
|
||||
it('renders permitted fee-source row operations through the shared row-actions component', () => {
|
||||
const page = readFileSync(resolve(process.cwd(), 'src/modules/finance/pages/FinanceCustomerArapView.vue'), 'utf8')
|
||||
expect(page).toContain('@click="openDetail(row)">详情</el-button>')
|
||||
expect(page).toContain("@click=\"openMutation(row, 'SUBMIT')\"")
|
||||
expect(page).toContain("@click=\"openMutation(row, 'ADJUST')\"")
|
||||
expect(page).toContain("import RowActions, { type RowActionItem } from '@/shared/components/RowActions.vue'")
|
||||
expect(page).toContain("{ key: 'detail', label: '详情', priority: 300")
|
||||
expect(page).toContain("{ key: 'submit', label: '提交审核', priority: 200")
|
||||
expect(page).toContain("{ key: 'adjust', label: '调整', priority: 150")
|
||||
expect(page).toContain("{ key: 'void', label: '作废', tone: 'danger'")
|
||||
expect(page).toContain('!isUpstreamSource(row)')
|
||||
expect(page).toContain('!isUpstreamSource(detail)')
|
||||
expect(page).toContain("['INBOUND_FEE', 'CONTAINER_FEE'].includes(type)")
|
||||
expect(page).toContain("=== 'LASTLEG'")
|
||||
const actions = page.slice(page.indexOf('<template #actions'), page.indexOf('<template #customerName'))
|
||||
expect(actions).not.toMatch(/<el-button[^>]*\blink\b/)
|
||||
expect(page).toContain('white-space: nowrap')
|
||||
expect(page).toContain('<RowActions v-if="row.feeSourceId" :actions="sourceActions(row as ArapRow)"')
|
||||
})
|
||||
|
||||
it('resolves blank detail customer names and keeps source labels business-facing', async () => {
|
||||
|
||||
Reference in New Issue
Block a user