diff --git a/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts b/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts index 31a822ee0f7..c2a8d167254 100644 --- a/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts +++ b/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts @@ -3,10 +3,7 @@ import { configs, test } from '@utils/test/playwright'; configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('infinite-scroll: top'), () => { - test('should load more items when scrolled to the top', async ({ page, skip }) => { - // TODO(FW-6394): remove once flaky issue is resolved - skip.browser('webkit', 'Safari is flaky on CI'); - + test('should load more items when scrolled to the top', async ({ page }) => { await page.goto('/src/components/infinite-scroll/test/top', config); const ionInfiniteComplete = await page.spyOnEvent('ionInfiniteComplete'); @@ -14,6 +11,19 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { const items = page.locator('ion-item'); expect(await items.count()).toBe(30); + await content.evaluate(async (el: HTMLIonContentElement) => { + const scrollEl = await el.getScrollElement(); + scrollEl.scrollTop = 100; + }); + await expect + .poll(async () => { + return content.evaluate(async (el: HTMLIonContentElement) => { + const scrollEl = await el.getScrollElement(); + return scrollEl.scrollTop; + }); + }) + .toBeGreaterThan(0); + await content.evaluate((el: HTMLIonContentElement) => el.scrollToTop(0)); await ionInfiniteComplete.next();