收口个人中心任务条目组件
迁移任务中心任务条目到 PlatformSubpanel 保留任务领取流程和奖励状态展示 补充任务条目公共子面板断言并更新文档和 Hermes
This commit is contained in:
@@ -2563,7 +2563,10 @@ test('profile daily task shortcut reflects task progress and claim updates', asy
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /每日任务/u }));
|
||||
|
||||
expect(await screen.findByText('每日登录')).toBeTruthy();
|
||||
const taskTitle = await screen.findByText('每日登录');
|
||||
const taskPanel = taskTitle.closest('.platform-subpanel') as HTMLElement;
|
||||
expect(taskPanel.className).toContain('rounded-[1rem]');
|
||||
expect(taskPanel.className).toContain('p-4');
|
||||
expect(mockGetRpgProfileTasks).toHaveBeenCalledTimes(1);
|
||||
expect(screen.getByText('1/1')).toBeTruthy();
|
||||
expect(screen.getByText('+10')).toBeTruthy();
|
||||
|
||||
@@ -3553,9 +3553,11 @@ function ProfileTaskCenterModal({
|
||||
const progressLabel = buildProfileTaskProgressLabel(task);
|
||||
|
||||
return (
|
||||
<div
|
||||
<PlatformSubpanel
|
||||
as="div"
|
||||
key={task.taskId}
|
||||
className="platform-subpanel rounded-2xl px-4 py-4"
|
||||
radius="sm"
|
||||
padding="md"
|
||||
>
|
||||
<div className="flex min-w-0 items-start justify-between gap-3">
|
||||
<div className="min-w-0">
|
||||
@@ -3585,7 +3587,7 @@ function ProfileTaskCenterModal({
|
||||
>
|
||||
{getProfileTaskClaimButtonLabel(task, isClaiming)}
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
</PlatformSubpanel>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user