style(workspace): remove the embedded work preview title bar
This commit is contained in:
1 parent
d284287741
commit
064096edbd
5 files changed
+26
-6
No files matched your search
@@ -2189,6 +2189,10 @@ test('work tab prepares the page automatically and keeps the student draft throu
|
||||
await expect(page.getByText('正在打开你的作品…', { exact: true })).toBeVisible();
|
||||
await electronApp.evaluate(() => { (globalThis as unknown as { __makelorePiFirstChatE2E: { workReady: boolean } }).__makelorePiFirstChatE2E.workReady = true; });
|
||||
await expect(page.getByRole('textbox', { name: '网页地址' })).toHaveValue('http://127.0.0.1:4173/');
|
||||
await expect(page.getByTestId('agent-browser-panel')).toHaveAccessibleName('作品预览');
|
||||
await expect(page.getByRole('heading', { name: '作品预览', exact: true })).toHaveCount(0);
|
||||
await expect(page.getByRole('button', { name: '收起作品', exact: true })).toHaveCount(0);
|
||||
await expect(page.getByTestId('agent-browser-viewport')).toBeVisible();
|
||||
await expect(page.getByText('正在打开你的作品…', { exact: true })).toHaveCount(0);
|
||||
// A manual address open must not permanently disable recovery checks.
|
||||
await page.getByRole('textbox', { name: '网页地址' }).fill('http://127.0.0.1:4173/');
|
||||
|
||||
@@ -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 }));
|
||||
|
||||
Reference in new issue
Block a user