tiny-vue/examples/docs/resources/pc/demo/checkbox/checkbox-button-multiple.sp...

11 lines
443 B
TypeScript

import { test, expect } from '@playwright/test'
test('多行按钮', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('http://localhost:7130/pc/checkbox/checkbox-button-multiple')
const preview = page.locator('#preview')
const checkbox = preview.locator('.tiny-checkbox-group > label')
await checkbox.nth(2).click()
await expect(checkbox.nth(2)).toHaveClass(/is-checked/)
})