test(title): migrate to generators (#27382)

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. -->

Title tests are using legacy syntax

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

- Title tests are using modern 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 20:05:42 -04:00
committed by GitHub
parent af55e09037
commit c50c43a5a9
14 changed files with 14 additions and 12 deletions

View File

@ -1,12 +0,0 @@
import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';
test.describe('title: basic', () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto('/src/components/title/test/basic');
const wrapper = page.locator('#header-wrapper');
// only screenshot the headers to avoid unnecessary blank space from ion-content
await expect(wrapper).toHaveScreenshot(`title-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('title: basic'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto('/src/components/title/test/basic', config);
const wrapper = page.locator('#header-wrapper');
// only screenshot the headers to avoid unnecessary blank space from ion-content
await expect(wrapper).toHaveScreenshot(screenshot(`title-basic`));
});
});
});