chore(): sync with main

This commit is contained in:
Liam DeBeasi
2023-05-11 14:57:44 -04:00
1009 changed files with 4249 additions and 4044 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -1,48 +1,67 @@
import type { Locator } from '@playwright/test';
import { expect } from '@playwright/test';
import type { EventSpy } from '@utils/test/playwright';
import { test } from '@utils/test/playwright';
import { configs, test } from '@utils/test/playwright';
test.describe('item: inputs', () => {
let ionPopoverDidPresent: EventSpy;
let ionPopoverDidDismiss: EventSpy;
let formData: EventSpy;
configs().forEach(({ title, screenshot, config }) => {
test.describe(title('item: inputs'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto(`/src/components/item/test/inputs`, config);
let popover: Locator;
await page.setIonViewport();
await expect(page).toHaveScreenshot(screenshot(`item-inputs`));
});
});
});
test.beforeEach(async ({ page }) => {
await page.goto(`/src/components/item/test/inputs`);
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('disabled state rendering'), () => {
let ionPopoverDidPresent: EventSpy;
let ionPopoverDidDismiss: EventSpy;
ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');
ionPopoverDidDismiss = await page.spyOnEvent('ionPopoverDidDismiss');
formData = await page.spyOnEvent('formData');
let popover: Locator;
popover = page.locator('ion-popover#optionsPopover');
});
test.beforeEach(async ({ page }) => {
await page.goto(`/src/components/item/test/inputs`, config);
test('should not have visual regressions', async ({ page }) => {
await page.setIonViewport();
await expect(page).toHaveScreenshot(`item-inputs-${page.getSnapshotSettings()}.png`);
});
ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');
ionPopoverDidDismiss = await page.spyOnEvent('ionPopoverDidDismiss');
test('disabled controls should not have visual regressions', async ({ page }) => {
await page.click('#popover-trigger');
await ionPopoverDidPresent.next();
popover = page.locator('ion-popover#optionsPopover');
});
test('disabled controls should not have visual regressions', async ({ page }) => {
await page.click('#popover-trigger');
await ionPopoverDidPresent.next();
await page.click('#btnDisabled');
await page.click('#btnDisabled');
await page.waitForChanges();
await page.waitForChanges();
await popover.evaluateHandle((el: HTMLIonPopoverElement) => el.dismiss());
await ionPopoverDidDismiss.next();
await popover.evaluateHandle((el: HTMLIonPopoverElement) => el.dismiss());
await ionPopoverDidDismiss.next();
await page.setIonViewport();
await expect(page).toHaveScreenshot(`item-inputs-disabled-${page.getSnapshotSettings()}.png`);
await page.setIonViewport();
await expect(page).toHaveScreenshot(screenshot(`item-inputs-disabled`));
});
});
});
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('form data'), () => {
let ionPopoverDidPresent: EventSpy;
let ionPopoverDidDismiss: EventSpy;
let formData: EventSpy;
let popover: Locator;
test.beforeEach(async ({ page }) => {
await page.goto(`/src/components/item/test/inputs`, config);
ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');
ionPopoverDidDismiss = await page.spyOnEvent('ionPopoverDidDismiss');
formData = await page.spyOnEvent('formData');
test.describe('form data', () => {
test.beforeEach(async ({ skip }) => {
skip.rtl();
popover = page.locator('ion-popover#optionsPopover');
});
test('initial form data should be empty', async ({ page }) => {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB