Переглянути джерело

test(web): type the Code Mode fixture group row

Tianyi Cui 1 місяць тому
батько
коміт
aecc16f2d8
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      apps/web/tests/code-mode-fixture.snapshot.ts

+ 1 - 1
apps/web/tests/code-mode-fixture.snapshot.ts

@@ -105,7 +105,7 @@ function visibleText(element: Element): string {
 /** Open the fixture history session (the alpha log carrying the run_code turn) and scroll to its tail. */
 async function openFixtureSession(): Promise<void> {
   const tree = await screen.findByRole('tree', { name: 'Sessions' }, { timeout: 10_000 })
-  const group = within(tree).getByText('4 sessions').closest('[role="treeitem"]')
+  const group = within(tree).getByText('4 sessions').closest<HTMLElement>('[role="treeitem"]')
   if (group === null) throw new Error('fixture Workspace group missing')
   if (group.getAttribute('aria-expanded') === 'false') {
     fireEvent.click(within(group).getByText('fixture'))