test: add Playwright coverage and test ids for CpsInfoCircleComponent - #813
Open
fateeand wants to merge 2 commits into
Open
test: add Playwright coverage and test ids for CpsInfoCircleComponent#813fateeand wants to merge 2 commits into
fateeand wants to merge 2 commits into
Conversation
fateeand
requested review from
TerranceKhumalo-absa and
korel-san
as code owners
July 30, 2026 10:14
Contributor
Coverage report for library
Test suite run success2438 tests passing in 76 suites. Report generated by 🧪jest coverage report action from 9989824 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end validation and stable selectors around CpsInfoCircleComponent behavior in the composition app, including coverage for hover/focus behavior, positioning, accessibility, and persistent tooltips.
Changes:
- Added
data-testid="cps-info-circle"to the internal<cps-icon>element used as the tooltip trigger. - Extended the info-circle composition page with per-example
data-testids and a new “Persistent info circle” demo. - Introduced a new Playwright spec covering tooltip visibility, focus behavior, positioning, accessible naming, and persistent-tooltip focus trapping.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/cps-ui-kit/src/lib/components/cps-info-circle/cps-info-circle.component.html | Adds a stable inner test id on the actual tooltip trigger element (cps-icon). |
| projects/composition/src/app/pages/info-circle-page/info-circle-page.examples.ts | Adds a “Persistent info circle” example snippet for the docs/code preview. |
| projects/composition/src/app/pages/info-circle-page/info-circle-page.component.html | Adds per-example data-testids and renders the new persistent tooltip example. |
| playwright/cps-ui-kit/components/cps-info-circle.spec.ts | New E2E coverage for tooltip interactions, positioning, and accessibility behaviors. |
Contributor
Playwright test resultsDetails
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CpsInfoCircleComponent.data-testid="cps-info-circle"to the library template's inner<cps-icon>element (the actual interactive target the tooltip directive's host listeners are bound to).<a href="#">Learn more</a>in its tooltip text.TODO: Merge with
feat: add test id to info circle componentto generate a releaseRelease notes: