test(item-divider): migrate to playwright (#26074)

This commit is contained in:
Sean Perkins
2022-10-07 12:02:14 -04:00
committed by GitHub
parent 70d8358a09
commit 6fcb696154
14 changed files with 14 additions and 19 deletions

View File

@ -1,19 +0,0 @@
import { newE2EPage } from '@stencil/core/testing';
test('item-divider: spec', async () => {
const page = await newE2EPage({
url: '/src/components/item-divider/test/spec?ionic:_testing=true',
});
const compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();
});
test('item-divider: spec-rtl', async () => {
const page = await newE2EPage({
url: '/src/components/item-divider/test/spec?ionic:_testing=true&rtl=true',
});
const compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();
});

View File

@ -0,0 +1,14 @@
import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';
test.describe('item-divider: spec', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/src/components/item-divider/test/spec');
});
test('should not have visual regressions', async ({ page }) => {
await page.setIonViewport();
expect(await page.screenshot()).toMatchSnapshot(`list-item-divider-${page.getSnapshotSettings()}.png`);
});
});