Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/date-picker/format.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('[DatePicker] 测试日期格式化', async ({ page }) => {

// time-format: 时间输入框中显示的格式
await page.locator('.tiny-date-editor input').nth(1).click()
await page.getByRole('row', { name: '21 22 23 24 25 26 27' }).getByText('24').click()
await page.getByRole('cell', { name: '24' }).locator('span').click();
await page.getByRole('button', { name: '确定' }).click()
await expect(page.locator('.tiny-date-editor input').nth(1)).toHaveValue('2023 年 05 月 24 日 08 时 00 分 00 秒')

Expand Down
12 changes: 3 additions & 9 deletions examples/sites/demos/pc/app/time-picker/format.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,9 @@ test('时间格式化', async ({ page }) => {
await expect(page.getByRole('textbox', { name: '19:30:00' })).toBeVisible()

// picker-options.format: 下拉框中显示的格式
const timePickerHour = page
.locator(
'div:nth-child(14) > .tiny-time-panel__content > .tiny-time-spinner > div > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(19)'
)
.first()
const timePickerMinute = page.locator(
'div:nth-child(14) > .tiny-time-panel__content > .tiny-time-spinner > div:nth-child(2) > .tiny-scrollbar__wrap > .tiny-scrollbar__view > li:nth-child(41)'
)
const timePickerSecond = page.locator('.of-hidden > div:nth-child(12) .tiny-scrollbar').nth(2)
const timePickerHour = page.getByRole('list').first()
const timePickerMinute = page.getByRole('list').nth(1)
const timePickerSecond = page.getByRole('list').nth(2)
await page.getByRole('textbox', { name: '18:40:00' }).click()
await page.waitForTimeout(200)
await expect(timePickerHour).toBeVisible()
Expand Down
Loading