workspace.spec.ts 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. import { expect, test } from '@playwright/test'
  2. test.beforeEach(async ({ page }) => {
  3. await page.goto('/chat')
  4. if (await page.getByRole('heading', { name: '登录 Hermes' }).isVisible()) {
  5. await page.getByLabel('账号').fill('test')
  6. await page.getByLabel('密码').fill('test')
  7. await page.getByRole('button', { name: '登录' }).click()
  8. }
  9. await expect(page.getByRole('navigation')).toBeVisible()
  10. })
  11. test('navigates every 9119 workspace without blank transitions', async ({ page }) => {
  12. const consoleErrors: string[] = []
  13. page.on('console', message => { if (message.type() === 'error') consoleErrors.push(message.text()) })
  14. await expect(page.getByRole('option').first()).toContainText('夭夭 Web 验收会话')
  15. await expect(page.getByRole('option').first()).toContainText('夭夭')
  16. await expect(page.locator('.desktop-sidebar').getByText('已置顶 1', { exact: true })).toBeVisible()
  17. await page.getByRole('button', { name: '群聊' }).click()
  18. await expect(page.getByRole('heading', { name: '设计与工程协作' })).toBeVisible()
  19. await expect(page.getByRole('button', { name: '对话', exact: true })).toBeVisible()
  20. await expect(page.getByRole('button', { name: '群聊', exact: true })).toHaveCount(0)
  21. await expect(page.getByRole('button', { name: '文件库', exact: true })).toHaveCount(0)
  22. await expect(page.getByRole('button', { name: '产物', exact: true })).toHaveCount(0)
  23. await expect(page.getByRole('button', { name: '新建群聊' })).toBeVisible()
  24. await expect(page.getByRole('button', { name: '新建群聊' })).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
  25. await expect(page.getByRole('button', { name: '新建群聊' })).toHaveCSS('font-weight', '580')
  26. await expect(page.getByRole('button', { name: '管理群聊' })).toBeVisible()
  27. await expect(page.getByRole('button', { name: '发送消息' })).toBeVisible()
  28. await page.goto('/files')
  29. await expect(page.getByRole('heading', { name: '文件库', exact: true }).last()).toBeVisible()
  30. await expect(page.getByText('demo-report.pdf')).toBeVisible()
  31. const firstFileCard = page.locator('.library-grid article').first()
  32. const cardGeometry = await firstFileCard.evaluate(element => {
  33. const card = element.getBoundingClientRect()
  34. const preview = element.querySelector('.library-thumb')?.getBoundingClientRect()
  35. return { width: card.width, previewHeight: preview?.height || 0 }
  36. })
  37. expect(cardGeometry.width).toBeGreaterThanOrEqual(220)
  38. expect(cardGeometry.previewHeight).toBe(154)
  39. await page.getByText('demo-report.pdf').click()
  40. await expect(page.getByRole('dialog', { name: /预览 demo-report.pdf/ })).toBeVisible()
  41. await expect(page.locator('.preview-meta')).toHaveCount(0)
  42. const previewDialog = page.getByRole('dialog', { name: /预览 demo-report.pdf/ })
  43. await expect(previewDialog.getByRole('link', { name: '下载' })).toBeVisible()
  44. await expect(previewDialog.getByRole('button', { name: '加入输入框' })).toBeVisible()
  45. await expect(previewDialog.locator('.preview-close')).toBeVisible()
  46. const modalHeight = await page.locator('.preview-modal').evaluate(element => element.getBoundingClientRect().height)
  47. expect(modalHeight).toBeGreaterThan(600)
  48. await previewDialog.locator('.preview-close').click()
  49. await page.goto('/artifacts')
  50. await expect(page).toHaveURL(/\/chat$/)
  51. await expect(page.getByRole('button', { name: '产物', exact: true })).toHaveCount(0)
  52. expect(consoleErrors).toEqual([])
  53. })
  54. test('keeps pins first and loads the next session page at the list bottom', async ({ page }) => {
  55. const sidebar = page.locator('.desktop-sidebar')
  56. const items = sidebar.locator('.sidebar-list [role="option"]')
  57. await expect(items).toHaveCount(100)
  58. await expect(items.first()).toContainText('夭夭 Web 验收会话')
  59. await expect(sidebar.getByRole('button', { name: '继续加载会话' })).toBeVisible()
  60. const list = sidebar.locator('.sidebar-list')
  61. await list.evaluate(element => {
  62. element.scrollTop = element.scrollHeight
  63. element.dispatchEvent(new Event('scroll'))
  64. })
  65. await expect(items).toHaveCount(103)
  66. await expect(sidebar.getByRole('button', { name: '继续加载会话' })).toHaveCount(0)
  67. })
  68. test('restores a routed conversation even when unread-count refresh fails', async ({ page }) => {
  69. await page.route('**/api/app/sessions/unread*', async route => {
  70. await route.fulfill({ status: 503, contentType: 'application/json', body: JSON.stringify({ error: 'unread unavailable' }) })
  71. })
  72. await page.goto('/chat/session-demo')
  73. await expect(page.getByText('已整理完成。下面是', { exact: false })).toBeVisible()
  74. await page.reload()
  75. await expect(page.getByText('已整理完成。下面是', { exact: false })).toBeVisible()
  76. })
  77. test('opens a conversation even when marking it read is unsupported', async ({ page }) => {
  78. const pageErrors: string[] = []
  79. page.on('pageerror', error => pageErrors.push(error.message))
  80. await page.route('**/api/app/sessions/unread/*', async route => {
  81. await route.fulfill({ status: 405, contentType: 'application/json', body: JSON.stringify({ error: 'Method Not Allowed' }) })
  82. })
  83. await page.getByRole('option').filter({ hasText: '第二个会话' }).click()
  84. await expect(page).toHaveURL(/\/chat\/session-second\?profile=yaoyao/)
  85. await expect(page.getByText('已整理完成。下面是', { exact: false })).toBeVisible()
  86. expect(pageErrors).toEqual([])
  87. })
  88. test('syncs the blue fast-mode shortcut with the iOS-compatible session config', async ({ page }) => {
  89. await page.request.post('http://127.0.0.1:19119/__test/rpc-requests/reset')
  90. await page.goto('/chat/session-demo')
  91. const fast = page.getByRole('button', { name: '快速模式:已关闭' })
  92. await expect(fast).toHaveAttribute('aria-pressed', 'false')
  93. await fast.click()
  94. const enabled = page.getByRole('button', { name: '快速模式:已开启' })
  95. await expect(enabled).toHaveAttribute('aria-pressed', 'true')
  96. await expect(enabled).toHaveCSS('color', 'rgb(22, 119, 255)')
  97. await page.getByRole('textbox', { name: '输入消息,Enter 发送,Shift + Enter 换行' }).fill('使用快速模式')
  98. await page.getByRole('button', { name: '发送消息' }).click()
  99. await expect(page.getByText('这是来自假 Gateway 的流式回复。', { exact: true })).toBeVisible()
  100. const payload = await (await page.request.get('http://127.0.0.1:19119/__test/rpc-requests')).json() as { requests: Array<{ method: string; params: Record<string, unknown> }> }
  101. const fastConfigIndex = payload.requests.findIndex(request => request.method === 'config.set' && request.params.key === 'fast')
  102. const promptIndex = payload.requests.findIndex(request => request.method === 'prompt.submit')
  103. expect(fastConfigIndex).toBeGreaterThanOrEqual(0)
  104. expect(promptIndex).toBeGreaterThan(fastConfigIndex)
  105. expect(payload.requests[fastConfigIndex]?.params).toMatchObject({ key: 'fast', value: 'fast', scope: 'session' })
  106. await enabled.click()
  107. await expect(page.getByRole('button', { name: '快速模式:已关闭' })).toHaveAttribute('aria-pressed', 'false')
  108. await expect.poll(async () => {
  109. const next = await (await page.request.get('http://127.0.0.1:19119/__test/rpc-requests')).json() as typeof payload
  110. return next.requests.filter(request => request.method === 'config.set' && request.params.key === 'fast').at(-1)?.params.value
  111. }).toBe('normal')
  112. })
  113. test('reconciles an iOS fast-mode selection from the resumed 9119 session', async ({ page }) => {
  114. await page.request.post('http://127.0.0.1:19119/__test/rpc-requests/reset')
  115. await page.goto('/chat/session-yaoer?profile=yaoer')
  116. await expect(page.getByRole('button', { name: '快速模式:已关闭' })).toBeVisible()
  117. await page.getByRole('textbox', { name: '输入消息,Enter 发送,Shift + Enter 换行' }).fill('读取 iOS 快速模式')
  118. await page.getByRole('button', { name: '发送消息' }).click()
  119. await expect(page.getByRole('button', { name: '快速模式:已开启' })).toHaveCSS('color', 'rgb(22, 119, 255)')
  120. const payload = await (await page.request.get('http://127.0.0.1:19119/__test/rpc-requests')).json() as { requests: Array<{ method: string; params: Record<string, unknown> }> }
  121. expect(payload.requests.some(request => request.method === 'session.resume' && request.params.session_id === 'session-yaoer')).toBe(true)
  122. expect(payload.requests.some(request => request.method === 'config.set' && request.params.key === 'fast')).toBe(false)
  123. })
  124. test('keeps the show-thinking preference across sessions of the same Agent', async ({ page }) => {
  125. await page.goto('/chat/session-demo')
  126. await expect(page.locator('.turn-trace')).toHaveCount(1)
  127. await page.locator('.composer-tool[aria-label="设置"]').click()
  128. const setting = page.getByRole('switch', { name: /显示思考/ })
  129. await expect(setting).toHaveAttribute('aria-checked', 'true')
  130. await setting.click()
  131. await expect(page.locator('.turn-trace')).toHaveCount(0)
  132. await page.getByRole('option').filter({ hasText: '第二个会话' }).click()
  133. await expect(page.locator('.turn-trace')).toHaveCount(0)
  134. await page.locator('.composer-tool[aria-label="设置"]').click()
  135. await page.getByRole('switch', { name: /显示思考/ }).click()
  136. await expect(page.locator('.turn-trace')).toHaveCount(1)
  137. })
  138. test('restores a legacy session link under its owning Agent profile', async ({ page }) => {
  139. await page.goto('/chat/session-yaoer')
  140. await expect(page.getByText('瑶儿历史消息', { exact: true })).toBeVisible()
  141. await expect(page).toHaveURL(/\/chat\/session-yaoer\?profile=yaoer/)
  142. await page.reload()
  143. await expect(page.getByText('瑶儿历史消息', { exact: true })).toBeVisible()
  144. })
  145. test('renders historical assistant MEDIA as Markdown in chat and group chat', async ({ page }) => {
  146. await page.goto('/chat/session-demo')
  147. const image = page.locator('.markdown img[alt="夭夭 Logo"]')
  148. await expect(image).toBeVisible()
  149. await image.click()
  150. const mediaDialog = page.getByRole('dialog', { name: /预览 AppIcon-1024.png/ })
  151. await expect(mediaDialog).toBeVisible()
  152. await expect(mediaDialog.getByRole('button', { name: '下一张媒体' })).toBeVisible()
  153. await mediaDialog.getByRole('button', { name: '下一张媒体' }).click()
  154. await expect(mediaDialog.locator('img')).toHaveAttribute('src', /variant=2/)
  155. await page.keyboard.press('ArrowLeft')
  156. await expect(mediaDialog.locator('img')).not.toHaveAttribute('src', /variant=2/)
  157. await expect(mediaDialog.getByRole('link', { name: /下载 AppIcon-1024\.png/ })).toBeVisible()
  158. await page.keyboard.press('Escape')
  159. await expect(page.getByRole('dialog', { name: /预览 AppIcon-1024.png/ })).toBeHidden()
  160. await image.click()
  161. const reopenedMediaDialog = page.getByRole('dialog', { name: /预览 AppIcon-1024.png/ })
  162. await reopenedMediaDialog.getByRole('button', { name: '添加到聊天' }).click()
  163. await expect(reopenedMediaDialog).toBeHidden()
  164. await expect(page.locator('.composer-attachments img[alt="AppIcon-1024.png"]')).toBeVisible()
  165. await page.getByRole('button', { name: '群聊' }).click()
  166. await expect(page.locator('.markdown img[alt="AppIcon-1024.png"]')).toBeVisible()
  167. })
  168. test('folds tool result rows into their expandable tool call', async ({ page }) => {
  169. await page.goto('/chat/session-demo')
  170. const trace = page.locator('.turn-trace').first()
  171. await expect(trace).not.toHaveAttribute('open', '')
  172. await expect(trace.locator('summary')).toContainText('思考与工具')
  173. await expect(trace.locator('summary')).toContainText('2 段思考 · 2 个工具')
  174. await trace.locator('summary').click()
  175. await expect(trace.locator('.turn-trace__reasoning')).toHaveCount(2)
  176. await expect(trace.locator('.tool-trace')).toHaveCount(2)
  177. await expect(trace.locator('.tool-trace__details')).toHaveCount(2)
  178. await expect(trace.locator('.tool-trace__details').filter({ hasText: '/tmp/demo-report.pdf' })).toBeVisible()
  179. await expect(page.locator('[data-message-id="message-tool-call"]')).toHaveCount(0)
  180. await expect(page.locator('.message--tool')).toHaveCount(0)
  181. })
  182. test('renders subtask completion as a collapsed timeline event', async ({ page }) => {
  183. await page.goto('/chat/session-demo')
  184. await expect(page.getByText('子任务已完成', { exact: true })).toBeVisible()
  185. await expect(page.locator('.delegation-event')).toContainText('2 个子任务 · 2 已完成')
  186. await expect(page.locator('.delegation-event')).not.toHaveAttribute('open', '')
  187. })
  188. test('renders model changes as a collapsed system event', async ({ page }) => {
  189. await page.goto('/chat/session-demo')
  190. await expect(page.getByText('模型已切换:gpt-5.6-terra', { exact: true })).toBeVisible()
  191. await expect(page.locator('.system-event')).not.toHaveAttribute('open', '')
  192. })
  193. test('opens a local message file link as a floating preview card', async ({ page }) => {
  194. await page.goto('/chat/session-demo')
  195. const card = page.getByRole('link', { name: '预览文件 方案草稿.md' })
  196. await expect(card).toHaveClass(/file-link-card/)
  197. await card.click()
  198. const dialog = page.getByRole('dialog', { name: '预览 方案草稿.md' })
  199. await expect(dialog).toBeVisible()
  200. const stageHeight = await dialog.locator('.preview-stage').evaluate(stage => stage.getBoundingClientRect().height)
  201. expect(stageHeight).toBeGreaterThan(500)
  202. })
  203. test('keeps the canonical logo and yaoyao-webui composer geometry', async ({ page }) => {
  204. const logo = page.locator('.rail__brand img')
  205. await expect(logo).toHaveAttribute('src', '/brand/AppIcon-1024.png')
  206. const emptyLogo = page.locator('.new-chat-empty__logo')
  207. await expect(emptyLogo).toHaveAttribute('src', '/brand/AppIcon-1024.png')
  208. await expect(page.getByText('聊点什么', { exact: true })).toBeVisible()
  209. await expect(page.locator('.timeline-header')).toHaveClass(/timeline-header--transparent/)
  210. await expect(page.locator('.composer-context')).toContainText('剩余 256.0k')
  211. await page.getByRole('button', { name: '推理强度:默认' }).click()
  212. await expect(page.locator('.composer-popover--reasoning')).toBeVisible()
  213. await page.getByRole('button', { name: '设置' }).click()
  214. await expect(page.locator('.composer-popover--settings')).toBeVisible()
  215. await expect(page.getByText('语音输入设置', { exact: true })).toBeVisible()
  216. await page.locator('.composer-shell').click()
  217. await page.getByRole('option').first().click()
  218. await expect(page.locator('.timeline')).toHaveCSS('background-color', 'rgb(255, 255, 255)')
  219. await expect(page.locator('.message--assistant .message__avatar')).toHaveCount(0)
  220. await expect(page.locator('.message--assistant .message__meta')).toHaveCount(0)
  221. const assistantMessage = page.locator('.message--assistant-anonymous:not(.message--tool-only)').first()
  222. await page.mouse.move(1200, 20)
  223. await expect(assistantMessage.locator('.message__actions')).toHaveCSS('opacity', '0')
  224. await assistantMessage.hover()
  225. await expect(assistantMessage.locator('.message__actions')).toHaveCSS('opacity', '1')
  226. await expect(page.locator('.message--tool-only .message__actions')).toHaveCount(0)
  227. await expect(page.locator('[data-message-id="message-thinking-tool"]')).toHaveCount(0)
  228. await expect(page.locator('.turn-trace')).toHaveCount(1)
  229. await expect(page.locator('.message--user .message__meta')).toHaveCSS('display', 'none')
  230. await expect(page.getByRole('button', { name: '会话操作' })).toBeVisible()
  231. await page.getByRole('button', { name: '会话操作' }).click()
  232. const sessionMenu = page.getByRole('menu', { name: '会话操作' })
  233. await expect(sessionMenu.getByText('会话大纲', { exact: true })).toBeVisible()
  234. await sessionMenu.getByText('会话大纲', { exact: true }).click()
  235. const outline = page.getByRole('navigation', { name: '会话大纲' })
  236. await expect(outline).toBeVisible()
  237. await expect(outline.getByText('请检查今天生成的产物。MEDIA:/brand/AppIcon-1024.png', { exact: true })).toBeVisible()
  238. await expect(outline.getByText('验收摘要', { exact: true })).toBeVisible()
  239. await outline.getByRole('button', { name: '跳转到 验收摘要' }).click()
  240. await expect(page.locator('[data-message-id="message-assistant"]')).toHaveClass(/message--revealed/)
  241. await page.getByRole('button', { name: '关闭会话大纲' }).click()
  242. await expect(outline).toBeHidden()
  243. await page.getByRole('button', { name: '会话操作' }).click()
  244. await expect(sessionMenu.getByText('取消置顶', { exact: true })).toBeVisible()
  245. const unpinIcon = sessionMenu.getByRole('menuitem', { name: '取消置顶' }).locator('.app-icon')
  246. await expect(unpinIcon.locator('path')).toHaveCount(2)
  247. await expect(unpinIcon.locator('path').last()).toHaveAttribute('d', 'M4 4l16 16')
  248. await expect(page.locator('.desktop-sidebar .sidebar-item--single-line').first().locator('.app-icon path')).toHaveAttribute('fill', 'currentColor')
  249. await expect(sessionMenu.getByText('重命名', { exact: true })).toBeVisible()
  250. await expect(sessionMenu.getByText('删除会话', { exact: true })).toBeVisible()
  251. await expect(page.getByText('置顶会话', { exact: true })).toHaveCount(0)
  252. const menuBox = await sessionMenu.evaluate(element => element.getBoundingClientRect().toJSON())
  253. expect(menuBox.width).toBeLessThanOrEqual(220)
  254. expect(menuBox.height).toBeLessThan(165)
  255. await expect(page.locator('.session-action-layer')).toHaveCount(0)
  256. await sessionMenu.getByText('取消置顶', { exact: true }).click()
  257. await expect(page.locator('.desktop-sidebar').getByText('已置顶 1', { exact: true })).toHaveCount(0)
  258. await page.getByRole('button', { name: '会话操作' }).click()
  259. await sessionMenu.getByText('置顶会话', { exact: true }).click()
  260. await expect(page.locator('.desktop-sidebar').getByText('已置顶 1', { exact: true })).toBeVisible()
  261. const compactSession = page.locator('.desktop-sidebar .sidebar-item--single-line').first()
  262. const compactMetrics = await compactSession.evaluate(element => {
  263. const title = element.querySelector('strong')
  264. return {
  265. height: element.getBoundingClientRect().height,
  266. weight: title ? Number(getComputedStyle(title).fontWeight) : 0,
  267. }
  268. })
  269. expect(compactMetrics.height).toBeLessThanOrEqual(31)
  270. expect(compactMetrics.weight).toBeLessThan(500)
  271. await compactSession.click({ button: 'right' })
  272. await expect(sessionMenu).toBeVisible()
  273. await page.keyboard.press('Escape')
  274. const composer = page.locator('.composer-shell')
  275. await expect(composer).toBeVisible()
  276. const geometry = await composer.evaluate(element => {
  277. const rect = element.getBoundingClientRect()
  278. const style = getComputedStyle(element)
  279. return { width: rect.width, minHeight: style.minHeight, radius: style.borderRadius }
  280. })
  281. expect(geometry.width).toBeLessThanOrEqual(760)
  282. expect(geometry.minHeight).toBe('72px')
  283. expect(geometry.radius).toBe('18px')
  284. const send = page.getByRole('button', { name: '发送消息' })
  285. await expect(send).toHaveCSS('width', '34px')
  286. await expect(send).toHaveCSS('height', '34px')
  287. })
  288. test('uses the unified Grok-style sidebar, search trigger, and persistent collapse', async ({ page }) => {
  289. const sidebar = page.locator('.desktop-sidebar')
  290. await expect(sidebar).toBeVisible()
  291. await expect(sidebar).toHaveCSS('width', '264px')
  292. await expect(sidebar.locator('.brand-mark__name')).toHaveCount(0)
  293. await expect(sidebar.locator('.profile-switcher')).toHaveCount(0)
  294. await expect(sidebar.locator('.sidebar-account-switcher')).toHaveCount(1)
  295. await expect(page.getByRole('button', { name: '搜索', exact: true })).toBeVisible()
  296. await expect(page.getByRole('button', { name: '新建聊天', exact: true })).toBeVisible()
  297. await expect(page.getByRole('button', { name: '新建聊天', exact: true })).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
  298. await expect(page.getByRole('button', { name: '新建聊天', exact: true })).toHaveCSS('font-weight', '580')
  299. await expect(sidebar.getByText('历史记录', { exact: true })).toBeVisible()
  300. const searchTrigger = page.getByRole('button', { name: '搜索', exact: true })
  301. const triggerBox = await searchTrigger.boundingBox()
  302. await searchTrigger.click()
  303. const search = page.getByPlaceholder('搜索会话').filter({ visible: true })
  304. await expect(search).toBeVisible()
  305. await page.waitForTimeout(150)
  306. const inputBox = await search.evaluate(element => {
  307. const rect = element.closest('label')?.getBoundingClientRect()
  308. return rect ? { y: rect.y, height: rect.height } : null
  309. })
  310. expect(inputBox?.y).toBe(triggerBox?.y)
  311. expect(inputBox?.height).toBe(triggerBox?.height)
  312. await search.fill('验收')
  313. await expect(page.getByRole('option', { name: /夭夭 Web 验收会话/ })).toBeVisible()
  314. await search.press('Escape')
  315. await expect(search).toBeHidden()
  316. await expect(searchTrigger).toBeVisible()
  317. await expect(searchTrigger).toHaveAttribute('aria-expanded', 'false')
  318. await page.getByRole('button', { name: '折叠侧边栏' }).click()
  319. await expect(sidebar).toHaveCSS('width', '68px')
  320. const collapseBox = await page.getByRole('button', { name: '展开侧边栏' }).boundingBox()
  321. const accountBox = await sidebar.locator('.sidebar-account-switcher__main').boundingBox()
  322. expect(collapseBox?.y).toBeLessThan(accountBox?.y ?? 0)
  323. await expect(sidebar.getByText('历史记录', { exact: true })).toBeHidden()
  324. await expect(page.getByRole('button', { name: '搜索', exact: true })).toBeVisible()
  325. await expect(page.getByRole('button', { name: '新建聊天', exact: true })).toBeVisible()
  326. await page.reload()
  327. await expect(sidebar).toHaveCSS('width', '68px')
  328. await page.getByRole('button', { name: '搜索', exact: true }).click()
  329. await expect(sidebar).toHaveCSS('width', '264px')
  330. await expect(page.getByPlaceholder('搜索会话').filter({ visible: true })).toBeVisible()
  331. })
  332. test('uses the mobile composer and keeps the closed drawer inert', async ({ page }) => {
  333. await page.setViewportSize({ width: 390, height: 844 })
  334. await page.reload()
  335. await expect(page.getByRole('navigation')).not.toBeVisible()
  336. const drawer = page.locator('.mobile-drawer')
  337. await expect(drawer).toHaveAttribute('aria-hidden', 'true')
  338. await expect(drawer).toHaveAttribute('inert', '')
  339. await expect(page.locator('.composer-shell')).toHaveCSS('min-height', '118px')
  340. await expect(page.locator('.composer-textarea')).toHaveCSS('font-size', '16px')
  341. })