优化
This commit is contained in:
@@ -3,6 +3,7 @@ import { resolve } from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const settlement = readFileSync(resolve(process.cwd(), 'src/modules/finance/pages/FinanceFormalSettlementPage.vue'), 'utf8')
|
||||
const statements = readFileSync(resolve(process.cwd(), 'src/modules/finance/pages/FinanceCustomerStatementsView.vue'), 'utf8')
|
||||
const arap = readFileSync(resolve(process.cwd(), 'src/modules/finance/pages/FinanceCustomerArapView.vue'), 'utf8')
|
||||
const manual = readFileSync(resolve(process.cwd(), 'src/modules/finance/pages/FinanceManualPage.vue'), 'utf8')
|
||||
|
||||
@@ -17,6 +18,9 @@ describe('finance presentation governance', () => {
|
||||
expect(arap).toContain('financeSourceTypeLabel(detail.sourceType)')
|
||||
expect(arap).toContain('financeOperationActionLabel(log.action)')
|
||||
expect(arap).toContain('financeOperationResultLabel(log.result)')
|
||||
expect(arap).toContain('financeDirectionLabel(row.direction)')
|
||||
expect(arap).toContain('financeDirectionLabel(detail.direction)')
|
||||
expect(arap).not.toContain("detail.direction === 'RECEIVABLE' ? '应收' : '应付'")
|
||||
expect(arap).toContain('请填写驳回原因')
|
||||
expect(arap).toContain('请说明参与或排除结算的原因')
|
||||
})
|
||||
@@ -25,4 +29,11 @@ describe('finance presentation governance', () => {
|
||||
expect(manual).toContain('凭证已上传,创建失败时可直接重试')
|
||||
expect(manual).not.toContain('凭证 fileId:')
|
||||
})
|
||||
|
||||
it('hides unavailable generation controls instead of rendering disabled buttons', () => {
|
||||
expect(settlement).not.toContain('生成{{ title }}')
|
||||
expect(settlement).not.toContain('接口尚未提供,暂不可操作')
|
||||
expect(statements).not.toContain('生成对账单')
|
||||
expect(statements).not.toContain('disabled title="接口尚未提供')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user