forked from opentiny/tiny-vue
20 lines
805 B
TypeScript
20 lines
805 B
TypeScript
import { test, expect } from '@playwright/test'
|
|
|
|
test('不同尺寸', async ({ page }) => {
|
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
await page.goto('dropdown#size')
|
|
|
|
const wrap = page.locator('#size')
|
|
const dropDown = wrap.locator('.tiny-dropdown')
|
|
|
|
const defaultDropDown = dropDown.first()
|
|
const mediumDropDown = dropDown.nth(1)
|
|
const smallDropDown = dropDown.nth(2)
|
|
const miniDropDown = dropDown.nth(3)
|
|
|
|
await expect(defaultDropDown.locator('.tiny-button-group')).toHaveCSS('height', '28px')
|
|
await expect(mediumDropDown.locator('.tiny-button-group')).toHaveCSS('height', '40px')
|
|
await expect(smallDropDown.locator('.tiny-button-group')).toHaveCSS('height', '32px')
|
|
await expect(miniDropDown.locator('.tiny-button-group')).toHaveCSS('height', '24px')
|
|
})
|