tiny-vue_version0/examples/sites/demos/pc/app/time-picker/picker-options.spec.ts

23 lines
1.0 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { test, expect } from '@playwright/test'
test('固定时间范围', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('time-picker#picker-options')
const selectTime = page.getByRole('textbox', { name: '18:40:00' })
// 点击17点点击确定关闭选择框后查看input 时间是否仍是184000
await selectTime.click()
await page.waitForTimeout(100)
await page.getByRole('listitem').filter({ hasText: '17' }).first().click()
await page.getByRole('button', { name: '确定' }).click()
await page.waitForTimeout(100)
await expect(selectTime).toBeVisible()
// 点击21点点击确定关闭选择框后查看input 时间是否仍是184000
await selectTime.click()
await page.waitForTimeout(100)
await page.getByRole('listitem').filter({ hasText: '21' }).first().click()
await page.getByRole('button', { name: '确定' }).click()
await page.waitForTimeout(100)
await expect(selectTime).toBeVisible()
})