Skip to content

Commit

Permalink
fix(docs): [anchor] 修复测试用例报错
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxi-20 authored and zzcr committed Nov 8, 2024
1 parent f0a85c4 commit bf37865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/anchor/change.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test('change事件', async ({ page }) => {
await page.goto('anchor#change')

const anchor = page.locator('.tiny-anchor')
const link1 = anchor.getByRole('link', { name: '演示' })
const link1 = anchor.getByRole('link', { name: '基本用法' })
const link2 = anchor.getByRole('link', { name: 'change 事件' })

const values = [] as string[]
Expand All @@ -16,6 +16,6 @@ test('change事件', async ({ page }) => {
})
await link1.click()
await link2.click()
expect(values.length).toBe(3)
expect(values.length).toBe(2)
expect(values[0].startsWith('当前锚点')).toBeTruthy()
})

0 comments on commit bf37865

Please sign in to comment.