Skip to main content

Project Settings - Frontend Manual Test Cases

Test Environment: http://localhost:4200 [or test server URL] Tester: _______________ Date: _______________

Prerequisites

  • Backend server running on http://localhost:5000
  • Frontend running on http://localhost:4200
  • Test accounts available (see Test Data section)
  • Modern browser (Chrome recommended)
  • At least one contractor exists in the system (for project creation)

Test Data

Test Users

RoleEmailPasswordAccess Level
Admin (Tenant Administrator)tn@thaiscada.comTest1234*Full access - can create/edit/delete all projects
Work Ownersafety-owner@outlook.comTest1234*Partial - can edit only own projects
Purchasingsafety-purchasing@outlook.comTest1234*Full access - can create/edit/delete all projects
Contractorsafety-contractor1-0@outlook.comTest1234*No access - 403 Forbidden

Test Data for Creating/Editing Projects

FieldValue
Project Nameโครงการทดสอบ E2E
PR No. (required)PR-TEST-001
PO No.PO-TEST-001
Descriptionรายละเอียดโครงการทดสอบ

Admin/Purchasing: กำหนดค่าโครงการ (Project Settings) → โครงการ (Projects) URL: /tools/settings/project

Test Summary

CategoryTotalDevQA
1. Navigation & Access4
2. View Project List3
3. Create Project4
4. Edit Project3
5. Delete Project3
6. Tab Navigation3
Total20

1. Navigation & Access Tests

TC-PRJ-M001: Purchasing can access project settings

Precondition: User is logged in as Purchasing role (safety-purchasing@outlook.com)

StepActionExpected ResultDevQA
1Click "กำหนดค่าโครงการ" menu in sidebarSettings page opens[ ][ ]
2Locate "โครงการ" (Projects) menu itemMenu item visible[ ][ ]
3Click "โครงการ" (Projects)Page loads[ ][ ]
4Verify URLURL is /tools/settings/project[ ][ ]
5Verify page contentProject list table displayed[ ][ ]
6Verify "สร้าง" (Create) button visibleButton visible in toolbar[ ][ ]

[Screenshot: Project settings page with list and toolbar]

Notes: Purchasing has project-mgmt role with full access (create/edit/delete all projects)


TC-PRJ-M002: Admin can access project settings

Precondition: User is logged in as Tenant Administrator role

StepActionExpected ResultDevQA
1Login as Admin: tn@thaiscada.comLogin successful[ ][ ]
2Navigate to กำหนดค่าโครงการ → โครงการProject settings page loads[ ][ ]
3Verify URLURL is /tools/settings/project[ ][ ]
4Verify project list displayedTable with projects visible[ ][ ]
5Verify "สร้าง" (Create) button visibleButton visible - Admin can create[ ][ ]

[Screenshot: Admin user project settings view]

Notes: Admin has full access via tenant administrator role


TC-PRJ-M003: Work Owner view (restricted access)

Precondition: User is logged in as Work Owner role

StepActionExpected ResultDevQA
1Login as Work Owner: safety-owner@outlook.comLogin successful[ ][ ]
2Navigate to กำหนดค่าโครงการ → โครงการProject settings page loads[ ][ ]
3Verify "สร้าง" (Create) buttonButton should be HIDDEN[ ][ ]
4Verify own projects have "กำหนดค่า" buttonCan edit own projects[ ][ ]
5Verify other projects have "ดูข้อมูล" buttonView-only for others' projects[ ][ ]

[Screenshot: Work Owner view - no create button, mixed edit/view buttons]

Notes: Work Owner can only edit projects where they are the workOwnerUserId


TC-PRJ-M004: Contractor cannot access project settings

Precondition: User is logged in as Contractor role

StepActionExpected ResultDevQA
1Login as Contractor: safety-contractor1-0@outlook.comLogin successful, redirected to /tasks/my-tasks[ ][ ]
2Directly navigate to /tools/settings/projectAccess denied or redirected[ ][ ]
3Verify errorShould show 403 or redirect away[ ][ ]

[Screenshot: Contractor access denied message]

Notes: Contractor role does NOT have project-mgmt permission (403 Forbidden from API)


2. View Project List Tests

TC-PRJ-M005: View project list with table columns

Precondition: Logged in as Purchasing, on Project Settings page

StepActionExpected ResultDevQA
1Navigate to Project Settings pagePage loads with project list[ ][ ]
2Verify table headersColumns: ชื่อโครงการ, เลขที่ใบขอซื้อ, เลขที่ใบสั่งซื้อ, ผู้รับเหมา, สถานะ, Actions[ ][ ]
3Verify project rowsEach row shows project data correctly[ ][ ]
4Verify row actions"กำหนดค่า" button and menu (expand_more icon)[ ][ ]

[Screenshot: Project list table with headers]

