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:
Backend API:
MailHog:
Frontend:
https://stg-rcme.membervu.comBackend API:
https://stg-api.membervu.comMailHog:
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.
| Step | Action (EXACT clicks/typing) | Expected Result (EXACT text/behavior) | Test Value |
|---|---|---|---|
| 1 | Open browser, go to:https://stg-rcme.membervu.com/login | Login page loads with "Email" and "Password" fields. | https://stg-rcme.membervu.com/login |
| 2 | Enter email: admin@rcme.membervu.comEnter password: Admin123!Click "Sign In". | Login succeeds. Admin dashboard displayed. | Email: admin@rcme.membervu.comPass: Admin123! |
| 3 | In 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). | - |
| 4 | Click 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. | - |
| 5 | In 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 Cruztestmember@rcme.membervu.com |
| 6 | Click "Add Line Item". Description: Annual Dues 2026Amount: 15000 | Line item row appears showing "Annual Dues 2026" and PHP 15,000.00. Running total: PHP 15,000.00. | Description: Annual Dues 2026Amount: 15000 |
| 7 | Click "Add Line Item" again. Description: Late Payment FeeAmount: 500 | Second line item added. Running total updates to PHP 15,500.00. | Description: Late Payment FeeAmount: 500 |
| 8 | Set 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 |
| 9 | In 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 |
| 10 | Click the "Create Invoice" (or "Save") button. | Success message: "Invoice created successfully" or similar. Redirected to invoice detail or list page. | - |
| 11 | On 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.
| Step | Action (EXACT clicks/typing) | Expected Result (EXACT text/behavior) | Test Value |
|---|---|---|---|
| 1 | From the invoice list, click "Create Invoice". | Invoice creation form opens. | - |
| 2 | In the Member field, search for and select Maria Cruz (or another active member if available). | Member selected and details populated. | Member: Maria Cruz |
| 3 | Click "Add Line Item". Description: Annual Dues 2026Amount: 15000 | Line item added. Total: PHP 15,000.00. | Description: Annual Dues 2026Amount: 15000 |
| 4 | Click "Add Line Item". Description: Event Registration - Annual GalaAmount: 2500 | Second item added. Total: PHP 17,500.00. | Description: Event Registration - Annual GalaAmount: 2500 |
| 5 | Click "Add Line Item". Description: Publication Fee - Monthly NewsletterAmount: 1000 | Third item added. Total: PHP 18,500.00. | Description: Publication Fee - Monthly NewsletterAmount: 1000 |
| 6 | Verify the running total at the bottom of the form. | Total = 15,000 + 2,500 + 1,000 = PHP 18,500.00 | Total: PHP 18,500.00 |
| 7 | Set the Due Date to 30 days from today. | Due date accepted. | 30 days from today |
| 8 | Click "Create Invoice". | Invoice created successfully. Redirected to list or detail page. | - |
| 9 | Click 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.
| Step | Action (EXACT clicks/typing) | Expected Result (EXACT text/behavior) | Test Value |
|---|---|---|---|
| 1 | Open 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) |
| 2 | Select 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) |
| 3 | Add a line item with: Description: Test Zero AmountAmount: 0 | Validation error: "Amount must be greater than 0" or field rejects zero. | Amount: 0 |
| 4 | Change the amount to: -500 | Validation error: "Amount must be greater than 0" or field rejects negative input. | Amount: -500 |
| 5 | Clear 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.
| Step | Action (EXACT clicks/typing) | Expected Result (EXACT text/behavior) | Test Value |
|---|---|---|---|
| 1 | Log out of the admin account. Go to:https://stg-rcme.membervu.com/loginLogin as: testmember@rcme.membervu.com / Member123! | Login succeeds. Member dashboard displayed. | Email: testmember@rcme.membervu.comPass: Member123! |
| 2 | Look at the left sidebar. Check for any "Admin" menu or "Invoices" admin link. | Admin menu is NOT visible. No "Create Invoice" admin option available. | - |
| 3 | Try 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 |
| 4 | Try 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.
| Step | Action (EXACT clicks/typing) | Expected Result (EXACT text/behavior) | Test Value |
|---|---|---|---|
| 1 | Log out and login as admin@rcme.membervu.com / Admin123!. Open DevTools (F12) > Network tab. | Network tab is open and recording. | - |
| 2 | Create an invoice through the UI (as in Test A above). | Watch for the POST request to /api/billing/invoices or /api/billing/admin/invoices. | - |
| 3 | Click on the POST request in the Network tab. Check the Status column. | Status: 201 Created | - |
| 4 | Click 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:
- Note the invoice numbers created: Test A (PHP 15,500), Test B (PHP 18,500), and the API test invoice.
- These invoices will be used in subsequent test cases (TC-BIL-002 through TC-BIL-006).
- If NOT continuing to other billing tests, void the test invoices: Open each invoice > click "Void Invoice" > enter reason:
Test cleanup - TC-BIL-001> Confirm. - Record all invoice numbers in your test report for traceability.