Standard Workflow Path
Revision 1.0 (2026-01-14) - Complete standard path test cases
This document contains test cases for the standard Project Registration workflow path:
Work Owner → Purchasing → Work Owner Review → Contractor → Final Review → Approval
Test Cases: TC-PR-001 to TC-PR-031
1. Task Creation Tests
TC-PR-001: Work Owner creates project registration task
Precondition: Logged in as Work Owner, project exists with PR.No
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Tasks menu | Task menu opens |
| 2 | Click "สร้างงานใหม่" | Create task dialog opens |
| 3 | Select "การลงทะเบียนโครงการ" | Task type selected |
| 4 | Search for project by PR.No | Project found and displayed |
| 5 | Select project | Project linked |
| 6 | Click "สร้าง" | Task created |
| 7 | Verify task appears in list | Task visible with "กรอกข้อมูลโครงการ" status |
Result: ☐ Pass ☐ Fail
TC-PR-002: Verify task details after creation
Precondition: Task just created from TC-PR-001
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click on created task | Task review page opens |
| 2 | Verify workflow stepper | Shows "กรอกข้อมูลโครงการ" as current step |
| 3 | Verify form tab | ProjectRegistrationForm displayed |
| 4 | Verify command buttons | "ส่งไปจัดซื้อ", "ส่งไปผู้รับเหมา", and "ยกเลิกงาน" visible |
| 5 | Verify assignee | Current user is assignee |
Result: ☐ Pass ☐ Fail
TC-PR-003: Non-Work Owner cannot create task
Precondition: Logged in as Purchasing
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Create Task | Create task dialog opens |
| 2 | Verify "การลงทะเบียนโครงการ" | Either not visible or disabled |
Result: ☐ Pass ☐ Fail
2. Work Owner - Fill Project Info Tests
TC-PR-005: Fill project registration form
Precondition: Task at FillInProjectInfo state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task | Form displayed |
| 2 | Verify form is editable | Fields can be modified |
| 3 | Fill required fields | Data entered |
| 4 | Verify auto-save | Form saves automatically |
| 5 | Verify save indicator | Shows "บันทึกแล้ว" status |
Result: ☐ Pass ☐ Fail
TC-PR-006: Send to Purchasing
Precondition: Project info filled
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ส่งไปจัดซื้อ" | Assignee dialog opens |
| 2 | Select Purchasing user | User selected |
| 3 | Add note (optional) | Note entered |
| 4 | Click confirm | Command executed |
| 5 | Verify state change | Stepper shows "กรอกข้อมูลจัดซื้อ" |
| 6 | Verify assignee changed | Purchasing user is new assignee |
Result: ☐ Pass ☐ Fail
TC-PR-007: Cancel workflow from FillInProjectInfo
Precondition: Task at FillInProjectInfo state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ยกเลิกงาน" | Confirmation dialog opens |
| 2 | Confirm cancel | Command executed |
| 3 | Verify state | Task shows "ยกเลิก" status |
| 4 | Verify task closed | No more commands available |
Result: ☐ Pass ☐ Fail
TC-PR-008: Verify form locked after sending
Precondition: Task sent to Purchasing (now at FillInPurchasingInfo)
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task as Work Owner | Task opens |
| 2 | Verify form is read-only | Cannot edit fields |
| 3 | Verify no commands | No action buttons visible (not assignee) |
Result: ☐ Pass ☐ Fail
3. Purchasing - Fill PO Info Tests
TC-PR-009: Purchasing receives task
Precondition: Logged in as Purchasing, task at FillInPurchasingInfo
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to task list | Task visible |
| 2 | Verify "รอดำเนินการ" filter | Task shows as pending |
| 3 | Click on task | Task review page opens |
| 4 | Verify current assignee | Shows Purchasing user |
Result: ☐ Pass ☐ Fail
TC-PR-010: Fill purchasing information
Precondition: Task open as Purchasing assignee
| Step | Action | Expected Result |
|---|---|---|
| 1 | Verify form editable | PO fields can be modified |
| 2 | Enter PO.No | Field populated |
| 3 | Enter PO duration | Field populated |
| 4 | Enter budget | Field populated |
| 5 | Verify auto-save | Form saves automatically |
Result: ☐ Pass ☐ Fail
TC-PR-011: Submit back to Work Owner
Precondition: PO info filled
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ส่งกลับ" | Confirmation appears |
| 2 | Confirm submit | Command executed |
| 3 | Verify state change | Stepper shows "รีวิวข้อมูลจัดซื้อ" |
| 4 | Verify assignee | Work Owner is new assignee |
Result: ☐ Pass ☐ Fail
TC-PR-012: Work Owner cannot edit during Purchasing state
Precondition: Task at FillInPurchasingInfo state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as Work Owner | Logged in |
| 2 | Open task | Task opens |
| 3 | Verify form read-only | Cannot edit |
| 4 | Verify no commands | Not the assignee |
Result: ☐ Pass ☐ Fail
4. Work Owner - Review Purchasing Tests
TC-PR-013: Review purchasing information
Precondition: Task at ReviewPurchasingInfo state, Work Owner assignee
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task | Task opens with form |
| 2 | Verify PO data displayed | Purchasing info visible |
| 3 | Verify form editable | Can modify if needed |
| 4 | Verify commands | "ส่งไปจัดซื้อ", "ส่งไปผู้รับเหมา", "ยกเลิกงาน" visible |
Result: ☐ Pass ☐ Fail
TC-PR-014: Send back to Purchasing for revision
Precondition: At ReviewPurchasingInfo state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ส่งไปจัดซื้อ" | Assignee dialog opens |
| 2 | Select Purchasing user | User selected |
| 3 | Add revision note | Note entered |
| 4 | Confirm | Command executed |
| 5 | Verify state | Back to "กรอกข้อมูลจัดซื้อ" |
Result: ☐ Pass ☐ Fail
TC-PR-015: Send to Contractor
Precondition: At ReviewPurchasingInfo state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ส่งไปผู้รับเหมา" | Assignee dialog opens |
| 2 | Select Contractor user | User selected (supervisor) |
| 3 | Confirm | Command executed |
| 4 | Verify state | Shows "รับทราบระเบียบปฏิบัติงาน" |
| 5 | Verify assignee | Contractor is assignee |
Result: ☐ Pass ☐ Fail
TC-PR-016: Verify transaction log shows history
Precondition: Task has been through multiple states
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task | Task opens |
| 2 | Click "ประวัติ" tab | Transaction log displayed |
| 3 | Verify entries | All state transitions listed |
| 4 | Verify timestamps | Each entry has date/time |
| 5 | Verify assigners | Shows who performed each action |
Result: ☐ Pass ☐ Fail
5. Contractor - Acknowledge Procedures Tests
TC-PR-017: Contractor receives task
Precondition: Logged in as Contractor, task at FillInPreWorkProceduresForm
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to task list | Task visible |
| 2 | Click on task | Task review page opens |
| 3 | Verify form tabs | Both Doc 1 and Doc 2 visible |
| 4 | Verify Doc 1 locked | ProjectRegistrationForm read-only |
| 5 | Verify Doc 2 editable | PreWorkProceduresForm can be edited |
Result: ☐ Pass ☐ Fail
TC-PR-018: Fill pre-work procedures form
Precondition: Task open as Contractor
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Doc 2 tab | PreWorkProceduresForm displayed |
| 2 | Verify form editable | Fields can be modified |
| 3 | Fill acknowledgement fields | Data entered |
| 4 | Verify auto-save | Form saves automatically |
Result: ☐ Pass ☐ Fail
TC-PR-019: Submit acknowledgement
Precondition: Pre-work procedures form filled
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "รับทราบระเบียบปฏิบัติงาน" | Confirmation appears |
| 2 | Confirm submit | Command executed |
| 3 | Verify state | Shows "รีวิวเอกสารระเบียบปฏิบัติงาน" |
| 4 | Verify assignee | Work Owner is assignee |
Result: ☐ Pass ☐ Fail
TC-PR-020: Contractor cannot see other commands
Precondition: Task at FillInPreWorkProceduresForm
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task as Contractor | Task opens |
| 2 | Verify only "รับทราบระเบียบปฏิบัติงาน" visible | No cancel or routing options |
Result: ☐ Pass ☐ Fail
6. Work Owner - Final Review & Approve Tests
TC-PR-021: Review pre-work procedures
Precondition: Task at ReviewPreWorkProceduresForm state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task as Work Owner | Task opens |
| 2 | Verify Doc 1 locked | Cannot edit |
| 3 | Verify Doc 2 editable | Can make final edits |
| 4 | Verify commands | "อนุมัติ", "ส่งไปจัดซื้อ", "ส่งไปผู้รับเหมา", "ยกเลิกงาน" |
Result: ☐ Pass ☐ Fail
TC-PR-022: Approve project registration
Precondition: At ReviewPreWorkProceduresForm state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "อนุมัติ" | Confirmation dialog opens |
| 2 | Confirm approval | Command executed |
| 3 | Verify state | Shows "อนุมัติ" then "เสร็จสิ้น" |
| 4 | Verify project status | Project status = Started (1) |
| 5 | Verify task closed | No more commands available |
Result: ☐ Pass ☐ Fail
TC-PR-023: Send back to Contractor for revision
Precondition: At ReviewPreWorkProceduresForm state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ส่งไปผู้รับเหมา" | Assignee dialog opens |
| 2 | Select Contractor | User selected |
| 3 | Add revision note | Note entered |
| 4 | Confirm | Command executed |
| 5 | Verify state | Back to "รับทราบระเบียบปฏิบัติงาน" |
Result: ☐ Pass ☐ Fail
TC-PR-024: Verify all forms locked after approval
Precondition: Task approved
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open approved task | Task opens |
| 2 | Verify Doc 1 read-only | Cannot edit |
| 3 | Verify Doc 2 read-only | Cannot edit |
| 4 | Verify stepper | Shows "อนุมัติ" as final state |
Result: ☐ Pass ☐ Fail
7. Workflow Cancel Tests
TC-PR-025: Cancel from ReviewPurchasingInfo
Precondition: Task at ReviewPurchasingInfo state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ยกเลิกงาน" | Confirmation dialog |
| 2 | Confirm cancel | Command executed |
| 3 | Verify state | Shows "ยกเลิก" |
| 4 | Verify project status | Project status = Canceled (3) |
Result: ☐ Pass ☐ Fail
TC-PR-026: Cancel from ReviewPreWorkProceduresForm
Precondition: Task at ReviewPreWorkProceduresForm state
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "ยกเลิกงาน" | Confirmation dialog |
| 2 | Confirm cancel | Command executed |
| 3 | Verify state | Shows "ยกเลิก" |
Result: ☐ Pass ☐ Fail
TC-PR-027: Contractor cannot cancel workflow
Precondition: Task at FillInPreWorkProceduresForm
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task as Contractor | Task opens |
| 2 | Verify no cancel button | "ยกเลิกงาน" not visible |
Result: ☐ Pass ☐ Fail
8. Task History & Notes Tests
TC-PR-028: View complete transaction log
Precondition: Task with multiple state transitions
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open task | Task opens |
| 2 | Click "ประวัติ" tab | Transaction log displayed |
| 3 | Verify columns | เหตุการณ์, วันที่/เวลา, ดำเนินการโดย, ผู้รับผิดชอบ, หมายเหตุ |
| 4 | Verify summary | Total, Extensions, Approvals counts |
Result: ☐ Pass ☐ Fail
TC-PR-029: Create task note
Precondition: Task open, user is assignee
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click "บันทึก" tab | Notes section displayed |
| 2 | Enter note text | Text entered |
| 3 | Click save | Note saved |
| 4 | Verify note displayed | Note visible with timestamp |
Result: ☐ Pass ☐ Fail
TC-PR-030: Edit task note
Precondition: Note exists on task
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click edit on existing note | Note becomes editable |
| 2 | Modify text | Text changed |
| 3 | Save changes | Note updated |
| 4 | Verify updated text | New text displayed |
Result: ☐ Pass ☐ Fail
TC-PR-031: Delete task note
Precondition: Note exists on task
| Step | Action | Expected Result |
|---|---|---|
| 1 | Click delete on note | Confirmation dialog |
| 2 | Confirm delete | Note removed |
| 3 | Verify note gone | Note no longer visible |
Result: ☐ Pass ☐ Fail
Test Execution Sign-off
| Role | Name | Date | Signature |
|---|---|---|---|
| Tester | |||
| Reviewer |
Notes
[Add any notes or observations during testing]