diff --git a/e2e/components/Popover/Popover-test.e2e.js b/e2e/components/Popover/Popover-test.e2e.js index 3dfa8e5c6887..130a6fdcb3c7 100644 --- a/e2e/components/Popover/Popover-test.e2e.js +++ b/e2e/components/Popover/Popover-test.e2e.js @@ -30,138 +30,6 @@ test.describe('Popover', () => { theme, }); }); - // test experimental autoAlign - test('popover - expermental autoAlign scroll to left @vrt', async ({ - page, - }) => { - await visitStory(page, { - component: 'popover', - story: 'experimental-auto-align', - theme, - }); - await page.evaluate(() => { - window.scrollBy(-500, 0); // Scroll 500px to the left - }); - - await expect - .poll( - async () => { - const scrollPosition = await page.evaluate(() => { - return window.scrollX; - }); - return scrollPosition; - }, - { - timeout: 2000, - } - ) - .toBe(1376); - - await snapshot(page, { - component: 'popover', - story: 'experimental-auto-align-left', - theme, - }); - }); - - test('popover - expermental autoAlign scroll to right @vrt', async ({ - page, - }) => { - await visitStory(page, { - component: 'popover', - story: 'experimental-auto-align', - theme, - }); - await page.evaluate(() => { - window.scrollBy(500, 0); // Scroll 500px to the right - }); - - await expect - .poll( - async () => { - const scrollPosition = await page.evaluate(() => { - return window.scrollX; - }); - return scrollPosition; - }, - { - timeout: 2000, - } - ) - .toBe(2376); - - await snapshot(page, { - component: 'popover', - story: 'experimental-auto-align-right', - theme, - }); - }); - - test('popover - expermental autoAlign scroll to top @vrt', async ({ - page, - }) => { - await visitStory(page, { - component: 'popover', - story: 'experimental-auto-align', - theme, - }); - await page.evaluate(() => { - window.scrollBy(0, -350); // Scroll 350px to the top - }); - - await expect - .poll( - async () => { - const scrollPosition = await page.evaluate(() => { - return window.scrollY; - }); - return scrollPosition; - }, - { - timeout: 2000, - } - ) - .toBe(1806); - - await snapshot(page, { - component: 'popover', - story: 'experimental-auto-align-top', - theme, - }); - }); - - test('popover - expermental autoAlign scroll to bottom @vrt', async ({ - page, - }) => { - await visitStory(page, { - component: 'popover', - story: 'experimental-auto-align', - theme, - }); - await page.evaluate(() => { - window.scrollBy(0, 350); // Scroll 350px to the bottom - }); - - await expect - .poll( - async () => { - const scrollPosition = await page.evaluate(() => { - return window.scrollY; - }); - return scrollPosition; - }, - { - timeout: 2000, - } - ) - .toBe(2506); - - await snapshot(page, { - component: 'popover', - story: 'experimental-auto-align-bottom', - theme, - }); - }); }); }); });