fix(test): [tabs] Fix e2e test cases (#1613)

This commit is contained in:
chenxi-20 2024-05-09 17:32:28 +08:00 committed by GitHub
parent d4c2e6d1e5
commit faf857c229
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,8 @@ test('自动撑宽', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('tabs#stretch-wh')
const { width } = await page.getByRole('tab', { name: '表单组件,测试标签页宽度根据标题长度自动撑开' }).boundingBox()
const tabItem = page.getByRole('tab', { name: '表单组件,测试标签页宽度根据标题长度自动撑开' })
await expect(width).toBeGreaterThanOrEqual(360)
await tabItem.isVisible()
await expect(tabItem).toHaveCSS('flex-grow', '1')
})