Workspace Area 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 workspace area exists in the system
Test Data
Test Users
| Role | Password | Access Level | |
|---|---|---|---|
| Admin (Tenant Administrator) | tn@thaiscada.com | Test1234* | Full access - can manage workspace areas |
| Work Owner | safety-owner@outlook.com | Test1234* | Full access - has workspace-area-mgmt role |
| Purchasing | safety-purchasing@outlook.com | Test1234* | View + SetDefault only - has user-mgmt but NOT workspace-area-mgmt |
| Contractor | safety-contractor1-0@outlook.com | Test1234* | View only - can see list, cannot edit |
Test Data for Creating/Editing Workspace Areas
| Field | Value |
|---|---|
| Area Code | TEST-001 |
| Area Name (Thai) | พื้นที่ทดสอบ |
| Note | หมายเหตุทดสอบ |
Navigation Path
Admin/WorkOwner: กำหนดค่าโครงการ (Project Settings) → พื้นที่ทำงาน (Workspace Areas)
URL: /tools/settings/workspace-area
Test Summary
| Category | Total | Dev | QA |
|---|---|---|---|
| 1. Navigation & Access | 4 | ||
| 2. View Workspace Area List | 3 | ||
| 3. Create Workspace Area | 3 | ||
| 4. Edit Workspace Area | 4 | ||
| 5. Set/Unset Default | 3 | ||
| 6. Delete Workspace Area | 3 | ||
| Total | 20 |
1. Navigation & Access Tests
TC-WA-M001: Work Owner can access workspace area settings
Precondition: User is logged in as Work Owner role (safety-owner@outlook.com)
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Click "กำหนดค่าโครงการ" menu in sidebar | Settings page opens | [ ] | [ ] |
| 2 | Locate "พื้นที่ทำงาน" (Workspace Areas) menu item | Menu item visible | [ ] | [ ] |
| 3 | Click "พื้นที่ทำงาน" (Workspace Areas) | Page loads | [ ] | [ ] |
| 4 | Verify URL | URL is /tools/settings/workspace-area | [ ] | [ ] |
| 5 | Verify page content | Workspace area list table displayed | [ ] | [ ] |
| 6 | Verify "สร้าง" (Create) button visible | Button visible in toolbar | [ ] | [ ] |
[Screenshot: Workspace area settings page with list and toolbar]
Notes: Work Owner has workspace-area-mgmt role with full access (create/edit/delete)
TC-WA-M002: Admin can access workspace area settings
Precondition: User is logged in as Tenant Administrator role
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Login as Admin: tn@thaiscada.com | Login successful | [ ] | [ ] |
| 2 | Navigate to กำหนดค่าโครงการ → พื้นที่ทำงาน | Workspace area settings page loads | [ ] | [ ] |
| 3 | Verify URL | URL is /tools/settings/workspace-area | [ ] | [ ] |
| 4 | Verify workspace area list displayed | Table with workspace areas visible | [ ] | [ ] |
| 5 | Verify "สร้าง" (Create) button visible | Button visible - Admin can create | [ ] | [ ] |
[Screenshot: Admin workspace area settings view]
Notes: Admin has full access via tenant administrator role
TC-WA-M003: Contractor user can view but not edit
Precondition: User is logged in as Contractor role
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Login as Contractor: safety-contractor1-0@outlook.com | Login successful, redirected to my-tasks | [ ] | [ ] |
| 2 | Navigate to กำหนดค่าโครงการ → พื้นที่ทำงาน | Workspace area list page loads | [ ] | [ ] |
| 3 | Verify workspace area list visible | Table displays workspace areas (search uses realm-basic) | [ ] | [ ] |
| 4 | Check for "สร้าง" (Create) button | Create button should NOT be visible | [ ] | [ ] |
| 5 | Check for "กำหนดค่า" (Edit) buttons | Edit buttons should NOT be visible | [ ] | [ ] |
[Screenshot: Contractor user view - list only, no edit buttons]
Notes: Contractor users can view the list but cannot edit due to missing workspace-area-mgmt role
TC-WA-M004: Purchasing user can view and set default only
Precondition: User is logged in as Purchasing role
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Login as Purchasing: safety-purchasing@outlook.com | Login successful | [ ] | [ ] |
| 2 | Navigate to กำหนดค่าโครงการ → พื้นที่ทำงาน | Workspace area list page loads | [ ] | [ ] |
| 3 | Verify workspace area list visible | Table displays workspace areas | [ ] | [ ] |
| 4 | Check for "สร้าง" (Create) button | Create button should NOT be visible | [ ] | [ ] |
| 5 | Check for "กำหนดค่า" (Edit) buttons | Edit buttons should NOT be visible | [ ] | [ ] |
| 6 | Check options menu | Set default option MAY be visible (has user-mgmt) | [ ] | [ ] |
[Screenshot: Purchasing user view - list only, setDefault may be available]
Notes: Purchasing role does NOT have workspace-area-mgmt but HAS user-mgmt (can setDefault)
2. View Workspace Area List Tests
TC-WA-M005: View workspace area list with table columns
Precondition: Logged in as Work Owner, on Workspace Area Settings page
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Navigate to Workspace Area Settings page | Page loads with workspace area list | [ ] | [ ] |
| 2 | Verify table headers | Columns: รหัสพื้นที่ทำงาน, ชื่อพื้นที่ทำงาน, เจ้าของพื้นที่, เจ้าหน้าที่ความปลอดภัย, ค่าเริ่มต้น, Actions | [ ] | [ ] |
| 3 | Verify workspace area rows | Each row shows area code, name, owner, safety officer, default indicator | [ ] | [ ] |
| 4 | Verify row actions | Each row has "กำหนดค่า" button and options menu (expand_more icon) | [ ] | [ ] |
[Screenshot: Workspace area list table with headers]
Notes: _______________
TC-WA-M006: Empty state display
Precondition: No workspace areas exist in the system
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Navigate to Workspace Area Settings page | Page loads | [ ] | [ ] |
| 2 | Verify empty state message | "ไม่พบข้อมูล" displayed in table | [ ] | [ ] |
| 3 | Verify "สร้าง" button still visible | Work Owner can still create new workspace area | [ ] | [ ] |
[Screenshot: Empty workspace area list]
Notes: _______________
TC-WA-M007: Refresh workspace area list
Precondition: On Workspace Area Settings page
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Locate "รีเฟรช" (Refresh) button in toolbar | Button visible | [ ] | [ ] |
| 2 | Click "รีเฟรช" button | List refreshes | [ ] | [ ] |
| 3 | Verify data reloaded | Workspace areas fetched from server | [ ] | [ ] |
[Screenshot: Refresh button]
Notes: _______________
3. Create Workspace Area Tests
TC-WA-M008: Create new workspace area (happy path)
Precondition: Logged in as Work Owner, on Workspace Area Settings page
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Click "สร้าง" (Create) button | Form opens | [ ] | [ ] |
| 2 | Fill รหัสพื้นที่ทำงาน (Area Code): TEST-001 | Input accepts value | [ ] | [ ] |
| 3 | Fill ชื่อพื้นที่ทำงาน (Area Name): พื้นที่ทดสอบ | Input accepts Thai characters | [ ] | [ ] |
| 4 | Fill รายละเอียด (Note): หมายเหตุทดสอบ | Textarea accepts value | [ ] | [ ] |
| 5 | (Optional) Select เจ้าของพื้นที่ (Workspace Owner) | Dropdown shows user list | [ ] | [ ] |
| 6 | (Optional) Select เจ้าหน้าที่ความปลอดภัย (Safety Officer) | Dropdown shows user list | [ ] | [ ] |
| 7 | Click "บันทึก" (Save) button | Snackbar shows "บันทึกสำเร็จ" | [ ] | [ ] |
| 8 | Verify workspace area in list | New workspace area appears in table | [ ] | [ ] |
[Screenshot: Create workspace area form]
Notes: Area Code and Area Name are required fields
TC-WA-M009: Required field validation (Area Code)
Precondition: Logged in as Work Owner, on create form
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Click "สร้าง" (Create) button | Form opens | [ ] | [ ] |
| 2 | Leave รหัสพื้นที่ทำงาน (Area Code) empty | Field shows red outline/error | [ ] | [ ] |
| 3 | Fill ชื่อพื้นที่ทำงาน (Area Name) only | Other field filled | [ ] | [ ] |
| 4 | Try to click "บันทึก" (Save) | Button disabled OR validation shown | [ ] | [ ] |
[Screenshot: Validation error for required fields]
Notes: Both Area Code and Area Name are required
TC-WA-M010: Duplicate Area Code validation
Precondition: Workspace area with code "TEST-001" already exists
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Click "สร้าง" (Create) button | Form opens | [ ] | [ ] |
| 2 | Fill รหัสพื้นที่ทำงาน: TEST-001 (duplicate) | Input accepts value | [ ] | [ ] |
| 3 | Fill all other required fields | Form filled | [ ] | [ ] |
| 4 | Click "บันทึก" (Save) | API returns 400 error | [ ] | [ ] |
| 5 | Verify error message | Snackbar: "Area code already exists" or similar | [ ] | [ ] |
[Screenshot: Duplicate area code error message]
Notes: Backend validates Area Code uniqueness per tenant
4. Edit Workspace Area Tests
TC-WA-M011: Edit workspace area from list (Work Owner)
Precondition: Workspace area exists, logged in as Work Owner
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Locate workspace area row | Row visible in table | [ ] | [ ] |
| 2 | Click "กำหนดค่า" (Edit) button | Form opens with existing data | [ ] | [ ] |
| 3 | Verify รหัสพื้นที่ทำงาน field has value | Existing area code displayed | [ ] | [ ] |
| 4 | Modify ชื่อพื้นที่ทำงาน (Area Name) | Field accepts new value | [ ] | [ ] |
| 5 | Click "บันทึก" (Save) | Snackbar shows success | [ ] | [ ] |
| 6 | Verify changes in list | Updated data displayed | [ ] | [ ] |
[Screenshot: Edit workspace area form with data]
Notes: _______________
TC-WA-M012: Edit with Thai content
Precondition: Workspace area edit form is open
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Modify ชื่อพื้นที่ทำงาน with Thai: พื้นที่โรงงาน A - อาคารผลิต | Thai characters accepted | [ ] | [ ] |
| 2 | Modify รายละเอียด with Thai: หมายเหตุ: พื้นที่นี้ต้องการการรักษาความปลอดภัยระดับสูง | Thai characters accepted | [ ] | [ ] |
| 3 | Click "บันทึก" (Save) | Save triggered | [ ] | [ ] |
| 4 | Verify success | Success snackbar appears | [ ] | [ ] |
| 5 | Verify Thai text saved | Thai content displayed correctly in list | [ ] | [ ] |
[Screenshot: Thai content in form]
Notes: _______________
TC-WA-M013: Assign Workspace Owner and Safety Officer
Precondition: Workspace area edit form is open
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Click เจ้าของพื้นที่ (Workspace Owner) dropdown | Dropdown opens with user list | [ ] | [ ] |
| 2 | Select a user | User selected | [ ] | [ ] |
| 3 | Click เจ้าหน้าที่ความปลอดภัย (Safety Officer) dropdown | Dropdown opens with user list | [ ] | [ ] |
| 4 | Select a user | User selected | [ ] | [ ] |
| 5 | Click "บันทึก" (Save) | Save triggered | [ ] | [ ] |
| 6 | Verify success | Success snackbar appears | [ ] | [ ] |
| 7 | Verify in list | Owner and Safety Officer names displayed in list | [ ] | [ ] |
[Screenshot: Workspace owner and safety officer dropdowns]
Notes: These fields are optional
TC-WA-M014: Cancel edit discards changes
Precondition: Workspace area edit form is open with changes made
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Make changes to workspace area form | Values modified | [ ] | [ ] |
| 2 | Click "ยกเลิก" (Cancel) button or navigate away | Cancel action triggered | [ ] | [ ] |
| 3 | Navigate back to list | Workspace area list displayed | [ ] | [ ] |
| 4 | Click configure on same workspace area | Edit form opens | [ ] | [ ] |
| 5 | Verify original values | Changes were NOT saved | [ ] | [ ] |
[Screenshot: Cancel button]
Notes: _______________
5. Set/Unset Default Tests
TC-WA-M015: Set workspace area as default
Precondition: On Workspace Area Settings page, workspace area is NOT currently default
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Locate a non-default workspace area row | Row without default indicator | [ ] | [ ] |
| 2 | Click options menu (expand_more icon) on row | Dropdown menu opens | [ ] | [ ] |
| 3 | Verify menu option | "ตั้งเป็นค่าเริ่มต้น" (Set as Default) visible | [ ] | [ ] |
| 4 | Click "ตั้งเป็นค่าเริ่มต้น" | Action triggered | [ ] | [ ] |
| 5 | Verify success | Success snackbar appears | [ ] | [ ] |
| 6 | Verify default indicator | Workspace area row now shows default indicator (checkmark) | [ ] | [ ] |
[Screenshot: Options menu with "ตั้งเป็นค่าเริ่มต้น"] [Screenshot: Workspace area with default indicator]
Notes: Only one workspace area can be default at a time
TC-WA-M016: Unset default (toggle off)
Precondition: Workspace area is currently set as default
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Locate the default workspace area row | Row with default indicator visible | [ ] | [ ] |
| 2 | Click options menu on default workspace area | Dropdown menu opens | [ ] | [ ] |
| 3 | Verify menu option changed | "ยกเลิกเป็นค่าเริ่มต้น" (Unset Default) visible | [ ] | [ ] |
| 4 | Click "ยกเลิกเป็นค่าเริ่มต้น" | Action triggered | [ ] | [ ] |
| 5 | Verify success | Success snackbar appears | [ ] | [ ] |
| 6 | Verify default indicator removed | Workspace area no longer shows default indicator | [ ] | [ ] |
[Screenshot: Options menu with "ยกเลิกเป็นค่าเริ่มต้น"] [Screenshot: Default indicator removed]
Notes: Setting the same workspace area as default twice toggles it off (API behavior)
TC-WA-M017: Purchasing can set default (has user-mgmt)
Precondition: Logged in as Purchasing role
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Login as Purchasing: safety-purchasing@outlook.com | Login successful | [ ] | [ ] |
| 2 | Navigate to Workspace Area Settings | List displayed | [ ] | [ ] |
| 3 | Click options menu on a workspace area | Dropdown menu opens | [ ] | [ ] |
| 4 | Verify set default option visible | "ตั้งเป็นค่าเริ่มต้น" option available | [ ] | [ ] |
| 5 | Click set default | Action triggered | [ ] | [ ] |
| 6 | Verify success | Success snackbar appears (200 OK) | [ ] | [ ] |
[Screenshot: Purchasing user can set default]
Notes: Purchasing has user-mgmt role which allows setDefault operation
6. Delete Workspace Area Tests
TC-WA-M018: Delete workspace area (no dependencies)
Precondition: Workspace area exists with no linked projects
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Locate workspace area row | Row visible | [ ] | [ ] |
| 2 | Click options menu (expand_more icon) | Dropdown menu opens | [ ] | [ ] |
| 3 | Click "ลบ" (Delete) menu item | Confirmation dialog appears | [ ] | [ ] |
| 4 | Click "ตกลง" (Confirm) in dialog | Workspace area deleted | [ ] | [ ] |
| 5 | Verify workspace area removed from list | Row no longer visible | [ ] | [ ] |
| 6 | Verify success message | Snackbar shows "ลบสำเร็จ" | [ ] | [ ] |
[Screenshot: Delete confirmation dialog]
Notes: _______________
TC-WA-M019: Cancel delete keeps workspace area
Precondition: Delete confirmation dialog is showing
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Click "ยกเลิก" (Cancel) button | Dialog closes | [ ] | [ ] |
| 2 | Verify returned to list | Workspace area list displayed | [ ] | [ ] |
| 3 | Verify workspace area still in list | Workspace area was NOT deleted | [ ] | [ ] |
[Screenshot: Workspace area still in list after cancel]
Notes: _______________
TC-WA-M020: FK constraint prevents delete (workspace area in use)
Precondition: Workspace area is linked to projects
| Step | Action | Expected Result | Dev | QA |
|---|---|---|---|---|
| 1 | Find a workspace area linked to projects | Workspace area with project dependencies | [ ] | [ ] |
| 2 | Click options → Delete | Delete triggered | [ ] | [ ] |
| 3 | Click "ตกลง" to confirm | Delete attempted | [ ] | [ ] |
| 4 | Wait for response | Server processes request | [ ] | [ ] |
| 5 | Verify error snackbar | Error message: "Workspace area is currently in use" | [ ] | [ ] |
| 6 | Verify workspace area still in list | Workspace area was NOT deleted due to FK constraint | [ ] | [ ] |
[Screenshot: Delete failed error snackbar]
Notes: Workspace areas linked to projects cannot be deleted. This is expected behavior - the FK constraint protects data integrity.
Test Execution Notes
Tester Comments:
Issues Found:
| Issue ID | Test Case | Description | Severity |
|---|---|---|---|
Environment Details:
| Item | Value |
|---|---|
| Browser | |
| Browser Version | |
| OS | |
| Screen Resolution | |
| Backend URL | |
| Frontend URL |
Sign-off:
| Role | Name | Date | Signature |
|---|---|---|---|
| Tester | |||
| Reviewer |
Labels verified against:
workspace-area-setting-list.component.ts(table headers, menu actions)workspace-area-setting-form-general.component.ts(form field labels)workspace-area-setting-list-toolbar.component.ts(toolbar buttons)