Skip to content

test: add Playwright coverage and test ids for CpsProgressLinearComponent - #829

Open
fateeand wants to merge 5 commits into
masterfrom
798-cover-progress-linear-component-with-playwright-tests
Open

test: add Playwright coverage and test ids for CpsProgressLinearComponent#829
fateeand wants to merge 5 commits into
masterfrom
798-cover-progress-linear-component-with-playwright-tests

Conversation

@fateeand

@fateeand fateeand commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added 2 tests covering browser behavior: real CSS custom-property color resolution for both color and bgColor ("energy"/"energy-highlighten" -> the literal var(...) string in JSDOM vs. the real resolved rgb(255, 120, 15) / rgb(250, 236, 229) from the compiled stylesheet), and the real prefers-reduced-motion accommodation on both indeterminate bars (.inc/.dec), which slow from 2s to 6s.
  • Added ariaLabel="Energy progress linear" to the existing "energy" demo bar.
  • Added three library testids (cps-progress-linear, cps-progress-linear-inc, cps-progress-linear-dec).
  • Fixed flaky 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 content

TODO: Merge with feat: add test ids to progress linear component


Release notes:

  • added Playwright E2E coverage for cps-progress-linear component
  • added test ids to cps-progress-linear component

Copilot AI lite review requested due to automatic review settings August 5, 2026 14:07
@fateeand
fateeand requested a review from lukasmatta as a code owner August 5, 2026 14:07
@fateeand fateeand linked an issue Aug 5, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Coverage report for library

St.
Category Percentage Covered / Total
🟡 Statements 77.92% 6267/8043
🟡 Branches 66.98% 2889/4313
🟡 Functions 79.61% 1183/1486
🟡 Lines 78.89% 5859/7427

Test suite run success

2474 tests passing in 76 suites.

Report generated by 🧪jest coverage report action from 2fdfad8

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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-testid attributes to cps-progress-linear internal 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.

Comment thread playwright/cps-ui-kit/components/cps-progress-linear.spec.ts
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Playwright test results

passed  512 passed

Details

stats  512 tests across 20 suites
duration  16 minutes, 35 seconds
commit  2fdfad8
info  For details, download the Playwright report

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.

Cover Progress Linear component with Playwright tests

2 participants