import { expect, test } from '@playwright/test'; test('mobile web portal keeps the verified home hierarchy without horizontal overflow', async ({ page }) => { await page.goto('/'); await expect(page.getByRole('heading', { name: '空海医院' })).toBeVisible(); await expect(page.getByRole('heading', { name: '今天需要什么帮助?' })).toBeVisible(); await expect(page.getByRole('heading', { name: '患者状态与待办' })).toBeVisible(); await expect(page.getByRole('button', { name: '按住说话,告诉我想办理什么' })).toBeVisible(); await expect(page.getByRole('navigation', { name: '主导航' })).toBeVisible(); const horizontalOverflow = await page.evaluate(() => document.documentElement.scrollWidth > document.documentElement.clientWidth); expect(horizontalOverflow).toBe(false); }); test('service catalog exposes only three P0 agents', async ({ page }) => { await page.goto('/'); await page.getByRole('button', { name: '服务', exact: true }).click(); await expect(page.getByRole('button', { name: /智能分诊挂号 P0 已开通/ })).toBeEnabled(); await expect(page.getByRole('button', { name: /智能导诊 本院未开通/ })).toBeDisabled(); await page.getByRole('button', { name: '诊中', exact: true }).click(); await expect(page.getByRole('button', { name: /中医舌诊 P0 已开通/ })).toBeEnabled(); await expect(page.getByRole('button', { name: /检验检查报告解读 P0 已开通/ })).toBeEnabled(); await expect(page.getByRole('button', { name: /临床决策支持 本院未开通/ })).toBeDisabled(); });