Skip to content

test(TextEllipsis): add screenshot tests#2304

Open
Bracciata wants to merge 2 commits intodevelopfrom
feat/add-screenshot-tests-for-text-ellipsis
Open

test(TextEllipsis): add screenshot tests#2304
Bracciata wants to merge 2 commits intodevelopfrom
feat/add-screenshot-tests-for-text-ellipsis

Conversation

@Bracciata
Copy link
Copy Markdown
Contributor

@Bracciata Bracciata commented Apr 6, 2026

Closes #2229

Copilot AI review requested due to automatic review settings April 6, 2026 19:40
@Bracciata Bracciata requested review from a team as code owners April 6, 2026 19:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tsx suite for TextEllipsis covering default, maxLines, and hideTooltip variants.
  • 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.

@aws-amplify-us-east-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2304.d15792l1n26ww3.amplifyapp.com

@Bracciata Bracciata changed the title feat(TextEllipsis): add screenshot tests test(TextEllipsis): add screenshot tests Apr 6, 2026
await expect(page).toHaveScreenshot('dark--text-ellipsis[hideTooltip]');
});

test('should have screenshot for TextEllipsis[hideTooltip][maxLines=2]', async ({
Copy link
Copy Markdown
Collaborator

@anastasialanz anastasialanz Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hideTooltip maxLines=2 test doesn't actually test hideTooltip. It doesn't hover and assert.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this screenshot is providing value because it's not testing the component itself that doesn't have a dark mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up screenshot tests for text ellipses component

3 participants