diff --git a/examples/sites/demos/pc/app/grid/large-data/full-data-loading.spec.js b/examples/sites/demos/pc/app/grid/large-data/full-data-loading.spec.js index 5cb20b20a..4ce2f96a9 100644 --- a/examples/sites/demos/pc/app/grid/large-data/full-data-loading.spec.js +++ b/examples/sites/demos/pc/app/grid/large-data/full-data-loading.spec.js @@ -7,12 +7,15 @@ test('全量加载', async ({ page }) => { width: 1400, height: 2500 }) - await page.locator('.tiny-grid__body').hover() + await page.waitForTimeout(1000) + await page.locator('.tiny-grid__body-wrapper').hover() + await page.locator('.tiny-grid__body-wrapper').click() // 先滚动 1000px await page.mouse.wheel(0, 1000) await expect(page.getByRole('cell', { name: '28' })).toBeVisible() await page.waitForTimeout(500) - await page.locator('.tiny-grid__body').hover() + await page.locator('.tiny-grid__body-wrapper').hover() + await page.locator('.tiny-grid__body-wrapper').click() // 先滚动 4000px await page.mouse.wheel(0, 5000) await page.waitForTimeout(200) diff --git a/examples/sites/demos/pc/app/grid/large-data/virtual-rolling.spec.js b/examples/sites/demos/pc/app/grid/large-data/virtual-rolling.spec.js index e5d93db8b..931f9c0fd 100644 --- a/examples/sites/demos/pc/app/grid/large-data/virtual-rolling.spec.js +++ b/examples/sites/demos/pc/app/grid/large-data/virtual-rolling.spec.js @@ -3,12 +3,19 @@ import { test, expect } from '@playwright/test' test('虚拟滚动', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('grid-large-data#large-data-virtual-rolling') - await page.locator('.tiny-grid__body').hover() + await page.setViewportSize({ + width: 1400, + height: 2500 + }) + await page.waitForTimeout(1000) + await page.locator('.tiny-grid__body-wrapper').hover() + await page.locator('.tiny-grid__body-wrapper').click() // 先滚动 1000px await page.mouse.wheel(0, 1000) await expect(page.getByRole('cell', { name: '24' })).toBeVisible() await page.waitForTimeout(500) - await page.locator('.tiny-grid__body').hover() + await page.locator('.tiny-grid__body-wrapper').hover() + await page.locator('.tiny-grid__body-wrapper').click() // 先滚动 4000px await page.mouse.wheel(0, 5000) await expect(page.getByRole('cell', { name: '124' })).toBeVisible()