Skip to content

test: add Playwright coverage and test ids for CpsSchedulerComponent - #831

Open
fateeand wants to merge 1 commit into
masterfrom
800-cover-scheduler-component-with-playwright-tests
Open

test: add Playwright coverage and test ids for CpsSchedulerComponent#831
fateeand wants to merge 1 commit into
masterfrom
800-cover-scheduler-component-with-playwright-tests

Conversation

@fateeand

@fateeand fateeand commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extended the pre-existing cps-scheduler.spec.ts with 13 more tests:
    • Hourly tab, Daily tab (both everyDays/everyWeekDay sub-tabs), Yearly tab (both specificMonthDay/specificMonthWeek sub-tabs).
    • Monthly specificDay sub-tab.
    • The "nearest weekday" checkbox on both Monthly and Yearly.
    • Real timezone-option selection.
    • cronChange/timeZoneChange @Output() emission, asserted via page.on('console') against the demo's existing console.log calls.
    • Updated the invalid-cron test to assert the real visible error text (cps-input's data-testid="cps-input-error"), not just the .ng-invalid CSS class.
  • Added 5 more testids to cps-scheduler.component.html.

TODO: Merge with feat: add test ids to scheduler component


Release notes:

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

@fateeand
fateeand requested a review from korel-san as a code owner August 6, 2026 14:58
Copilot AI lite review requested due to automatic review settings August 6, 2026 14:58
@fateeand fateeand linked an issue Aug 6, 2026 that may be closed by this pull request

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 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-testid attributes in cps-scheduler.component.html to enable stable selectors for the new test coverage.
  • Minor TypeScript import cleanup by making SimpleChanges a 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.

@github-actions

github-actions Bot commented Aug 6, 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 654479b

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Playwright test results

passed  524 passed

Details

stats  524 tests across 19 suites
duration  17 minutes, 43 seconds
commit  654479b
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 Scheduler component with Playwright tests

2 participants