Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 17, 2025

This PR adds comprehensive Cypress test coverage for the work order page navigation features that were previously untested.

Changes

workOrderWorkday Cypress Test

Enhanced cypress/e2e/02-update/workOrderWorkday.cy.ts with a new test case that validates paging between days:

  • Tests clicking the "Next Day" button to advance the workday date
  • Tests clicking the "Previous Day" button to go backwards
  • Verifies the date display updates correctly after each navigation action

workOrderMilestoneCalendar Cypress Tests

Enhanced cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.ts with three new test cases:

  1. Month navigation (forward): Validates clicking the "Next Month" button properly advances to the next month, including year rollover when necessary

  2. Month navigation (backward): Validates clicking the "Previous Month" button properly goes to the previous month, including year rollback when necessary

  3. Calendar date link navigation: Validates that clicking a date link in the milestone calendar navigates to the workday view with the correct date parameter in the URL

Implementation Details

  • All tests follow existing patterns established in the codebase
  • Uses the ajaxDelayMillis constant for appropriate wait times after AJAX operations
  • Properly uses Cypress's cy.wrap().click() method for better retry logic and command chaining
  • Tests verify both UI state changes and URL parameters where applicable
  • Code passes TypeScript compilation and ESLint validation

These tests improve coverage of critical navigation features and will help prevent regressions in the work order management workflow.

Original prompt

Update workOrderWorkday Cypress test page between days. Update workOrderMilestoneCalendar Cypress test to page between months, and the link from a calendar date to the workday view for that date.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@cityssm-bot
Copy link
Member

cityssm-bot commented Oct 17, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@deepsource-io
Copy link

deepsource-io bot commented Oct 17, 2025

Here's the code health analysis summary for commits 064c61f..e422801. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copilot AI and others added 2 commits October 17, 2025 17:00
Co-authored-by: dangowans <19495149+dangowans@users.noreply.github.com>
Co-authored-by: dangowans <19495149+dangowans@users.noreply.github.com>
@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@Copilot Copilot AI changed the title [WIP] Update Cypress tests for workOrder workday and milestone calendar Add Cypress tests for work order page navigation between days and months Oct 17, 2025
@Copilot Copilot AI requested a review from dangowans October 17, 2025 17:04
Copilot finished work on behalf of dangowans October 17, 2025 17:04
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
39.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.59%. Comparing base (064c61f) to head (e422801).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #64   +/-   ##
=======================================
  Coverage   59.59%   59.59%           
=======================================
  Files         401      401           
  Lines       14209    14209           
=======================================
  Hits         8468     8468           
  Misses       5741     5741           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dangowans dangowans marked this pull request as ready for review October 17, 2025 20:08
@dangowans dangowans merged commit 78b9511 into main Oct 17, 2025
20 of 21 checks passed
@dangowans dangowans deleted the copilot/update-cypress-tests-workorder branch October 17, 2025 20:08
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.

4 participants