加固个人中心邀请弹窗组件断言
改用 PlatformSubpanel padding 参数承接邀请弹窗局部间距 补充邀请二维码卡和已填写邀请码空态的公共 surface 断言
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -3898,8 +3898,8 @@ function ProfileReferralModal({
|
||||
key={qrCode.label}
|
||||
surface="flat"
|
||||
radius="xs"
|
||||
padding="none"
|
||||
className="p-2.5 text-center"
|
||||
padding="xs"
|
||||
className="text-center"
|
||||
>
|
||||
<div className="aspect-square overflow-hidden rounded-lg border border-zinc-200 bg-white p-1.5">
|
||||
<img
|
||||
@@ -4010,8 +4010,7 @@ function ProfileReferralModal({
|
||||
as="div"
|
||||
surface="flat"
|
||||
radius="xs"
|
||||
padding="none"
|
||||
className="px-3.5 py-3"
|
||||
padding="sm"
|
||||
>
|
||||
<PlatformFieldLabel
|
||||
variant="section"
|
||||
@@ -4027,8 +4026,8 @@ function ProfileReferralModal({
|
||||
key={`${user.userId}-${user.boundAt}`}
|
||||
surface="soft"
|
||||
radius="xs"
|
||||
padding="none"
|
||||
className="flex items-center gap-3 px-2.5 py-2"
|
||||
padding="row"
|
||||
className="flex items-center gap-3"
|
||||
>
|
||||
<ProfileReferralUserAvatar
|
||||
name={user.displayName}
|
||||
|
||||
Reference in New Issue
Block a user