Conversation
There was a problem hiding this comment.
Pull request overview
Adds Playwright component screenshot coverage for the TextEllipsis React component to prevent visual regressions after recent changes (Issue #2229).
Changes:
- Introduces a new
screenshots.e2e.tsxsuite forTextEllipsiscovering default,maxLines, andhideTooltipvariants. - Adds baseline light/dark screenshot artifacts for each case under
e2e/screenshots/.
Reviewed changes
Copilot reviewed 1 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/components/TextEllipsis/screenshots.e2e.tsx | New Playwright component screenshot tests for TextEllipsis in light/dark themes. |
| e2e/screenshots/text-ellipsis.png | Baseline screenshot for default TextEllipsis (light). |
| e2e/screenshots/dark--text-ellipsis.png | Baseline screenshot for default TextEllipsis (dark). |
| e2e/screenshots/text-ellipsis-maxLines-.png | Baseline screenshot for TextEllipsis[maxLines] (light). |
| e2e/screenshots/dark--text-ellipsis-maxLines-.png | Baseline screenshot for TextEllipsis[maxLines] (dark). |
| e2e/screenshots/text-ellipsis-hideTooltip-.png | Baseline screenshot for TextEllipsis[hideTooltip] (light). |
| e2e/screenshots/dark--text-ellipsis-hideTooltip-.png | Baseline screenshot for TextEllipsis[hideTooltip] (dark). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
| await expect(page).toHaveScreenshot('dark--text-ellipsis[hideTooltip]'); | ||
| }); | ||
|
|
||
| test('should have screenshot for TextEllipsis[hideTooltip][maxLines=2]', async ({ |
There was a problem hiding this comment.
The hideTooltip maxLines=2 test doesn't actually test hideTooltip. It doesn't hover and assert.
There was a problem hiding this comment.
Not sure this screenshot is providing value because it's not testing the component itself that doesn't have a dark mode.
Closes #2229