tiny-vue/examples/sites/demos/pc/app/drawer/confirm-event.spec.ts

12 lines
482 B
TypeScript

import { test, expect } from '@playwright/test'
test('确认事件', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('drawer#confirm-event')
const message = page.locator('.tiny-modal.type__message').filter({ hasText: '确认事件' }).first()
await page.getByRole('button', { name: '确认事件示例' }).click()
await page.getByRole('button', { name: '确定' }).click()
await expect(message).toBeVisible()
})