Skip to content

Commit

Permalink
update spec.ts file to regen screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
chromaticWaster committed Oct 19, 2023
1 parent a28f727 commit c5b1454
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/keyboard/Keyboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ test(`Keyboard - Enter Key Hint Variations`, async ({ page }) => {

const firstTextInput = container.locator('omni-text-field').first();

// Click on the element.
await firstTextInput.click();
await expect(keyboardArea).toBeVisible();

Expand Down
10 changes: 10 additions & 0 deletions src/select/Select.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ test(`Select - Async Per Item Behaviour`, async ({ page, isMobile }) => {

await expect(selectComponent).toHaveScreenshot('select-open.png');

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -130,6 +131,7 @@ test(`Select - String Array Behaviour`, async ({ page, isMobile }) => {
await selectComponent.click();
await expect(selectComponent).toHaveScreenshot('select-open.png');

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -182,6 +184,7 @@ test(`Select - Selection Render Behaviour`, async ({ page, isMobile }) => {
await selectComponent.click();
await page.waitForTimeout(100);

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -220,6 +223,7 @@ test(`Select - Empty Message Behaviour`, async ({ page, isMobile }) => {

await selectComponent.click();

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -256,6 +260,7 @@ test(`Select - Disabled Behaviour`, async ({ page, isMobile }) => {

await expect(click).toBeCalledTimes(0);

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (!isMobile) {
const itemContainer = selectComponent.locator('#items-container');
await expect(itemContainer).toHaveCount(0);
Expand Down Expand Up @@ -296,6 +301,7 @@ test(`Select - Custom Control Slot Visual`, async ({ page, isMobile }) => {

await expect(control).toHaveScreenshot('custom-control.png');

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (!isMobile) {
await expect(selectComponent).toHaveScreenshot('arrow-slot-svg.png');
} else {
Expand All @@ -322,6 +328,7 @@ test(`Select - Searchable Behaviour`, async ({ page, isMobile }) => {

await selectComponent.click();

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -366,6 +373,7 @@ test(`Select - Custom Search Behaviour`, async ({ page, isMobile }) => {

await selectComponent.click();

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -432,6 +440,7 @@ test(`Select - Server Side Filtering Behaviour`, async ({ page, isMobile }) => {

await page.waitForTimeout(30);

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down Expand Up @@ -472,6 +481,7 @@ test(`Select - Custom Search Slot Behaviour`, async ({ page, isMobile }) => {

await selectComponent.click();

// Confirm that the component matches a screenshot based on whether the tests are for mobile form factor.
if (isMobile) {
const dialog = selectComponent.locator('dialog');
await expect(dialog).toHaveScreenshot('select-dialog.png');
Expand Down

0 comments on commit c5b1454

Please sign in to comment.