Step-by-Step Guide — Follow each step exactly as written. All values are provided — do not improvise.

TC-BIL-001: Invoice Creation (Admin)

Module: Billing & Invoicing - Invoice Creation

Primary Login: admin@rcme.membervu.com / Admin123! (ADMIN role)

URLs for this test:
Frontend: https://stg-rcme.membervu.com
Backend API: https://stg-api.membervu.com
MailHog: https://stg-webmail.membervu.com

Test A: Regular Member Invoice (Annual Dues + Late Fee)

Purpose: Create an invoice for a Regular Member with two line items totalling PHP 15,500.00.

StepAction (EXACT clicks/typing)Expected Result (EXACT text/behavior)Test Value
1Open browser, go to:
https://stg-rcme.membervu.com/login
Login page loads with "Email" and "Password" fields.https://stg-rcme.membervu.com/login
2Enter email: admin@rcme.membervu.com
Enter password: Admin123!
Click "Sign In".
Login succeeds. Admin dashboard displayed.Email: admin@rcme.membervu.com
Pass: Admin123!
3In the left sidebar, click "Admin" to expand the menu, then click "Billing" > "Invoices".The invoice list page loads. A table of existing invoices is displayed (may be empty).-
4Click the "Create Invoice" button (top-right area of the page).An invoice creation form or modal opens with fields for Member, Line Items, Due Date, and Notes.-
5In the Member field (dropdown or autocomplete), search for Maria Cruz and select her.
(Email: testmember@rcme.membervu.com)
Member details auto-populate (name: Maria Cruz, email shown). Membership type: Regular Member.Member: Maria Cruz
testmember@rcme.membervu.com
6Click "Add Line Item".
Description: Annual Dues 2026
Amount: 15000
Line item row appears showing "Annual Dues 2026" and PHP 15,000.00. Running total: PHP 15,000.00.Description: Annual Dues 2026
Amount: 15000
7Click "Add Line Item" again.
Description: Late Payment Fee
Amount: 500
Second line item added. Running total updates to PHP 15,500.00.Description: Late Payment Fee
Amount: 500
8Set the Due Date to 30 days from today. Use the date picker to select the date.Due date field shows the selected future date (e.g., 2026-05-11).30 days from today
9In the Internal Note field (if available), type:
Test invoice - Regular Member annual dues
Note text accepted in the field.Test invoice - Regular Member annual dues
10Click the "Create Invoice" (or "Save") button.Success message: "Invoice created successfully" or similar. Redirected to invoice detail or list page.-
11On the invoice list or detail page, verify the new invoice:
- Invoice number format (e.g., INV-2026-XXXX)
- Status
- Total amount
- Assigned member
Invoice shows:
- Status: ISSUED (or PENDING)
- Total: PHP 15,500.00
- Member: Maria Cruz
- 2 line items visible
Total: PHP 15,500.00
Status: ISSUED
PASS if: Invoice created with 2 line items (Annual Dues 2026 = PHP 15,000 + Late Payment Fee = PHP 500), total PHP 15,500.00, status ISSUED, member Maria Cruz linked, internal note saved.

Test B: Multi-Line Item Invoice (3 Line Items)

Purpose: Create an invoice with multiple charge types totalling PHP 18,500.00.

StepAction (EXACT clicks/typing)Expected Result (EXACT text/behavior)Test Value
1From the invoice list, click "Create Invoice".Invoice creation form opens.-
2In the Member field, search for and select Maria Cruz (or another active member if available).Member selected and details populated.Member: Maria Cruz
3Click "Add Line Item".
Description: Annual Dues 2026
Amount: 15000
Line item added. Total: PHP 15,000.00.Description: Annual Dues 2026
Amount: 15000
4Click "Add Line Item".
Description: Event Registration - Annual Gala
Amount: 2500
Second item added. Total: PHP 17,500.00.Description: Event Registration - Annual Gala
Amount: 2500
5Click "Add Line Item".
Description: Publication Fee - Monthly Newsletter
Amount: 1000
Third item added. Total: PHP 18,500.00.Description: Publication Fee - Monthly Newsletter
Amount: 1000
6Verify the running total at the bottom of the form.Total = 15,000 + 2,500 + 1,000 = PHP 18,500.00Total: PHP 18,500.00
7Set the Due Date to 30 days from today.Due date accepted.30 days from today
8Click "Create Invoice".Invoice created successfully. Redirected to list or detail page.-
9Click on the newly created invoice to view details.Detail page shows all 3 line items with correct descriptions and amounts. Total: PHP 18,500.00.-
PASS if: All 3 line items preserved with correct amounts, total PHP 18,500.00.

Test C: Invoice Creation Validation

Purpose: Verify form validation prevents invalid invoices from being created.

StepAction (EXACT clicks/typing)Expected Result (EXACT text/behavior)Test Value
1Open invoice creation form. Do NOT select a member. Click "Create Invoice".Validation error: "Member is required" or form prevents submission. Invoice is NOT created.Member: (none)
2Select member Maria Cruz. Do NOT add any line items. Click "Create Invoice".Validation error: "At least one line item required" or form prevents submission.Line items: (none)
3Add a line item with:
Description: Test Zero Amount
Amount: 0
Validation error: "Amount must be greater than 0" or field rejects zero.Amount: 0
4Change the amount to: -500Validation error: "Amount must be greater than 0" or field rejects negative input.Amount: -500
5Clear the amount field. Set amount to 15000. Clear the description field (leave it empty). Click "Create Invoice".Validation error: "Description is required" or form prevents submission.Description: (empty)
PASS if: All 5 validation scenarios show appropriate error messages. No invalid invoice is created.

Test D: Member RBAC - Invoice Creation Access Denied

Purpose: Verify a regular member cannot access admin invoice creation.

StepAction (EXACT clicks/typing)Expected Result (EXACT text/behavior)Test Value
1Log out of the admin account. Go to:
https://stg-rcme.membervu.com/login
Login as: testmember@rcme.membervu.com / Member123!
Login succeeds. Member dashboard displayed.Email: testmember@rcme.membervu.com
Pass: Member123!
2Look at the left sidebar. Check for any "Admin" menu or "Invoices" admin link.Admin menu is NOT visible. No "Create Invoice" admin option available.-
3Try navigating directly to:
https://stg-rcme.membervu.com/admin/invoices
Access denied page displayed, OR redirect to member dashboard, OR error message. The admin invoice page does NOT load./rcme/admin/invoices
4Try navigating directly to:
https://stg-rcme.membervu.com/admin/invoices/create
Access denied or redirect. Invoice creation form does NOT load for member role./rcme/admin/invoices/create
PASS if: Member user cannot see admin menu, cannot access invoice list, and cannot access invoice creation form.

API Test: POST /api/billing/invoices (via DevTools)

Purpose: Verify the invoice creation API response directly.

StepAction (EXACT clicks/typing)Expected Result (EXACT text/behavior)Test Value
1Log out and login as admin@rcme.membervu.com / Admin123!. Open DevTools (F12) > Network tab.Network tab is open and recording.-
2Create an invoice through the UI (as in Test A above).Watch for the POST request to /api/billing/invoices or /api/billing/admin/invoices.-
3Click on the POST request in the Network tab. Check the Status column.Status: 201 Created-
4Click on the request, then the "Response" tab.Response JSON contains:
- id: UUID
- Invoice number (e.g., INV-2026-XXXX)
- status: "ISSUED" or "PENDING"
- total: matches line item sum
- lineItems: array with correct entries
-
PASS if: API returns 201 Created with correct invoice data including ID, number, status, total, and line items.

CLEANUP

After completing all tests in this file: