test(card-header): migrate to Playwright (#25978)

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Amanda Johnston
2022-09-20 13:04:42 -05:00
committed by GitHub
gitea-unlock(16/)
parent 55ebd6cdf3
commit e9a1195644
octicon-diff(16/tw-mr-1) 15 changed files with 12 additions and 18 deletions

12
core/src/components/card-header/test/basic/card-header.e2e.ts Normal file
View File

@@ -0,0 +1,12 @@
import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';
test.describe('card-header: basic', () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto(`/src/components/card-header/test/basic`);
await page.setIonViewport();
expect(await page.screenshot()).toMatchSnapshot(`card-header-diff-${page.getSnapshotSettings()}.png`);
});
});

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

10
core/src/components/card-header/test/basic/e2e.ts
View File

@@ -1,10 +0,0 @@
import { newE2EPage } from '@stencil/core/testing';
test('card-header: basic', async () => {
const page = await newE2EPage({
url: '/src/components/card-header/test/basic?ionic:_testing=true',
});
const compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();
});

8
core/src/components/card-header/test/basic/index.html
View File

@@ -47,14 +47,6 @@
</ion-card-header>
<ion-card-content> Custom background, color=secondary on ion-card-header </ion-card-content>
</ion-card>
<ion-card color="danger">
<ion-card-header>
<ion-card-subtitle>Card Subtitle</ion-card-subtitle>
<ion-card-title>Card Title</ion-card-title>
</ion-card-header>
<ion-card-content> color=danger on ion-card-header </ion-card-content>
</ion-card>
</ion-content>
</ion-app>
<style>