tiny-vue/examples/sites/demos/pc/app/time-picker/editable.spec.ts

16 lines
505 B
TypeScript

import { test, expect } from '@playwright/test'
test('文本框不可输入', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('time-picker#editable')
const timePicker = page.locator('.tiny-date-editor input')
await timePicker.hover()
await page.waitForTimeout(100)
await expect(timePicker).toHaveValue('18:40:00')
await timePicker.click()
await page.keyboard.type('19:40:00')
await expect(timePicker).toHaveValue('18:40:00')
})