Notes: _______________


TC-PRJ-M006: Empty state display

Precondition: No projects exist in the system

StepActionExpected ResultDevQA
1Navigate to Project Settings pagePage loads[ ][ ]
2Verify empty state message"ไม่พบข้อมูล" displayed in table[ ][ ]
3Verify "สร้าง" button still visiblePurchasing can still create new project[ ][ ]

[Screenshot: Empty project list]

Notes: _______________


TC-PRJ-M007: Search projects

Precondition: Multiple projects exist

StepActionExpected ResultDevQA
1Locate search input in toolbarSearch input visible[ ][ ]
2Enter search keywordFilter applied (if implemented)[ ][ ]
3Click "รีเฟรช" buttonList refreshes[ ][ ]

[Screenshot: Search functionality]

Notes: Backend keyword search may not be fully implemented


3. Create Project Tests

TC-PRJ-M008: Create new project (happy path)

Precondition: Logged in as Purchasing, contractors exist in system

StepActionExpected ResultDevQA
1Click "สร้าง" (Create) buttonForm opens with 3 tabs[ ][ ]
2Verify default tab"ข้อมูลการจัดซื้อ" tab active[ ][ ]
3Fill PR No.: PR-TEST-001Input accepts value[ ][ ]
4Fill PO No.: PO-TEST-001Input accepts value[ ][ ]
5Click "ข้อมูลโครงการ" tabTab switches[ ][ ]
6Fill project name: โครงการทดสอบInput accepts value[ ][ ]
7Click "ข้อมูลผู้รับเหมา" tabTab switches[ ][ ]
8Select contractor from dropdownContractor selected[ ][ ]
9Select coordinator (ผู้ประสานงาน)User selected from dropdown[ ][ ]
10Select supervisor (ผู้ควบคุมงาน)User selected from dropdown[ ][ ]
11Click "บันทึก" (Save) buttonSnackbar shows "บันทึกสำเร็จ"[ ][ ]
12Verify project in listNew project appears in table[ ][ ]

[Screenshot: Create project form with all tabs]

Notes: Coordinator and Supervisor dropdowns populate based on selected contractor's users


TC-PRJ-M009: Required field validation (PR No.)

Precondition: Logged in as Purchasing, on create form

StepActionExpected ResultDevQA
1Click "สร้าง" (Create) buttonForm opens[ ][ ]
2Leave PR No. emptyField shows red outline/error[ ][ ]
3Try to click "บันทึก" (Save)Button disabled OR validation shown[ ][ ]
4Verify validation messageRequired fields listed in warning banner[ ][ ]

[Screenshot: Validation error for required fields]

Notes: Warning banner shows: "กรุณากรอกข้อมูลที่จำเป็น" with list of missing fields


TC-PRJ-M010: Duplicate PR No. validation

Precondition: Project with PR No. "PR-TEST-001" already exists

StepActionExpected ResultDevQA
1Click "สร้าง" (Create) buttonForm opens[ ][ ]
2Fill PR No.: PR-TEST-001 (duplicate)Input accepts value[ ][ ]
3Fill all other required fieldsForm filled[ ][ ]
4Click "บันทึก" (Save)API returns 400 error[ ][ ]
5Verify error messageSnackbar: "PR No. นี้ถูกใช้งานแล้วในโครงการอื่น"[ ][ ]

[Screenshot: Duplicate PR No. error message]

Notes: Backend validates PR No. uniqueness per tenant


TC-PRJ-M011: Cancel create operation

Precondition: On create form with data entered

StepActionExpected ResultDevQA
1Fill some form fieldsData entered[ ][ ]
2Click "ยกเลิก" (Cancel) buttonReturns to list[ ][ ]
3Verify listNo new project created[ ][ ]

[Screenshot: Cancel button]

Notes: _______________


4. Edit Project Tests

TC-PRJ-M012: Edit project from list (Purchasing)

Precondition: Project exists, logged in as Purchasing

StepActionExpected ResultDevQA
1Locate project rowRow visible in table[ ][ ]
2Click "กำหนดค่า" (Edit) buttonForm opens with existing data[ ][ ]
3Verify PR No. field has valueExisting PR No. displayed[ ][ ]
4Modify project nameField accepts new value[ ][ ]
5Click "บันทึก" (Save)Snackbar shows success[ ][ ]
6Verify changes in listUpdated data displayed[ ][ ]

[Screenshot: Edit project form with data]

Notes: _______________


TC-PRJ-M013: Work Owner edit own project

Precondition: Logged in as Work Owner, viewing own project

StepActionExpected ResultDevQA
1Locate own project (where you are Work Owner)"กำหนดค่า" button visible[ ][ ]
2Click "กำหนดค่า"Form opens[ ][ ]
3Verify editable fieldsCan edit project info fields[ ][ ]
4Modify a field and saveChanges saved successfully[ ][ ]

