Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Carousel spec #556

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/functional/tests/ui/core/components/Carousel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ test.beforeEach(async ({ page }) => {
.getByRole('tablist', { name: 'Slides' })
.scrollIntoViewIfNeeded();

await expect(page.getByRole('link', { name: '[Sample] Tiered Wire Basket' })).toBeVisible();
await page.getByRole('link', { name: '[Sample] Able Brewing System' }).scrollIntoViewIfNeeded();

await expect(page.getByRole('link', { name: '[Sample] Able Brewing System' })).toBeVisible();
});

test('Navigate to next set of products', async ({ page }) => {
Expand All @@ -19,7 +21,7 @@ test('Navigate to next set of products', async ({ page }) => {
.getByRole('button', { name: 'Next products' })
.click();

await expect(page.getByRole('link', { name: '[Sample] Fog Linen Chambray' })).toBeVisible();
await expect(page.getByRole('link', { name: '[Sample] Orbit Terrarium - Large' })).toBeVisible();
});

test('Navigate to previous set of products', async ({ page }) => {
Expand All @@ -29,12 +31,10 @@ test('Navigate to previous set of products', async ({ page }) => {
.getByRole('button', { name: 'Previous products' })
.click();

await expect(page.getByRole('link', { name: '[Sample] Fog Linen Chambray' })).toBeVisible();
await expect(page.getByRole('link', { name: '[Sample] Orbit Terrarium - Large' })).toBeVisible();
});

test('Navigation on set of products is cyclic', async ({ page }) => {
await expect(page.getByRole('link', { name: '[Sample] Tiered Wire Basket' })).toBeVisible();

await page
.getByRole('region')
.filter({ has: page.getByRole('heading', { name: 'Best Selling Products' }) })
Expand All @@ -47,5 +47,5 @@ test('Navigation on set of products is cyclic', async ({ page }) => {
.getByRole('button', { name: 'Next products' })
.click();

await expect(page.getByRole('link', { name: '[Sample] Tiered Wire Basket' })).toBeVisible();
await expect(page.getByRole('link', { name: '[Sample] Able Brewing System' })).toBeVisible();
});
Loading