收口大鱼结果页空态
将大鱼吃小鱼结果页缺草稿提示迁移到 PlatformEmptyState 补充缺草稿空态公共组件断言 更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
@@ -157,6 +157,26 @@ function createSession(): BigFishSessionSnapshotResponse {
|
||||
}
|
||||
|
||||
describe('BigFishResultView', () => {
|
||||
test('uses PlatformEmptyState chrome when draft is missing', () => {
|
||||
render(
|
||||
<BigFishResultView
|
||||
session={{
|
||||
...createSession(),
|
||||
draft: null,
|
||||
}}
|
||||
onBack={() => {}}
|
||||
onExecuteAction={() => {}}
|
||||
onStartTestRun={() => {}}
|
||||
/>,
|
||||
);
|
||||
|
||||
const emptyState = screen.getByText('还没有可编辑的玩法草稿');
|
||||
|
||||
expect(emptyState.className).toContain('platform-empty-state');
|
||||
expect(emptyState.className).toContain('bg-white/74');
|
||||
expect(emptyState.className).toContain('text-[var(--platform-text-base)]');
|
||||
});
|
||||
|
||||
test('renders generated formal previews with accurate status copy', () => {
|
||||
render(
|
||||
<BigFishResultView
|
||||
|
||||
@@ -17,6 +17,7 @@ import type {
|
||||
ExecuteBigFishActionRequest,
|
||||
} from '../../../packages/shared/src/contracts/bigFish';
|
||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||
import { PlatformEmptyState } from '../common/PlatformEmptyState';
|
||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||
import { PlatformIconBadge } from '../common/PlatformIconBadge';
|
||||
import { PlatformMediaFrame } from '../common/PlatformMediaFrame';
|
||||
@@ -374,14 +375,13 @@ export function BigFishResultView({
|
||||
if (!draft) {
|
||||
return (
|
||||
<div className="flex h-full items-center justify-center">
|
||||
<PlatformSubpanel
|
||||
as="div"
|
||||
radius="sm"
|
||||
padding="none"
|
||||
className="px-5 py-4 text-sm text-[var(--platform-text-base)]"
|
||||
<PlatformEmptyState
|
||||
surface="subpanel"
|
||||
size="compact"
|
||||
tone="base"
|
||||
>
|
||||
还没有可编辑的玩法草稿
|
||||
</PlatformSubpanel>
|
||||
</PlatformEmptyState>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user