Improve Fleet-Ops server test coverage#277
Draft
roncodes wants to merge 141 commits into
Draft
Conversation
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
server/tests/Unit/...andserver/tests/Feature/...instead of adding more flat files underserver/tests.Zonemodel coverage for service-area relationship metadata, static type accessors, GEOS polygon conversion boundaries that do not require local GEOS extension classes, and generated spatial polygon closure.WorkOrdermodel coverage for relationship contracts, activity logging options, assignment lifecycle updates, guarded lifecycle transitions, checklist completion fallbacks, schedule helpers, overdue checks, and priority predicates.Unit/Notificationscoverage for terminal order completion/failure mail payloads, database array payloads, terminal titles/messages, reason propagation, console URL construction, and tracking-number fallback behavior.Unit/Constraints,Unit/Jobs, andUnit/Support/Analyticscoverage for HOS validation outcomes, simulated waypoint event payloads, and geofence violation dashboard summaries.Unit/Trackingcoverage for tracking route-point resolution, routeability checks, and state-signature behavior, while extending dispatch notification mail coverage for waypoint tracking fallbacks.Equipmentmodel coverage for relationship contracts, morph assignment normalization, appended accessors, query scopes, assignment activity payloads, maintenance helpers, replacement-cost estimates, and import row hydration.server/tests/Feature/Http/Internal/LiveControllerTest.php.Current Coverage
Latest locally verified backend coverage from
composer coverage:baseline:Targeted file progress:
server/src/Models/Zone.phpserver/src/Models/WorkOrder.phpserver/src/Models/Equipment.phpserver/src/Models/Payload.phpserver/src/Notifications/OrderCompleted.phpserver/src/Notifications/OrderFailed.phpserver/src/Constraints/HOSConstraint.phpserver/src/Jobs/SimulateWaypointReached.phpserver/src/Support/Analytics/GeofenceViolations.phpserver/src/Tracking/TrackingContext.phpserver/src/Notifications/OrderDispatched.phpPrevious locally reported backend line coverage was 73.98%, so this slice raises total backend line coverage by 0.04 percentage points. The newest local commits remain unpushed for now because the increase is below the agreed 5-10% push threshold.
Validation
php -l server/tests/Feature/Http/Internal/LiveControllerTest.phpphp -l server/tests/Unit/Models/EquipmentTest.phpphp -l server/tests/Unit/Models/WorkOrderTest.phpphp -l server/tests/Unit/Models/ZoneTest.phpphp -l server/tests/Unit/Notifications/TerminalOrderNotificationsTest.phpphp -l server/tests/Unit/Constraints/HOSConstraintTest.phpphp -l server/tests/Unit/Jobs/SimulateWaypointReachedTest.phpphp -l server/tests/Unit/Support/Analytics/GeofenceViolationsTest.phpphp -l server/tests/Unit/Tracking/TrackingContextTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Feature/Http/Internal/LiveControllerTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Models/EquipmentTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Models/WorkOrderTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Models/ZoneTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Notifications/TerminalOrderNotificationsTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Constraints/HOSConstraintTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Jobs/SimulateWaypointReachedTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Support/Analytics/GeofenceViolationsTest.phpphp -d memory_limit=-1 scripts/pest-runner.php --colors=always server/tests/Unit/Tracking/TrackingContextTest.phpvendor/bin/pest --colors=always server/tests/Unit/Tracking/TrackingContextTest.php server/tests/Unit/Notifications/TerminalOrderNotificationsTest.phpcomposer test:lintcomposer test:unitcomposer coverage:baselinephp scripts/coverage-summary.php coverage/clover.xml --fail-under=100git diff --checkgit diff --cached --checkNotes