tiny-vue_version0/examples/sites/demos/pc/app/dialog-box/dialog-width.spec.ts

13 lines
498 B
TypeScript

import { test, expect } from '@playwright/test'
test('dialogBox 弹窗的宽度', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('dialog-box#dialog-width')
const dialogBox = page.locator('.tiny-dialog-box')
await page.getByRole('button', { name: /30%/ }).click()
await page.getByRole('button', { name: 'Close' }).click()
await page.getByRole('button', { name: /60%/ }).click()
await expect(dialogBox.nth(1)).toBeVisible()
})