优化
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user