import { expect, test } from '@playwright/test';

test('desktop layout has no horizontal overflow and keeps right panel as static doctor idle state', async ({ page }) => {
  await page.goto('/');

  await expect(page.getByText('医梦门诊助手')).toBeVisible();
  await expect(page.getByText('说出需求，我来判断下一步')).toBeVisible();
  await expect(page.getByAltText('医生助手')).toBeVisible();
  await expect(page.getByText('当前仅作为静态形象展示')).toBeVisible();
  await expect(page.getByRole('button', { name: '语音' })).toBeVisible();
  await expect(page.getByRole('button', { name: '发送' })).toBeVisible();
  await expect(page.getByText('智能挂号')).toHaveCount(0);

  const horizontalOverflow = await page.evaluate(() => document.documentElement.scrollWidth > document.documentElement.clientWidth);
  expect(horizontalOverflow).toBe(false);
});
