test: add Playwright coverage and test ids for CpsSchedulerComponent - #831
Open
fateeand wants to merge 1 commit into
Open
test: add Playwright coverage and test ids for CpsSchedulerComponent#831fateeand wants to merge 1 commit into
fateeand wants to merge 1 commit into
Conversation
fateeand
requested review from
TerranceKhumalo-absa and
lukasmatta
as code owners
August 6, 2026 14:58
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability and coverage of the CpsSchedulerComponent Playwright E2E suite by adding targeted data-testid hooks in the scheduler template and expanding the scheduler spec to validate additional schedule modes, toggles, and emitted outputs via the existing demo page logging.
Changes:
- Added additional Playwright E2E test coverage for Hourly/Daily/Monthly/Yearly cron generation paths, nearest-weekday toggles, timezone selection, and invalid-cron error rendering.
- Added new
data-testidattributes incps-scheduler.component.htmlto enable stable selectors for the new test coverage. - Minor TypeScript import cleanup by making
SimpleChangesa type-only import.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| projects/cps-ui-kit/src/lib/components/cps-scheduler/cps-scheduler.component.ts | Makes SimpleChanges a type-only import (no runtime behavior change). |
| projects/cps-ui-kit/src/lib/components/cps-scheduler/cps-scheduler.component.html | Adds 5 data-testid attributes to support stable Playwright selectors for new coverage areas. |
| playwright/cps-ui-kit/components/cps-scheduler.spec.ts | Expands the E2E suite with additional schedule-mode coverage, console-log-based output assertions, timezone selection, and visible invalid-cron error text checks. |
Contributor
Coverage report for library
Test suite run success2474 tests passing in 76 suites. Report generated by 🧪jest coverage report action from 654479b |
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
cps-scheduler.spec.tswith 13 more tests:everyDays/everyWeekDaysub-tabs), Yearly tab (bothspecificMonthDay/specificMonthWeeksub-tabs).specificDaysub-tab.cronChange/timeZoneChange@Output()emission, asserted viapage.on('console')against the demo's existingconsole.logcalls.cps-input'sdata-testid="cps-input-error"), not just the.ng-invalidCSS class.cps-scheduler.component.html.TODO: Merge with
feat: add test ids to scheduler componentRelease notes: