diff --git a/examples/sites/demos/pc/app/floatbar/base.spec.ts b/examples/sites/demos/pc/app/floatbar/base.spec.ts index 152862890..007be9e2c 100644 --- a/examples/sites/demos/pc/app/floatbar/base.spec.ts +++ b/examples/sites/demos/pc/app/floatbar/base.spec.ts @@ -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() diff --git a/examples/sites/demos/pc/app/floatbar/custom-floatbar-item.spec.ts b/examples/sites/demos/pc/app/floatbar/custom-floatbar-item.spec.ts index 1ff65489a..e0ed6e1f4 100644 --- a/examples/sites/demos/pc/app/floatbar/custom-floatbar-item.spec.ts +++ b/examples/sites/demos/pc/app/floatbar/custom-floatbar-item.spec.ts @@ -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) diff --git a/examples/sites/demos/pc/app/floatbar/custom-style.spec.ts b/examples/sites/demos/pc/app/floatbar/custom-style.spec.ts index 0c6268e7a..4c0da1f25 100644 --- a/examples/sites/demos/pc/app/floatbar/custom-style.spec.ts +++ b/examples/sites/demos/pc/app/floatbar/custom-style.spec.ts @@ -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)') diff --git a/examples/sites/demos/pc/app/floatbar/operation-floatbar-item.spec.ts b/examples/sites/demos/pc/app/floatbar/operation-floatbar-item.spec.ts index b3fc06cad..803a3791c 100644 --- a/examples/sites/demos/pc/app/floatbar/operation-floatbar-item.spec.ts +++ b/examples/sites/demos/pc/app/floatbar/operation-floatbar-item.spec.ts @@ -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()