style(workspace): remove the embedded work preview title bar

This commit is contained in:
鲨鱼辣椒
2026-09-28 16:09:52 +08:00
parent d284287741
commit 064096edbd
5 changed files with 26 additions and 6 deletions

View File

@@ -264,7 +264,13 @@ describe('AgentBrowserPanel', () => {
const onOpenChange = vi.fn();
const view = render(<AgentBrowserPanel projectId="project-a" open embedded onOpenChange={onOpenChange} />);
await waitFor(() => expect(latestPresentation()).toMatchObject({ project_id: 'project-a', visible: true }));
expect(screen.getByRole('complementary', { name: '作品预览' })).toBeVisible();
expect(screen.queryByRole('heading', { name: '作品预览' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: '收起作品' })).not.toBeInTheDocument();
expect(screen.getByRole('textbox', { name: '网页地址' })).toHaveValue('http://127.0.0.1:4173/');
expect(screen.getByRole('textbox', { name: '网页地址' })).toBeEnabled();
expect(screen.getByTestId('agent-browser-viewport')).toBeVisible();
expect(screen.getByTestId('agent-browser-viewport')).toHaveAccessibleName('作品画面');
view.rerender(<AgentBrowserPanel projectId="project-a" open={false} embedded onOpenChange={onOpenChange} />);
await waitFor(() => expect(latestPresentation()).toMatchObject({ visible: false }));