forked from opentiny/tiny-vue
test(drop-tmies): [drop-times] amend drop-times e2e test (#1184)
This commit is contained in:
parent
491a5489f5
commit
6ec2a3cc4f
|
@ -4,7 +4,7 @@ test('基本用法', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('drop-times#basic-usage')
|
||||
|
||||
const droptimes = page.getByPlaceholder('请选择')
|
||||
const droptimes = page.locator('#basic-usage').getByRole('textbox', { name: '请选择' })
|
||||
const option = page.getByRole('listitem').filter({ hasText: '01:00' })
|
||||
|
||||
await droptimes.click()
|
||||
|
|
|
@ -4,6 +4,10 @@ test('设置组件尺寸', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('drop-times#size')
|
||||
|
||||
const droptimes = page.locator('.tiny-select')
|
||||
const droptimes = page.locator('.drop-time-demo-size > div:nth-child(1)')
|
||||
await expect(droptimes).toHaveClass(/tiny-select--medium/)
|
||||
const droptimesSmall = page.locator('.drop-time-demo-size > div:nth-child(2)')
|
||||
await expect(droptimesSmall).toHaveClass(/tiny-select--small/)
|
||||
const droptimesMini = page.locator('.drop-time-demo-size > div:nth-child(3)')
|
||||
await expect(droptimesMini).toHaveClass(/tiny-select--mini/)
|
||||
})
|
||||
|
|
|
@ -4,7 +4,7 @@ test('步长与时间区间', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('drop-times#start-end-step')
|
||||
|
||||
const droptimes = page.getByPlaceholder('请选择')
|
||||
const droptimes = page.locator('#start-end-step').getByRole('textbox', { name: '请选择' })
|
||||
const option1 = page.locator('.tiny-select-dropdown__item').first()
|
||||
const option2 = page.locator('.tiny-select-dropdown__item').nth(1)
|
||||
const option3 = page.locator('.tiny-select-dropdown__item').last()
|
||||
|
|
Loading…
Reference in New Issue