收口个人中心轻量表单组件

迁移兑换码和邀请码输入到 PlatformTextField

将个人中心充值和任务空态改用 PlatformEmptyState

补充个人中心公共输入断言并更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-10 11:46:56 +08:00
parent 9389f9401f
commit 7fcaf346c7
4 changed files with 32 additions and 13 deletions

View File

@@ -2535,7 +2535,9 @@ test('non-wechat profile opens reward code from recharge-shaped entry', async ()
await user.click(
within(shortcutRegion).getByRole('button', { name: //u }),
);
expect(await screen.findByPlaceholderText('输入兑换码')).toBeTruthy();
const rewardCodeInput = await screen.findByPlaceholderText('输入兑换码');
expect(rewardCodeInput).toBeTruthy();
expect(rewardCodeInput.className).toContain('platform-text-field');
expect(mockGetRpgProfileRechargeCenter).not.toHaveBeenCalled();
});
@@ -3166,6 +3168,7 @@ test('invite query opens redeem modal directly for logged in users', async () =>
const input = await screen.findByLabelText('邀请码');
expect((input as HTMLInputElement).value).toBe('SPRING2026');
expect(input.className).toContain('platform-text-field');
});
test('profile redeem invite modal reads query invite code after login', async () => {
@@ -3223,6 +3226,7 @@ test('opens reward code modal from profile action on mobile', async () => {
const modal = await screen.findByPlaceholderText('输入兑换码');
expect(modal).toBeTruthy();
expect(modal.className).toContain('platform-text-field');
expect(screen.getByRole('button', { name: '兑换' })).toBeTruthy();
expect(screen.getByLabelText('关闭兑换码')).toBeTruthy();
});