test(skeleton-text): migrate to generators (#27376)

Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Skeleton text tests are using legacy syntax

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Skeleton text tests are using generator syntax

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
This commit is contained in:
Liam DeBeasi
2023-05-03 17:39:27 -04:00
committed by GitHub
parent 05d278a0a6
commit fefebeeda1
28 changed files with 28 additions and 24 deletions

View File

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

View File

@@ -0,0 +1,14 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs().forEach(({ title, screenshot, config }) => {
test.describe(title('skeleton-text: basic'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto('/src/components/skeleton-text/test/basic', config);
await page.setIonViewport();
await expect(page).toHaveScreenshot(screenshot(`skeleton-text-basic`));
});
});
});

View File

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

View File

@@ -0,0 +1,14 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs().forEach(({ title, screenshot, config }) => {
test.describe(title('skeleton-text: custom'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto('/src/components/skeleton-text/test/custom', config);
await page.setIonViewport();
await expect(page).toHaveScreenshot(screenshot(`skeleton-text-custom`));
});
});
});