tiny-vue_version0/examples/sites/demos/pc/app/currency/custom-service.spec.ts

12 lines
507 B
TypeScript

import { test, expect } from '@playwright/test'
test('自定义服务', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('currency#custom-service')
await page.locator('#custom-service').getByRole('textbox').click()
await page.waitForTimeout(500)
await page.getByRole('listitem').filter({ hasText: 'USD' }).click()
const inputBox = page.locator('#custom-service').getByRole('textbox').first()
await expect(inputBox).toHaveValue('USD')
})