收口个人中心钱包账单组件

迁移钱包账单空态到 PlatformEmptyState

迁移钱包账单行到 PlatformSubpanel 并保留收支展示

补充钱包账单公共组件断言

更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-10 12:08:08 +08:00
parent 930f43661b
commit 0f5e0114a9
4 changed files with 33 additions and 7 deletions

View File

@@ -1265,7 +1265,13 @@ test('opens wallet ledger modal from narrative coin card', async () => {
expect(balanceBadge.className).toContain('border-rose-100');
expect(balanceBadge.className).toContain('bg-white/70');
expect(mockGetRpgProfileWalletLedger).toHaveBeenCalledTimes(1);
expect(screen.getByText('资产操作消耗')).toBeTruthy();
const consumeLedgerRow = screen
.getByText('资产操作消耗')
.closest('[class*="shadow-sm"]') as HTMLElement;
expect(consumeLedgerRow.className).toContain(
'border-[var(--platform-subpanel-border)]',
);
expect(consumeLedgerRow.className).toContain('shadow-sm');
expect(screen.getByText('-1')).toBeTruthy();
expect(screen.getByText('填写邀请码奖励')).toBeTruthy();
expect(screen.getByText('+30')).toBeTruthy();
@@ -3102,7 +3108,12 @@ test('wallet ledger modal shows empty and error states', async () => {
await user.click(screen.getByRole('button', { name: /\s*0/u }));
expect(await screen.findByText('泥点账单')).toBeTruthy();
await waitFor(() => {
expect(screen.getByText('暂无账单记录')).toBeTruthy();
const emptyState = screen.getByText('暂无账单记录');
expect(emptyState).toBeTruthy();
expect(emptyState.className).toContain('platform-empty-state');
expect(emptyState.className).toContain(
'border-[var(--platform-subpanel-border)]',
);
});
await user.click(screen.getByLabelText('关闭泥点账单'));