Jelajahi Sumber

同步归档搜索验收到带独立删除操作的列表结构

LSamien 1 bulan lalu
induk
melakukan
03632f198c
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      tests/e2e/workspace-chat.spec.ts

+ 3 - 3
tests/e2e/workspace-chat.spec.ts

@@ -347,12 +347,12 @@ test('created roles and editable teams share a durable chat list without plugin
   const search = page.getByRole('dialog', { name: '搜索聊天', exact: true })
   const search = page.getByRole('dialog', { name: '搜索聊天', exact: true })
   await expect(search).toBeVisible()
   await expect(search).toBeVisible()
   await search.getByRole('searchbox', { name: '搜索聊天', exact: true }).fill('产品开发')
   await search.getByRole('searchbox', { name: '搜索聊天', exact: true }).fill('产品开发')
-  await expect(search.getByRole('option')).toHaveCount(0)
+  await expect(search.getByRole('listitem')).toHaveCount(0)
   await search.getByRole('tab', { name: '已归档', exact: true }).click()
   await search.getByRole('tab', { name: '已归档', exact: true }).click()
   await expect(search.getByRole('searchbox')).toHaveValue('产品开发')
   await expect(search.getByRole('searchbox')).toHaveValue('产品开发')
-  await expect(search.getByRole('option')).toHaveCount(1)
+  await expect(search.getByRole('listitem')).toHaveCount(1)
   await page.screenshot({ path: testInfo.outputPath('archived-chat-search.png'), fullPage: true })
   await page.screenshot({ path: testInfo.outputPath('archived-chat-search.png'), fullPage: true })
-  await search.getByRole('option').click()
+  await search.getByRole('listitem').getByRole('button').filter({ hasText: '产品开发团队' }).click()
   await expect(search).not.toBeVisible()
   await expect(search).not.toBeVisible()
   await expect(page.getByPlaceholder('输入消息,Enter 发送,Shift + Enter 换行')).toBeDisabled()
   await expect(page.getByPlaceholder('输入消息,Enter 发送,Shift + Enter 换行')).toBeDisabled()
   await page.goto(directURL)
   await page.goto(directURL)