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

@ -14,7 +14,7 @@ test.describe('text: basic', () => {
`);
const text = page.locator('ion-text');
expect(await text.nth(0).screenshot()).toMatchSnapshot(`text-${page.getSnapshotSettings()}.png`);
await expect(text.nth(0)).toHaveScreenshot(`text-${page.getSnapshotSettings()}.png`);
});
test('should render text with color prop', async ({ page }) => {
await page.setContent(`
@ -24,6 +24,6 @@ test.describe('text: basic', () => {
`);
const text = page.locator('ion-text');
expect(await text.nth(0).screenshot()).toMatchSnapshot(`text-color-${page.getSnapshotSettings()}.png`);
await expect(text.nth(0)).toHaveScreenshot(`text-color-${page.getSnapshotSettings()}.png`);
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB