Project Registration - Prototype Test
Manual test cases for the Project Registration workflow.
Workflow Overview
fill-in-project-info → fill-in-purchasing-info → review-purchasing-info
↓
approved ← review-pre-work-procedures-form ← fill-in-pre-work-procedures-form
Test Case 1: Happy Path (Complete Flow)
Objective: Verify the complete workflow from creation to approval.
Phase 1: Create Task (Work Owner)
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as workowner | Login successful |
| 2 | Click "+" button in toolbar | Task type dialog opens |
| 3 | Select "ลงทะเบียนโครงการ" (Project Registration) | Task created, opens in review page |
| 4 | Verify initial state | State: fill-in-project-info, form editable |
| 5 | Verify toolbar buttons | Shows "ส่งไปจัดซื้อ" and "ยกเลิกงาน" |
Phase 2: Fill Project Info (Work Owner)
| Step | Action | Expected Result |
|---|---|---|
| 6 | Fill ชื่อโครงการ (Project Name) | Field accepts input |
| 7 | Select ผู้รับเหมา (Contractor) from dropdown | Contractor selected |
| 8 | Fill วันที่เริ่มต้น/สิ้นสุด (Start/End dates) | Dates set |
| 9 | Click "ส่งไปจัดซื้อ" (Send to Purchasing) | State changes to fill-in-purchasing-info |
Phase 3: Fill Purchasing Info (Purchasing)
| Step | Action | Expected Result |
|---|---|---|
| 10 | Logout, login as purchasing | Login successful |
| 11 | Open task from "My Tasks" | Task opens |
| 12 | Verify toolbar | Shows "ส่งกลับ" button |
| 13 | Fill purchasing fields (PO Number, Budget) | Fields accept input |
| 14 | Click "ส่งกลับ" (Submit Back) | State changes to review-purchasing-info |
Phase 4: Review Purchasing (Work Owner)
| Step | Action | Expected Result |
|---|---|---|
| 15 | Logout, login as workowner | Login successful |
| 16 | Open task from "My Tasks" | Task opens |
| 17 | Verify toolbar options | Shows: "ส่งไปจัดซื้อ", "ส่งไปผู้รับเหมา", "ยกเลิกงาน" |
| 18 | Click "ส่งไปผู้รับเหมา" (Send to Contractor) | State changes to fill-in-pre-work-procedures-form |
Phase 5: Acknowledge Procedures (Contractor)
| Step | Action | Expected Result |
|---|---|---|
| 19 | Logout, login as contractor1 | Login successful |
| 20 | Open task from "My Tasks" | Task opens |
| 21 | Verify documents | Two docs: Project Registration (locked) + Pre-Work Procedures (editable) |
| 22 | Verify toolbar | Shows "รับทราบระเบียบปฏิบัติงาน" button |
| 23 | Fill acknowledgement checkboxes | Checkboxes checked |
| 24 | Click "รับทราบระเบียบปฏิบัติงาน" | State changes to review-pre-work-procedures-form |
Phase 6: Final Approval (Work Owner)
| Step | Action | Expected Result |
|---|---|---|
| 25 | Logout, login as workowner | Login successful |
| 26 | Open task from "My Tasks" | Task opens |
| 27 | Verify toolbar options | Shows: "อนุมัติ", "ส่งไปจัดซื้อ", "ส่งไปผู้รับเหมา", "ยกเลิกงาน" |
| 28 | Click "อนุมัติ" (Approve) | State changes to approved |
| 29 | Verify final state | Task is read-only, state shows "อนุมัติ" |
Test Case 2: Cancel Early
Objective: Verify task can be cancelled from initial state.
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as workowner | Login successful |
| 2 | Create new Project Registration task | Task created |
| 3 | Click "ยกเลิกงาน" (Cancel) | Confirmation dialog appears |
| 4 | Confirm cancellation | State changes to canceled |
| 5 | Verify final state | Task is read-only |
Test Case 3: Send Back for Revision
Objective: Verify Work Owner can send task back to Purchasing for corrections.
| Step | Action | Expected Result |
|---|---|---|
| 1-14 | Complete phases 1-3 (reach review-purchasing-info) | At review state |
| 15 | Click "ส่งไปจัดซื้อ" (Send back to Purchasing) | State returns to fill-in-purchasing-info |
| 16 | Login as purchasing | Login successful |
| 17 | Make corrections, click "ส่งกลับ" | State changes to review-purchasing-info |
Test Case 4: State Visit Counts (Repetition Indicator)
Objective: Verify the stepper shows "(N)" badge when states are revisited.
| Step | Action | Expected Result |
|---|---|---|
| 1-14 | Complete phases 1-3 (reach review-purchasing-info) | At review state |
| 15 | Click "ส่งไปจัดซื้อ" (Send back to Purchasing) | State returns to fill-in-purchasing-info |
| 16 | Verify stepper | "จัดซื้อ" step shows (2) badge |
| 17 | Login as purchasing, submit again | State changes to review-purchasing-info |
| 18 | Verify stepper | "รีวิวจัดซื้อ" step shows (2) badge |
| 19 | Repeat steps 15-18 | Badges increment to (3), (3) |
UI Verification Checklist
| Component | Check | Expected |
|---|---|---|
| Workflow Tab | Title | Shows "ลงทะเบียนโครงการ" |
| Workflow Tab | Stepper | Shows correct states for Project Registration |
| Workflow Tab | Visit Count | Shows "(N)" badge when state visited N > 1 times |
| SVG Diagram Tab | Render | Diagram renders correctly |
| SVG Diagram Tab | Highlight | Current state is highlighted |
| Toolbar | State Label | Shows correct Thai text per state |
| Toolbar | Commands | Correct buttons per state |
| Form | Permissions | Correct lock/unlock per state |
| Document Tabs | Visibility | Correct documents shown per state |
State-Command Reference
| State | Commands Available |
|---|---|
fill-in-project-info | ส่งไปจัดซื้อ, ยกเลิกงาน |
fill-in-purchasing-info | ส่งกลับ |
review-purchasing-info | ส่งไปจัดซื้อ, ส่งไปผู้รับเหมา, ยกเลิกงาน |
fill-in-pre-work-procedures-form | รับทราบระเบียบปฏิบัติงาน |
review-pre-work-procedures-form | อนุมัติ, ส่งไปจัดซื้อ, ส่งไปผู้รับเหมา, ยกเลิกงาน |
approved | (none - terminal) |
canceled | (none - terminal) |
Sign-off
| Role | Name | Date | Signature |
|---|---|---|---|
| Tester | |||
| Developer |