优化
This commit is contained in:
@@ -113,7 +113,7 @@ describe('FinanceCustomerAccountsView delivery', () => {
|
||||
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)"')
|
||||
expect(page).toContain('<RowActions text-actions :actions="accountActions(row as FinanceAccountSummary)"')
|
||||
})
|
||||
|
||||
it('shows authoritative CNY wallet balances and independently permitted actions', () => {
|
||||
@@ -125,7 +125,7 @@ describe('FinanceCustomerAccountsView delivery', () => {
|
||||
it.each([
|
||||
[[], ['详情'], false],
|
||||
[['platform:finance:customer-terms:view', 'platform:finance:customer-terms:update'], ['详情', '账期'], false],
|
||||
[['platform:finance:customer-account:adjust'], ['详情', '充值', '扣款', ''], true],
|
||||
[['platform:finance:customer-account:adjust'], ['详情', '充值', '扣款', '更多'], true],
|
||||
])('folds account operations only when more than three are available: %j', async (extraPermissions, labels, overflow) => {
|
||||
const wrapper = await mountAccountsView(['platform:finance:customer-account:list', ...extraPermissions])
|
||||
const actions = wrapper.get('.el-table__body-wrapper .density-actions')
|
||||
@@ -133,8 +133,8 @@ describe('FinanceCustomerAccountsView delivery', () => {
|
||||
expect(actions.find('.el-dropdown').exists()).toBe(overflow)
|
||||
if (overflow) {
|
||||
const trigger = actions.get('button[aria-label^="更多客户账户操作"]')
|
||||
expect(trigger.text()).toBe('')
|
||||
expect(trigger.find('svg').exists()).toBe(true)
|
||||
expect(trigger.text()).toBe('更多')
|
||||
expect(trigger.find('svg').exists()).toBe(false)
|
||||
}
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user