Skip to content

Commit

Permalink
fix: removing VRT cases for now (#18328)
Browse files Browse the repository at this point in the history
  • Loading branch information
preetibansalui authored Jan 13, 2025
1 parent e14e657 commit 847167e
Showing 1 changed file with 0 additions and 132 deletions.
132 changes: 0 additions & 132 deletions e2e/components/Popover/Popover-test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
});
});
});
});

0 comments on commit 847167e

Please sign in to comment.