test: add Playwright coverage and test ids for CpsProgressLinearComponent - #829
Open
fateeand wants to merge 5 commits into
Open
test: add Playwright coverage and test ids for CpsProgressLinearComponent#829fateeand wants to merge 5 commits into
fateeand wants to merge 5 commits into
Conversation
fateeand
requested review from
TerranceKhumalo-absa and
korel-san
as code owners
August 5, 2026 14:07
Contributor
Coverage report for library
Test suite run success2474 tests passing in 76 suites. Report generated by 🧪jest coverage report action from 2fdfad8 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Playwright E2E coverage and stable selectors for CpsProgressLinearComponent, ensuring browser-accurate verification of CSS variable color resolution and reduced-motion behavior in the composition demo environment.
Changes:
- Added
data-testidattributes tocps-progress-linearinternal wrapper and its two animated lines (inc/dec). - Added
ariaLabel="Energy progress linear"to the “energy” demo instance to make it uniquely targetable/accessible by role+name. - Introduced a new Playwright spec validating resolved RGB colors and reduced-motion animation durations.
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-linear/cps-progress-linear.component.html | Adds library data-testid hooks for Playwright/component testing. |
| projects/composition/src/app/pages/progress-linear-page/progress-linear-page.examples.ts | Updates the code example snippet to include an explicit ariaLabel for the energy variant. |
| projects/composition/src/app/pages/progress-linear-page/progress-linear-page.component.html | Updates the rendered demo to include the same ariaLabel, enabling role+name targeting. |
| playwright/cps-ui-kit/components/cps-progress-linear.spec.ts | Adds Playwright coverage for CSS color resolution and prefers-reduced-motion animation timing. |
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
colorandbgColor("energy"/"energy-highlighten"-> the literalvar(...)string in JSDOM vs. the real resolvedrgb(255, 120, 15)/rgb(250, 236, 229)from the compiled stylesheet), and the realprefers-reduced-motionaccommodation on both indeterminate bars (.inc/.dec), which slow from 2s to 6s.ariaLabel="Energy progress linear"to the existing "energy" demo bar.cps-progress-linear,cps-progress-linear-inc,cps-progress-linear-dec).cps-ui-kit/components/cps-info-circle.spec.ts › cps-info-circle › Real Tab-trapping into persistent tooltip content › tabbing from the icon moves focus into the tooltip real focusable contentTODO: Merge with
feat: add test ids to progress linear componentRelease notes: