test(many): migrate to new toHaveScreenshot API (#26797)

This commit is contained in:
Liam DeBeasi
2023-02-16 11:37:29 -05:00
committed by GitHub
parent caa8719cea
commit 804e54e5ca
2126 changed files with 311 additions and 401 deletions

View File

@ -10,7 +10,7 @@ test.describe('note: rendering', () => {
<ion-note>99</ion-note>
`);
const note = page.locator('ion-note');
expect(await note.screenshot()).toMatchSnapshot(`note-diff-${page.getSnapshotSettings()}.png`);
await expect(note).toHaveScreenshot(`note-diff-${page.getSnapshotSettings()}.png`);
});
test('should render color correctly', async ({ page }) => {
@ -18,7 +18,7 @@ test.describe('note: rendering', () => {
<ion-note color="danger">99</ion-note>
`);
const note = page.locator('ion-note');
expect(await note.screenshot()).toMatchSnapshot(`note-color-${page.getSnapshotSettings()}.png`);
await expect(note).toHaveScreenshot(`note-color-${page.getSnapshotSettings()}.png`);
});
});
@ -34,7 +34,7 @@ test.describe('note: item', () => {
</ion-item>
`);
const item = page.locator('ion-item');
expect(await item.screenshot()).toMatchSnapshot(`note-item-start-${page.getSnapshotSettings()}.png`);
await expect(item).toHaveScreenshot(`note-item-start-${page.getSnapshotSettings()}.png`);
});
test('should not have visual regressions when in the end slot of an item', async ({ page }) => {
@ -45,7 +45,7 @@ test.describe('note: item', () => {
</ion-item>
`);
const item = page.locator('ion-item');
expect(await item.screenshot()).toMatchSnapshot(`note-item-end-${page.getSnapshotSettings()}.png`);
await expect(item).toHaveScreenshot(`note-item-end-${page.getSnapshotSettings()}.png`);
});
});
@ -60,7 +60,7 @@ test.describe('note: item-divider', () => {
</ion-item-divider>
`);
const itemDivider = page.locator('ion-item-divider');
expect(await itemDivider.screenshot()).toMatchSnapshot(`note-item-divider-start-${page.getSnapshotSettings()}.png`);
await expect(itemDivider).toHaveScreenshot(`note-item-divider-start-${page.getSnapshotSettings()}.png`);
});
test('should not have visual regressions when in the end slot of an item-divider', async ({ page }) => {
@ -70,6 +70,6 @@ test.describe('note: item-divider', () => {
</ion-item-divider>
`);
const itemDivider = page.locator('ion-item-divider');
expect(await itemDivider.screenshot()).toMatchSnapshot(`note-item-divider-end-${page.getSnapshotSettings()}.png`);
await expect(itemDivider).toHaveScreenshot(`note-item-divider-end-${page.getSnapshotSettings()}.png`);
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1020 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB