Skip to content

Commit

Permalink
test(e2e): update breadcrumb e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr committed Sep 29, 2024
1 parent d8a5e32 commit ad65fc7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/breadcrumb/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ test('Breadcrumb 基础用法', async ({ page }) => {
// 面包屑导航、导航项出现,当前页导航加粗
await expect(breadcrumb).toBeVisible()
await expect(breadcrumbItem).toHaveCount(3)
await expect(currentItem.last().locator('.is-link')).toHaveCSS('font-weight', '700')
await expect(currentItem.last().locator('.is-link')).toHaveCSS('font-weight', '600')

// 分隔符
await expect(separator).toHaveCount(3)
await expect(separator.first()).toHaveText(/>/)
await expect(separator.first()).toHaveText(/\//)
await expect(separator.last()).toBeHidden()

// 点击导航项
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/breadcrumb/options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ test('Breadcrumb options配置', async ({ page }) => {
// 面包屑导航、导航项出现,当前页导航加粗
await expect(breadcrumb).toBeVisible()
await expect(breadcrumbItem).toHaveCount(3)
await expect(currentItem.last().getByRole('link')).toHaveCSS('font-weight', '700')
await expect(currentItem.last().getByRole('link')).toHaveCSS('font-weight', '600')

// 分隔符
await expect(separator).toHaveCount(3)
await expect(separator.first()).toHaveText(/>/)
await expect(separator.first()).toHaveText(/\//)
await expect(separator.last()).toBeHidden()

// 点击导航项
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/breadcrumb/size.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ test('Breadcrumb 尺寸设置', async ({ page }) => {
// 面包屑导航、导航项出现,当前页导航加粗
await expect(breadcrumb).toBeVisible()
await expect(breadcrumbItem).toHaveCount(3)
await expect(currentItem.last().locator('.is-link')).toHaveCSS('font-weight', '700')
await expect(currentItem.last().locator('.is-link')).toHaveCSS('font-weight', '600')

// 尺寸
await expect(breadcrumbItemMedium).toBeVisible()

// 分隔符
await expect(separator).toHaveCount(3)
await expect(separator.first()).toHaveText(/>/)
await expect(separator.first()).toHaveText(/\//)
await expect(separator.last()).toBeHidden()

// 点击导航项
Expand Down

0 comments on commit ad65fc7

Please sign in to comment.