Skip to content

test: add Playwright coverage and test ids for CpsProgressCircularComponent - #828

Open
fateeand wants to merge 3 commits into
masterfrom
797-cover-progress-circular-component-with-playwright-tests
Open

test: add Playwright coverage and test ids for CpsProgressCircularComponent#828
fateeand wants to merge 3 commits into
masterfrom
797-cover-progress-circular-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 (color="luxury" -> the literal string var(--cps-color-luxury) in JSDOM vs. the real resolved rgb(100, 0, 50) from the compiled stylesheet in a live app) and a real, deliberate prefers-reduced-motion accommodation that slows the spin animation (0.8s -> 2.4s).
  • Added ariaLabel="Luxury progress circular" to the existing "luxury" demo circle.
  • Added one library testid (cps-progress-circular) on the component's styled div.

TODO: Merge with feat: add test id to progress circular component


Release notes:

  • added Playwright E2E coverage for cps-progress-circular component
  • added test id to cps-progress-circular component

Copilot AI lite review requested due to automatic review settings August 5, 2026 12:58
@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 79.05% 6267/7928
🟡 Branches 68.48% 2889/4219
🟢 Functions 80.15% 1183/1476
🟢 Lines 80.13% 5859/7312

Test suite run success

2474 tests passing in 76 suites.

Report generated by 🧪jest coverage report action from 7584abf

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

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-motion behavior 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.

Comment thread playwright/cps-ui-kit/components/cps-progress-circular.spec.ts Outdated
@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  17 minutes, 5 seconds
commit  7584abf
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 Circular component with Playwright tests

2 participants