[Screenshot: Work Owner editing own project]

Notes: Work Owner can only edit projects where workOwnerUserId matches their user ID


TC-PRJ-M014: Work Owner view-only for others' projects

Precondition: Logged in as Work Owner, viewing another user's project

StepActionExpected ResultDevQA
1Locate another user's project"ดูข้อมูล" button visible (not "กำหนดค่า")[ ][ ]
2Click "ดูข้อมูล" (View)Form opens in view mode[ ][ ]
3Verify fields are read-onlyCannot edit any fields[ ][ ]

[Screenshot: View-only mode for non-owner]

Notes: _______________


5. Delete Project Tests

TC-PRJ-M015: Delete project (no dependencies)

Precondition: Logged in as Purchasing, project exists with no linked tasks

StepActionExpected ResultDevQA
1Locate project rowRow visible[ ][ ]
2Click menu button (expand_more icon)Menu opens[ ][ ]
3Click "ลบ" (Delete) menu itemConfirmation dialog appears[ ][ ]
4Click "ตกลง" (Confirm) in dialogProject deleted[ ][ ]
5Verify project removed from listRow no longer visible[ ][ ]
6Verify success messageSnackbar shows "ลบสำเร็จ"[ ][ ]

[Screenshot: Delete confirmation dialog]

Notes: _______________


TC-PRJ-M016: Delete project with linked tasks (FK constraint)

Precondition: Logged in as Purchasing, project exists with linked workflow tasks

StepActionExpected ResultDevQA
1Locate project with linked tasksRow visible[ ][ ]
2Click menu → "ลบ" (Delete)Confirmation dialog[ ][ ]
3Click "ตกลง" (Confirm)Error occurs[ ][ ]
4Verify error messageSnackbar: "Project is currently in use" or similar[ ][ ]
5Verify project NOT deletedProject still in list[ ][ ]

[Screenshot: FK constraint error]

Notes: Backend returns 400 Bad Request when project has linked tasks


TC-PRJ-M017: Cancel delete operation

Precondition: On delete confirmation dialog

StepActionExpected ResultDevQA
1Click menu → "ลบ" (Delete)Confirmation dialog opens[ ][ ]
2Click "ยกเลิก" (Cancel) or close dialogDialog closes[ ][ ]
3Verify project still existsProject remains in list[ ][ ]

[Screenshot: Delete dialog with cancel option]

Notes: _______________


6. Tab Navigation Tests

TC-PRJ-M018: Tab 1 - Purchasing Info (ข้อมูลการจัดซื้อ)

Precondition: On project form (create or edit)

StepActionExpected ResultDevQA
1Click "ข้อมูลการจัดซื้อ" tabTab activates[ ][ ]
2Verify fields displayedPR No., PO No., Duration, Date Range, Notes[ ][ ]
3Verify field labelsเลขที่ใบขอซื้อ (PR. No.), เลขที่ใบสั่งซื้อ (PO No.)[ ][ ]

[Screenshot: Purchasing Info tab]

Notes: PR No. is required field (marked with asterisk)


TC-PRJ-M019: Tab 2 - Project Info (ข้อมูลโครงการ)

Precondition: On project form

StepActionExpected ResultDevQA
1Click "ข้อมูลโครงการ" tabTab activates[ ][ ]
2Verify fields displayedName, Description, Workspace Area, Work Owner, Safety Officer, Workspace Owner[ ][ ]
3Verify field labelsชื่อโครงการ, รายละเอียด, พื้นที่ทำงาน, เจ้าของงาน, etc.[ ][ ]

[Screenshot: Project Info tab]

Notes: _______________


TC-PRJ-M020: Tab 3 - Contractor Info (ข้อมูลผู้รับเหมา)

Precondition: On project form

StepActionExpected ResultDevQA
1Click "ข้อมูลผู้รับเหมา" tabTab activates[ ][ ]
2Verify fields displayedContractor, Coordinator, Supervisor, Email, Mobile[ ][ ]
3Select contractor from dropdownOptions from contractor list[ ][ ]
4Verify coordinator dropdown populatesUsers linked to selected contractor[ ][ ]
5Verify supervisor dropdown populatesUsers linked to selected contractor[ ][ ]

[Screenshot: Contractor Info tab with dropdowns]

Notes: Coordinator (ผู้ประสานงาน) and Supervisor (ผู้ควบคุมงาน) are required fields


Sign-Off

RoleNameDateSignature
Developer
QA Engineer
Product Owner

Labels verified against:

  • project-setting-list.component.ts (table headers, menu actions)
  • project-setting-form-purchasing.component.ts (Purchasing tab fields)
  • project-setting-form-general.component.ts (Project Info tab fields)
  • project-setting-form-contractor.component.ts (Contractor tab fields)