加固个人中心邀请弹窗组件断言

改用 PlatformSubpanel padding 参数承接邀请弹窗局部间距

补充邀请二维码卡和已填写邀请码空态的公共 surface 断言
This commit is contained in:
2026-06-10 12:20:32 +08:00
parent 66b73f5a1d
commit 66f31db968
2 changed files with 10 additions and 7 deletions

View File

@@ -3178,7 +3178,10 @@ test('profile community shortcut shows reward subtitle and invited users', async
expect(screen.getByAltText('玩家社区 QQ 群二维码')).toBeTruthy();
expect(screen.getByText('微信群')).toBeTruthy();
expect(screen.getByText('QQ群')).toBeTruthy();
expect(screen.getByText('微信群').parentElement?.className).toContain(
const wechatQrCardClassName = screen.getByText('微信群').parentElement
?.className;
expect(wechatQrCardClassName).toContain('bg-white/72');
expect(wechatQrCardClassName).toContain(
'border-[var(--platform-subpanel-border)]',
);
expect(screen.queryByText('成功邀请')).toBeNull();
@@ -3288,6 +3291,7 @@ test('profile redeem invite query modal submits code after login', async () => {
expect(onRechargeSuccess).toHaveBeenCalledTimes(1);
const redeemedState = await screen.findByText('已填写邀请码');
expect(redeemedState.className).toContain('platform-empty-state');
expect(redeemedState.className).toContain('bg-white/74');
expect(screen.queryByRole('region', { name: '次级入口' })).toBeNull();
});