实现项目真机预览与待审版本扫码验收
需求:接管客户端未提交 WIP,保留真机预览,移除旧登录原型并维持 2.0.0。 实现:由 Main 核对项目与精确 Release,签发短时 Owner preview;补充一键提交映射能力及 Windows ZIP 预检兼容。
This commit is contained in:
@@ -62,6 +62,7 @@ function renderSidebar(overrides: Partial<ComponentProps<typeof AgentConversatio
|
||||
onRestoreSession: vi.fn().mockResolvedValue(undefined),
|
||||
onDeleteSession: vi.fn().mockResolvedValue(undefined),
|
||||
onTogglePinAgent: vi.fn().mockResolvedValue(undefined),
|
||||
onOpenDevicePreview: vi.fn(),
|
||||
onOpenProjectSettings: vi.fn(),
|
||||
};
|
||||
render(
|
||||
@@ -101,13 +102,20 @@ describe('AgentConversationSidebar', () => {
|
||||
expect(callbacks.onOpenProjectSettings).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it('opens the project device preview from the conversation header', () => {
|
||||
const callbacks = renderSidebar();
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '真机预览' }));
|
||||
expect(callbacks.onOpenDevicePreview).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it('shows only the centered project-partner heading in the conversation header', () => {
|
||||
renderSidebar();
|
||||
|
||||
expect(screen.queryByText('项目联系人')).not.toBeInTheDocument();
|
||||
const heading = screen.getByRole('heading', { name: '我的项目空间' });
|
||||
expect(heading).toHaveClass('text-left');
|
||||
expect(heading.parentElement).toHaveClass('relative', 'px-3', 'pr-24');
|
||||
expect(heading.parentElement).toHaveClass('relative', 'px-3', 'pr-28');
|
||||
expect(heading.parentElement).not.toHaveClass('justify-center');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user