收口拼图首访按钮

为 PlatformActionButton 增加琥珀实心 accent tone

将拼图首访生成按钮迁移到 PlatformActionButton

将拼图首访登录按钮迁移到 PlatformActionButton

将拼图首访跳过按钮迁移到 PlatformActionButton

补充按钮组件和首访按钮断言

更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-10 14:23:51 +08:00
parent e019ece907
commit 9b36903021
7 changed files with 81 additions and 15 deletions
@@ -61,9 +61,20 @@ test('PuzzleOnboardingView uses shared dark textarea and error status chrome', (
test('PuzzleOnboardingView preserves submit, skip, and disabled phase behavior', () => {
const { onSubmit, onSkip } = renderOnboarding();
const submitButton = screen.getByRole('button', { name: '生成' });
const skipButton = screen.getByRole('button', { name: '跳过' });
fireEvent.click(screen.getByRole('button', { name: '生成' }));
fireEvent.click(screen.getByRole('button', { name: '跳过' }));
expect(submitButton.className).toContain('platform-action-button--accent');
expect(submitButton.className).toContain('bg-amber-200');
expect(submitButton.className).toContain('w-full');
expect(skipButton.className).toContain(
'platform-action-button--editor-dark',
);
expect(skipButton.className).toContain('rounded-full');
expect(skipButton.className).toContain('absolute');
fireEvent.click(submitButton);
fireEvent.click(skipButton);
expect(onSubmit).toHaveBeenCalledTimes(1);
expect(onSkip).toHaveBeenCalledTimes(1);
@@ -112,6 +123,9 @@ test('PuzzleOnboardingLoginOverlay uses shared error status and keeps login acti
fireEvent.click(screen.getByRole('button', { name: '注册账号 / 登录' }));
expect(onLogin).toHaveBeenCalledTimes(1);
expect(screen.getByRole('button', { name: '注册账号 / 登录' }).className).toContain(
'platform-action-button--accent',
);
expect(screen.getByText('保存首访拼图失败').className).toContain(
'platform-status-message',
);