Skip to content

Commit

Permalink
fix(date-picker): fix date-picker e2e test error
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr committed Jan 6, 2025
1 parent b0a7e77 commit 26408c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/sites/demos/pc/app/date-picker/clear.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ test('[DatePicker] 测试清除输入', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('date-picker#clear')

const datePickerDefaultClearIcon = page.getByRole('textbox').nth(1)
const datePickerHideClearIcon = page.getByRole('textbox').nth(2)
const datePickerCustomClearIcon = page.getByRole('textbox').nth(3)
const clearIcon = page.locator('.tiny-date-editor .tiny-input__icon-container .baseClearicon')
const demo = page.locator('#clear')

const datePickerDefaultClearIcon = demo.getByRole('textbox').nth(0)
const datePickerHideClearIcon = demo.getByRole('textbox').nth(1)
const datePickerCustomClearIcon = demo.getByRole('textbox').nth(2)
const clearIcon = demo.locator('.tiny-date-editor .tiny-input__icon-container .baseClearicon')

// 默认显示清除按钮
await datePickerDefaultClearIcon.hover()
Expand Down

0 comments on commit 26408c6

Please sign in to comment.