test: add Playwright coverage and test ids for CpsProgressCircularComponent - #828
Open
fateeand wants to merge 3 commits into
Open
test: add Playwright coverage and test ids for CpsProgressCircularComponent#828fateeand wants to merge 3 commits into
fateeand wants to merge 3 commits into
Conversation
fateeand
requested review from
TerranceKhumalo-absa,
korel-san and
lukasmatta
as code owners
August 5, 2026 12:58
Contributor
Coverage report for library
Test suite run success2474 tests passing in 76 suites. Report generated by 🧪jest coverage report action from 7584abf |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end coverage for CpsProgressCircularComponent in the Composition app using Playwright, and introduces stable selectors and an accessible demo label to support those tests and improve demo accessibility.
Changes:
- Added Playwright specs validating real-browser CSS resolution (custom property color) and
prefers-reduced-motionbehavior for the progress circular component. - Added a
data-testid="cps-progress-circular"hook to the component’s styled div to support reliable test targeting. - Added
ariaLabel="Luxury progress circular"to the “luxury” demo instance so it can be located via accessibility queries.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/cps-ui-kit/src/lib/components/cps-progress-circular/cps-progress-circular.component.html | Adds a data-testid hook to the rendered circular element for testing. |
| projects/composition/src/app/pages/progress-circular-page/progress-circular-page.examples.ts | Updates the example HTML snippet with an ariaLabel for the luxury variant. |
| projects/composition/src/app/pages/progress-circular-page/progress-circular-page.component.html | Updates the live demo instance with an ariaLabel for role/name based test selection. |
| playwright/cps-ui-kit/components/cps-progress-circular.spec.ts | Adds Playwright coverage for real CSS color resolution and reduced-motion animation behavior. |
Contributor
Playwright test resultsDetails
|
…-playwright-tests
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
color="luxury"-> the literal stringvar(--cps-color-luxury)in JSDOM vs. the real resolvedrgb(100, 0, 50)from the compiled stylesheet in a live app) and a real, deliberateprefers-reduced-motionaccommodation that slows the spin animation (0.8s -> 2.4s).ariaLabel="Luxury progress circular"to the existing "luxury" demo circle.cps-progress-circular) on the component's styled div.TODO: Merge with
feat: add test id to progress circular componentRelease notes: