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

This commit is contained in:
Amanda Johnston
2022-09-20 13:04:42 -05:00
committed by GitHub
parent 55ebd6cdf3
commit e9a1195644
15 changed files with 12 additions and 18 deletions

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

@ -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();
});

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>