-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(functional): Add visual regression tests using latest deploys
fix: update workflows yml
- Loading branch information
1 parent
dfd5b25
commit 782588d
Showing
160 changed files
with
409 additions
and
836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@bigcommerce/catalyst-core": patch | ||
--- | ||
|
||
Migrate visual regression tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default { | ||
SHOP_ALL: '/shop-all', | ||
SAMPLE_ABLE_BREWING_SYSTEM: '/sample-able-brewing-system', | ||
ORBIT_TERRARIUM_LARGE: '/orbit-terrarium-large', | ||
BLOG: '/blog', | ||
BATH_LUXURY: '/bath/towels/luxury', | ||
QUICK_ADD_77: '/shop-all/?showQuickAdd=77', | ||
QUICK_ADD_93: '/?showQuickAdd=93', | ||
CONTACT_US: '/contact-us', | ||
LOGIN: '/login', | ||
FOG_LINEN_CHAMBRAY: '/fog-linen-chambray-towel-beige-stripe/', | ||
PARFAIT_JAR: '/1-l-le-parfait-jar', | ||
}; |
21 changes: 21 additions & 0 deletions
21
apps/core/tests/visual-regression/packages/components/accordion.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
const divStateOpen = 'div[data-state="open"]'; | ||
const divStateClosed = 'div[data-state="closed"]'; | ||
|
||
test('accordion expanded', async ({ page }) => { | ||
await page.goto(routes.SHOP_ALL); | ||
|
||
await expect(page.locator(divStateOpen).first()).toHaveScreenshot(); | ||
}); | ||
|
||
test('accordion closed', async ({ page }) => { | ||
await page.goto(routes.SHOP_ALL); | ||
await page.getByRole('button', { name: 'Brand' }).click(); | ||
await page.waitForLoadState('networkidle'); | ||
await page.locator(divStateClosed).first().waitFor({ state: 'visible' }); | ||
|
||
await expect(page.locator(divStateClosed).first()).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+1.42 KB
...onents/accordion.spec.ts-snapshots/accordion-closed-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.03 KB
...ents/accordion.spec.ts-snapshots/accordion-expanded-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
apps/core/tests/visual-regression/packages/components/badge.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('badge with icon', async ({ page }) => { | ||
await page.goto(routes.SAMPLE_ABLE_BREWING_SYSTEM); | ||
await expect( | ||
page.getByRole('heading', { level: 1, name: '[Sample] Able Brewing System' }), | ||
).toBeVisible(); | ||
await page.getByRole('button', { name: 'Add to Cart' }).first().click(); | ||
await page.getByRole('link', { name: 'Cart Items 1' }).click(); | ||
await expect(page.getByRole('heading', { level: 1, name: 'Your cart' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('link', { name: 'Cart Items 1' })).toHaveScreenshot(); | ||
|
||
await page.getByRole('button', { name: 'Remove item from cart' }).first().click(); | ||
await expect(page.getByRole('heading', { name: 'Your cart is empty' })).toBeVisible(); | ||
}); |
Binary file added
BIN
+811 Bytes
.../components/badge.spec.ts-snapshots/badge-with-icon-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
apps/core/tests/visual-regression/packages/components/blog-post-card.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('blog post card', async ({ page }) => { | ||
await page.goto(routes.BLOG); | ||
await expect(page.getByRole('heading', { name: 'Blog', exact: true })).toBeVisible(); | ||
|
||
await expect( | ||
page.getByRole('heading', { name: 'Blog', exact: true }).locator('..'), | ||
).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+36.1 KB
...nts/blog-post-card.spec.ts-snapshots/blog-post-card-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/breadcrumbs.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('breadcrumbs', async ({ page }) => { | ||
await page.goto(routes.BATH_LUXURY); | ||
await expect(page.getByLabel('Breadcrumb')).toBeVisible(); | ||
|
||
await expect(page.getByLabel('Breadcrumb')).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+2.92 KB
...onents/breadcrumbs.spec.ts-snapshots/blog-post-card-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.92 KB
...omponents/breadcrumbs.spec.ts-snapshots/breadcrumbs-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
apps/core/tests/visual-regression/packages/components/button.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Primary button', async ({ page }) => { | ||
await page.goto(routes.ORBIT_TERRARIUM_LARGE); | ||
await expect(page.getByRole('button', { name: 'Add to cart' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('button', { name: 'Add to cart' })).toHaveScreenshot(); | ||
}); | ||
|
||
test('Secondary button', async ({ page }) => { | ||
await page.goto(routes.SHOP_ALL); | ||
await expect(page.getByRole('button', { name: 'Update price' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('button', { name: 'Update price' })).toHaveScreenshot(); | ||
}); | ||
|
||
test('As a child', async ({ page }) => { | ||
await page.goto(routes.SAMPLE_ABLE_BREWING_SYSTEM); | ||
await expect( | ||
page.getByRole('heading', { level: 1, name: '[Sample] Able Brewing System' }), | ||
).toBeVisible(); | ||
|
||
await page.getByRole('button', { name: 'Add to Cart' }).first().click(); | ||
await page.getByRole('link', { name: 'Cart Items 1' }).click(); | ||
await expect(page.getByText('Shipping cost')).toBeVisible(); | ||
|
||
await expect(page.getByRole('button', { name: 'Add' }).first()).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+866 Bytes
...ages/components/button.spec.ts-snapshots/As-a-child-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.22 KB
.../components/button.spec.ts-snapshots/Primary-button-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.31 KB
...omponents/button.spec.ts-snapshots/Secondary-button-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
apps/core/tests/visual-regression/packages/components/carousel.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test('Carousel', async ({ page }) => { | ||
await page.goto('/'); | ||
await page | ||
.getByRole('region') | ||
.filter({ has: page.getByRole('heading', { name: 'Featured products' }) }) | ||
.getByRole('tablist', { name: 'Slides' }) | ||
.scrollIntoViewIfNeeded(); | ||
|
||
await expect( | ||
page | ||
.getByRole('region') | ||
.filter({ has: page.getByRole('heading', { name: 'Featured products' }) }), | ||
).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+225 KB
...ages/components/carousel.spec.ts-snapshots/Carousel-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
apps/core/tests/visual-regression/packages/components/checkbox.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
test.skip('Disabled checkbox', async () => {}); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
test.skip('Disabled checked checkbox', async () => {}); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
test.skip('Checkbox with error variant', async () => {}); | ||
|
||
test('Checked checkbox with label', async ({ page }) => { | ||
await page.goto(routes.SHOP_ALL); | ||
await page.getByLabel('Common Good1 products').click(); | ||
|
||
await expect(page.getByLabel('Common Good1 products')).toHaveScreenshot(); | ||
}); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
test.skip('Checkbox with custom icon', async () => {}); |
Binary file added
BIN
+221 Bytes
...ckbox.spec.ts-snapshots/Checked-checkbox-with-label-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/counter.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Counter default', async ({ page }) => { | ||
await page.goto(routes.QUICK_ADD_77); | ||
await expect(page.getByRole('spinbutton', { name: 'Number' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('spinbutton', { name: 'Number' })).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+599 Bytes
...omponents/counter.spec.ts-snapshots/Counter-default-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/datepicker.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Date picker', async ({ page }) => { | ||
await page.goto(routes.QUICK_ADD_77); | ||
await expect(page.getByRole('dialog').getByPlaceholder('MM/DD/YYYY')).toBeVisible(); | ||
|
||
await expect(page.getByRole('dialog').getByPlaceholder('MM/DD/YYYY')).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+2.59 KB
...components/datepicker.spec.ts-snapshots/Date-picker-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
apps/core/tests/visual-regression/packages/components/footer.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test('Footer', async ({ page }) => { | ||
await page.goto('/'); | ||
await expect(page.locator('section').filter({ hasText: 'CategoriesShop' })).toBeVisible(); | ||
|
||
await expect(page.locator('section').filter({ hasText: 'CategoriesShop' })).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+39.2 KB
...packages/components/footer.spec.ts-snapshots/Footer-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
apps/core/tests/visual-regression/packages/components/form.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Form', async ({ page }) => { | ||
await page.goto(routes.CONTACT_US); | ||
await expect(page.getByRole('heading', { name: 'Contact Us' })).toBeVisible(); | ||
|
||
await expect( | ||
page.getByRole('heading', { name: 'Contact Us' }).locator('..').locator('..'), | ||
).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+28.7 KB
...ion/packages/components/form.spec.ts-snapshots/Form-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
apps/core/tests/visual-regression/packages/components/gallery.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Gallery image', async ({ page }) => { | ||
await page.goto(routes.SAMPLE_ABLE_BREWING_SYSTEM); | ||
await expect(page.getByRole('figure').locator('img')).toBeVisible(); | ||
|
||
await expect(page.getByRole('figure').locator('img')).toHaveScreenshot(); | ||
}); | ||
|
||
test('Gallery thumbnail image', async ({ page }) => { | ||
await page.goto(routes.SAMPLE_ABLE_BREWING_SYSTEM); | ||
await expect(page.getByLabel('Thumbnail navigation')).toBeVisible(); | ||
|
||
await expect(page.getByLabel('Thumbnail navigation')).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+113 KB
.../components/gallery.spec.ts-snapshots/Gallery-image-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.8 KB
...s/gallery.spec.ts-snapshots/Gallery-thumbnail-image-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
apps/core/tests/visual-regression/packages/components/input.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Input with placeholder', async ({ page }) => { | ||
await page.goto(routes.SAMPLE_ABLE_BREWING_SYSTEM); | ||
await expect( | ||
page.getByRole('heading', { level: 1, name: '[Sample] Able Brewing System' }), | ||
).toBeVisible(); | ||
await page.getByRole('button', { name: 'Add to Cart' }).first().click(); | ||
await page.getByRole('link', { name: 'Cart Items 1' }).click(); | ||
await expect(page.getByText('Shipping cost')).toBeVisible(); | ||
await page.getByRole('button', { name: 'Add' }).first().click(); | ||
await expect(page.getByLabel('Suburb/city')).toBeVisible(); | ||
|
||
await expect(page.getByLabel('Suburb/city')).toHaveScreenshot(); | ||
}); | ||
|
||
test('Input error state', async ({ page }) => { | ||
await page.goto(routes.CONTACT_US); | ||
await expect(page.getByRole('button', { name: 'Submit form' })).toBeVisible(); | ||
await page.getByRole('button', { name: 'Submit form' }).click(); | ||
|
||
expect(await page.getByLabel('EmailRequired').screenshot()).toMatchSnapshot(); | ||
}); |
Binary file added
BIN
+1.04 KB
...omponents/input.spec.ts-snapshots/Input-error-state-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.26 KB
...ents/input.spec.ts-snapshots/Input-with-placeholder-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
apps/core/tests/visual-regression/packages/components/label.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Label with input', async ({ page }) => { | ||
await page.goto(routes.LOGIN); | ||
await expect(page.getByText('Password', { exact: true })).toBeVisible(); | ||
|
||
await expect( | ||
page.getByText('Password', { exact: true }).locator('..').locator('..'), | ||
).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+2.3 KB
...components/label.spec.ts-snapshots/Label-with-input-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
apps/core/tests/visual-regression/packages/components/navigation-menu.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test('Navigation menu', async ({ page }) => { | ||
await page.goto('/'); | ||
await expect(page.getByRole('navigation', { name: 'Main' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('navigation', { name: 'Main' })).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+10.6 KB
...s/navigation-menu.spec.ts-snapshots/Navigation-menu-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/picklist.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Pick list', async ({ page }) => { | ||
await page.goto(routes.FOG_LINEN_CHAMBRAY); | ||
await expect(page.getByLabel('Pick List')).toBeVisible(); | ||
|
||
await expect(page.getByLabel('Pick List').locator('..')).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+12.1 KB
...ges/components/picklist.spec.ts-snapshots/Pick-list-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
apps/core/tests/visual-regression/packages/components/radio-group.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Default radio group', async ({ page }) => { | ||
await page.goto(routes.QUICK_ADD_77); | ||
await expect(page.getByRole('radiogroup', { name: 'Radio' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('radiogroup', { name: 'Radio' })).toHaveScreenshot(); | ||
}); | ||
|
||
test('Default radio group selected', async ({ page }) => { | ||
await page.goto(routes.QUICK_ADD_77); | ||
await expect(page.getByRole('radiogroup', { name: 'Radio' })).toBeVisible(); | ||
await page.getByLabel('1', { exact: true }).click(); | ||
|
||
await expect(page.getByRole('radiogroup', { name: 'Radio' })).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+2.2 KB
...s/radio-group.spec.ts-snapshots/Default-radio-group-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.39 KB
...roup.spec.ts-snapshots/Default-radio-group-selected-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
apps/core/tests/visual-regression/packages/components/rating.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Zero star rating', async ({ page }) => { | ||
await page.goto(routes.FOG_LINEN_CHAMBRAY); | ||
await expect(page.getByRole('paragraph').getByRole('img').first()).toBeVisible(); | ||
|
||
await expect(page.getByRole('paragraph').getByRole('img').first()).toHaveScreenshot(); | ||
}); | ||
|
||
test('Five start rating', async ({ page }) => { | ||
await page.goto(routes.PARFAIT_JAR); | ||
await expect(page.getByRole('paragraph').getByRole('img').first()).toBeVisible(); | ||
await expect(page.getByRole('paragraph').getByRole('img').first()).toHaveScreenshot(); | ||
}); | ||
|
||
test('Floating rating', async ({ page }) => { | ||
await page.goto(routes.ORBIT_TERRARIUM_LARGE); | ||
await expect(page.getByRole('paragraph').getByRole('img').first()).toBeVisible(); | ||
|
||
await expect(page.getByRole('paragraph').getByRole('img').first()).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+448 Bytes
...mponents/rating.spec.ts-snapshots/Five-start-rating-1-tests-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+574 Bytes
...components/rating.spec.ts-snapshots/Floating-rating-1-tests-chromium-darwin.png
Oops, something went wrong.
Binary file added
BIN
+574 Bytes
...omponents/rating.spec.ts-snapshots/Zero-star-rating-1-tests-chromium-darwin.png
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/rectangle-list.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Rectangle list', async ({ page }) => { | ||
await page.goto(routes.PARFAIT_JAR); | ||
await expect(page.getByRole('radiogroup', { name: 'Size' })).toBeVisible(); | ||
|
||
await expect(page.getByRole('radiogroup', { name: 'Size' })).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+2.96 KB
...nts/rectangle-list.spec.ts-snapshots/Rectangle-list-1-tests-chromium-darwin.png
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/select.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Select default', async ({ page }) => { | ||
await page.goto(routes.FOG_LINEN_CHAMBRAY); | ||
await expect(page.getByRole('combobox')).toBeVisible(); | ||
|
||
await expect(page.getByRole('combobox')).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+489 Bytes
.../components/select.spec.ts-snapshots/Select-default-1-tests-chromium-darwin.png
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
apps/core/tests/visual-regression/packages/components/sheet.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
import routes from '~/tests/routes'; | ||
|
||
test('Sheet basic', async ({ page }) => { | ||
await page.goto(routes.QUICK_ADD_93); | ||
await expect(page.getByLabel('Choose options')).toBeVisible(); | ||
|
||
await expect(page.getByLabel('Choose options')).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+41.4 KB
...ages/components/sheet.spec.ts-snapshots/Sheet-basic-1-tests-chromium-darwin.png
Oops, something went wrong.
Oops, something went wrong.