This commit is contained in:
2026-09-18 16:48:40 +08:00
parent e10d0534ae
commit 24fa3d1c9d
19 changed files with 286 additions and 210 deletions
@@ -107,15 +107,13 @@ describe('FinanceCustomerAccountsView delivery', () => {
it('keeps high-frequency account actions visible and groups the remaining actions', () => {
expect(page).toContain("{ key: 'actions', label: '操作', width: 290, fixed: 'left', slotName: 'actions' }")
expect(page).toContain('@click="openAccount(row, false)">详情</el-button>')
expect(page).toContain("openAdjustment(row as FinanceAccountSummary, 'RECHARGE')")
expect(page).toContain("openAdjustment(row as FinanceAccountSummary, 'DEDUCTION')")
expect(page).toContain('aria-label="更多客户账户操作"')
expect(page).toContain('<el-dropdown-item v-if="canAdjust" command="credit">授信</el-dropdown-item>')
expect(page).toContain('<el-dropdown-item v-if="canUpdateTerms" command="terms" :divided="canAdjust">账期</el-dropdown-item>')
expect(page).not.toContain('<el-button link type="primary" @click="openAccount(row, false)">')
expect(page).toContain('class="row-actions density-actions"')
expect(page).toContain('white-space: nowrap')
expect(page).toContain("import RowActions, { type RowActionItem } from '@/shared/components/RowActions.vue'")
expect(page).toContain("{ key: 'detail', label: '详情', priority: 300 }")
expect(page).toContain("{ key: 'recharge', label: '充值', priority: 250")
expect(page).toContain("{ key: 'deduction', label: '扣款', priority: 200")
expect(page).toContain("{ key: 'credit', label: '授信', priority: 100")
expect(page).toContain("{ key: 'terms', label: '账期', visible: canUpdateTerms.value")
expect(page).toContain('<RowActions :actions="accountActions(row as FinanceAccountSummary)"')
})
it('shows authoritative CNY wallet balances and independently permitted actions', () => {
@@ -134,7 +132,7 @@ describe('FinanceCustomerAccountsView delivery', () => {
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[aria-label="更多客户账户操作"]')
const trigger = actions.get('button[aria-label^="更多客户账户操作"]')
expect(trigger.text()).toBe('')
expect(trigger.find('svg').exists()).toBe(true)
}