forked from opentiny/tiny-vue
test(floatbar): fix running failed E2E cases (#1443)
This commit is contained in:
parent
db3ccaafd0
commit
0b4ef3c55f
|
@ -4,7 +4,7 @@ test('基本用法', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('floatbar#base')
|
||||
|
||||
const floatbar = page.locator('#preview .tiny-float-bar')
|
||||
const floatbar = page.locator('.tiny-float-bar')
|
||||
await expect(floatbar).toBeVisible()
|
||||
await expect(floatbar).toHaveCSS('right', '10px')
|
||||
await page.getByRole('listitem').filter({ hasText: 'Default-A' }).click()
|
||||
|
|
|
@ -4,7 +4,7 @@ test('自定义内容', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('floatbar#custom-floatbar-item')
|
||||
|
||||
const floatbar = page.locator('#preview .tiny-float-bar')
|
||||
const floatbar = page.locator('.tiny-float-bar')
|
||||
const item1 = floatbar.getByRole('listitem').first()
|
||||
const item2 = floatbar.getByRole('listitem').nth(1)
|
||||
const item3 = floatbar.getByRole('listitem').nth(2)
|
||||
|
|
|
@ -4,7 +4,7 @@ test('自定义样式', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('floatbar#custom-style')
|
||||
|
||||
const floatbar = page.locator('#preview .tiny-float-bar')
|
||||
const floatbar = page.locator('.tiny-float-bar')
|
||||
const item = page.getByRole('listitem').filter({ hasText: 'Default-A' })
|
||||
await expect(floatbar).toHaveClass(/custom/)
|
||||
await expect(floatbar).toHaveCSS('background-color', 'rgb(222, 184, 135)')
|
||||
|
|
|
@ -4,7 +4,7 @@ test('操作浮动块内容', async ({ page }) => {
|
|||
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
||||
await page.goto('floatbar#operation-floatbar-item')
|
||||
|
||||
const floatbar = page.locator('#preview .tiny-float-bar')
|
||||
const floatbar = page.locator('.tiny-float-bar')
|
||||
const item = floatbar.getByRole('listitem').filter({ hasText: 'custom-Add' })
|
||||
await page.getByRole('button', { name: '增加一项' }).click()
|
||||
await expect(item).toBeVisible()
|
||||
|
|
Loading…
Reference in New Issue