Skip to main content

Task 7: Department-Wise KPI Cycle Scoped Publish

Test Cases

IDScenarioExpected ResultStatus
T7-01Publish draft cycle with one entity + one departmentCycle becomes published; evaluations created only for selected scope
T7-02Publish request includes department from another entityReturns 422 validation error
T7-03Cycle already published, publish remaining department scopePublish succeeds and creates only new scope evaluations
T7-04Re-publish same already-published scopeReturns 422 (scope already published)
T7-05First publish timestamp and publisherpublished_at and published_by_user_id set only on first publish
T7-06Published cycle resource payloadContains published_scopes_count and published_scopes[]
T7-07Publish summary after scoped publishIncludes selected departments and per-run counts
T7-08Manager/Employee attempts publishReturns 403

Demo Walkthrough

  1. Create a KPI cycle → Assign templates to 2 departments
  2. Publish for Department A only → Show evaluations created for Dept A employees
  3. Publish for Department B → Show new evaluations created, Dept A unchanged
  4. Try re-publishing Dept A → Show 422 error