优化
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const page = readFileSync(resolve(process.cwd(), 'src/modules/finance/pages/FinanceReceivableStatisticsView.vue'), 'utf8')
|
||||
|
||||
describe('receivable statistics page', () => {
|
||||
it('renders only the approved CNY derived metrics and current-filter actions', () => {
|
||||
for (const label of ['统计月份', '应收单位', '应收总额', '已收合计', '余额未收', '打印', '导出Excel']) expect(page).toContain(label)
|
||||
expect(page).toContain("exportType: 'FINANCE_RECEIVABLE_STATISTICS'")
|
||||
expect(page).toContain('window.print()')
|
||||
for (const excluded of ['FBA直发', 'FBA专线', '零头减免', 'USD', '>编辑<']) expect(page).not.toContain(excluded)
|
||||
})
|
||||
|
||||
it('keeps query reset, loading, empty, error and permission states explicit', () => {
|
||||
expect(page).toContain('function reset()')
|
||||
expect(page).toContain('无权访问应收款统计表')
|
||||
expect(page).toContain('<LoadErrorState')
|
||||
expect(page).toContain('当前月份暂无应收数据')
|
||||
expect(page).toContain(':loading="loading"')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user