import assert from 'node:assert/strict' import { readFile } from 'node:fs/promises' import test from 'node:test' test('客服我的钱包展示统一结算虚拟账单入口', async () => { const source = await readFile( new URL('../src/pages/admin/fund/FundSupportView.tsx', import.meta.url), 'utf8', ) assert.ok(source.includes('统一结算'), '钱包页必须展示统一结算卡片') assert.ok(source.includes('生成虚拟账单,不扣积分或备用金')) assert.ok(source.includes('support-wallet-grid')) }) test('客服钱包提供统一结算待对账列表和实际金额确认', async () => { const [source, service, confirmModal] = await Promise.all([ readFile(new URL('../src/pages/admin/fund/FundSupportView.tsx', import.meta.url), 'utf8'), readFile(new URL('../src/services/admin/cost-center.ts', import.meta.url), 'utf8'), readFile( new URL('../src/components/admin/ManualFulfillmentConfirmModal.tsx', import.meta.url), 'utf8', ), ]) assert.ok(source.includes('统一结算待对账')) assert.ok(source.includes('实际结算金额(元)')) assert.ok(source.includes('确认对账')) assert.ok(confirmModal.includes('costPending')) assert.ok(service.includes('/api/v1/admin/finance/on-account-bills')) assert.ok(service.includes('/reconcile')) })