继续沉淀结果页返回按钮
新增共享 PlatformBackActionButton 承接结果页轻量返回入口 将拼图方洞拼消消视觉小说等结果页返回按钮收口到共享组件 将拼消消跳一跳敲木鱼宝贝识物结果页返回按钮收口到共享组件 补充对应测试并更新 PlatformUiKit 收口计划与共享决策记录
This commit is contained in:
@@ -98,6 +98,12 @@ test('square hole result view exposes test run and publish actions', async () =>
|
||||
|
||||
expect(screen.getByRole('button', { name: '试玩' })).toBeTruthy();
|
||||
expect(screen.getByRole('button', { name: '发布' })).toBeTruthy();
|
||||
const backButton = screen.getByRole('button', { name: '返回' });
|
||||
|
||||
expect(backButton.className).toContain('platform-button--ghost');
|
||||
expect(backButton.className).toContain('text-[11px]');
|
||||
expect(backButton.className).toContain('gap-1.5');
|
||||
expect(backButton.querySelector('svg')?.className.baseVal).toContain('h-3.5');
|
||||
|
||||
await user.clear(screen.getByLabelText('游戏名称'));
|
||||
await user.type(screen.getByLabelText('游戏名称'), '几何新挑战');
|
||||
@@ -109,7 +115,7 @@ test('square hole result view exposes test run and publish actions', async () =>
|
||||
await user.type(holePromptInput, '圆形洞口贴图');
|
||||
await user.click(screen.getByRole('button', { name: '试玩' }));
|
||||
await user.click(screen.getByRole('button', { name: '发布' }));
|
||||
await user.click(screen.getByRole('button', { name: '返回' }));
|
||||
await user.click(backButton);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(onStartTestRun).toHaveBeenCalledTimes(1);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
ArrowLeft,
|
||||
CheckCircle2,
|
||||
ImagePlus,
|
||||
Images,
|
||||
@@ -30,6 +29,7 @@ import {
|
||||
} from '../../services/square-hole-works';
|
||||
import { useAuthUi } from '../auth/AuthUiContext';
|
||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||
import { PlatformAssetPickerGrid } from '../common/PlatformAssetPickerCard';
|
||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||
import { PlatformIconButton } from '../common/PlatformIconButton';
|
||||
@@ -467,16 +467,11 @@ function SquareHoleResultHeader({
|
||||
|
||||
return (
|
||||
<div className="mb-4 flex items-center justify-between gap-3">
|
||||
<PlatformActionButton
|
||||
<PlatformBackActionButton
|
||||
onClick={onBack}
|
||||
disabled={isBusy}
|
||||
tone="ghost"
|
||||
size="xs"
|
||||
className="min-h-0 self-start gap-1.5 px-3 py-1.5 text-[11px]"
|
||||
>
|
||||
<ArrowLeft className="h-3.5 w-3.5" />
|
||||
返回
|
||||
</PlatformActionButton>
|
||||
variant="compact"
|
||||
/>
|
||||
{badge}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user