diff --git a/e2e/work-companion.playwright.ts b/e2e/work-companion.playwright.ts index c233fd9..5898250 100644 --- a/e2e/work-companion.playwright.ts +++ b/e2e/work-companion.playwright.ts @@ -114,6 +114,17 @@ test('keeps real summary and details accessible with right pane closed', async ( expect(state.errors).toEqual([]) }) +test('keeps one expanded ordinary summary when the desktop work pane opens', async ({ page }) => { + await page.setViewportSize({ width: 1440, height: 960 }) + const state = await fixture(page) + await page.getByRole('button', { name: '打开工作', exact: true }).click() + await expect(page.locator('.right-panel .acard')).toHaveCount(1) + await expect(page.locator('[data-conversation-work] .acard')).toHaveCount(0) + await expect(page.locator('[data-conversation-work]').getByRole('button', { name: /整理项目材料 · 查看摘要/ })).toBeVisible() + if (process.env.WORK_COMPANION_SCREENSHOT) await page.screenshot({ path: process.env.WORK_COMPANION_SCREENSHOT, fullPage: true }) + expect(state.errors).toEqual([]) +}) + test('shares submitting feedback between conversation and work confirmations', async ({ page }) => { const state = await fixture(page, [confirmation]) await page.getByRole('button', { name: '打开工作', exact: true }).click() @@ -177,7 +188,6 @@ for (const width of [1440, 1024, 736, 390, 320]) { } const layout = await page.evaluate(() => ({ width: document.documentElement.clientWidth, scroll: document.documentElement.scrollWidth })) expect(layout.scroll).toBeLessThanOrEqual(layout.width) - if (width === 1440 && process.env.WORK_COMPANION_SCREENSHOT) await page.screenshot({ path: process.env.WORK_COMPANION_SCREENSHOT, fullPage: true }) expect(state.errors).toEqual([]) }) }