Phase 2: Revenue Cycles E2E Workflow Tests#627
Merged
africanitem merged 19 commits intoSimpleAccounts:developfrom Jan 18, 2026
Merged
Phase 2: Revenue Cycles E2E Workflow Tests#627africanitem merged 19 commits intoSimpleAccounts:developfrom
africanitem merged 19 commits intoSimpleAccounts:developfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
MohsinHashmi-DataInn
previously approved these changes
Jan 14, 2026
Contributor
MohsinHashmi-DataInn
left a comment
There was a problem hiding this comment.
Approved. Comprehensive Phase 2 revenue cycle tests including quotation-to-invoice and credit note/refund workflows. Good coverage of the complete revenue cycle.
The merge-base changed after approval.
…#490) - Add clearDatabase() function for database cleanup - Add setupTestEnvironment() function for environment initialization - Add utility functions for getting base URLs and paths - Follows standard patterns from existing test helpers Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup
- Add getTestUserCredentials() function following E2E_USERNAME/E2E_PASSWORD pattern
- Add generateTestUserEmail() function using pattern test-${workflow}-${Date.now()}@example.com
- Add loginTestUser() function using standardized login helper
- Add createTestUser() function for user registration via registration flow
- Follows standard patterns from existing test helpers
Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup
Depends on Task SimpleAccounts#490
- Add generateBankAccountName() using pattern: Test Bank Account ${Date.now()}
- Add generateAccountNumber() using pattern: ACC-${Date.now()}
- Add createBankAccountViaAPI() for API-based account creation
- Add createPettyCashAccount() for petty cash setup (essential for payments)
- Add createBankAccountViaUI() as fallback method
- Add createTestBankAccount() with API-first, UI-fallback strategy
- Supports proper chart of accounts linkage via bankAccountType
Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup
Depends on Task SimpleAccounts#493
- Add generateCustomerName() using pattern: Test Customer ${Date.now()}
- Add generateCustomerEmail() using pattern: customer-${Date.now()}@example.com
- Add createCustomerViaAPI() for API-based customer creation
- Add createCustomerViaUI() using standardized contact creation helper
- Add createTestCustomer() with API-first, UI-fallback strategy
- Supports proper billing/shipping addresses with isBillingAndShippingAddressSame flag
- Uses contactType = 1 for customers
Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup
Depends on Task SimpleAccounts#493
- Add generateSupplierName() using pattern: Test Supplier ${Date.now()}
- Add generateSupplierEmail() using pattern: supplier-${Date.now()}@example.com
- Add createSupplierViaAPI() for API-based supplier creation
- Add createSupplierViaUI() using standardized contact creation helper
- Add createTestSupplier() with API-first, UI-fallback strategy
- Supports proper billing/shipping addresses with isBillingAndShippingAddressSame flag
- Uses contactType = 2 for suppliers
Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup
Depends on Task SimpleAccounts#493
) - Add generateProductCode() using pattern: PRD-${Date.now()} - Add generateProductName() using pattern: Test Product ${Date.now()} - Add createProductViaAPI() for API-based product creation - Add createTestProduct() for product creation - Add createTestService() for service creation (productType = SERVICE) - Supports both products and services - Supports proper VAT codes via vatCategoryId Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup Depends on Task SimpleAccounts#493
- Add getVatCategories() to retrieve all VAT categories - Add verifyVatCategoryExists() to verify specific VAT category - Add getVatCategoryById() to get VAT category by ID - Add setupVATCodes() to verify VAT codes exist before transactions - Functions verify VAT codes exist before creating transactions Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup Depends on Task SimpleAccounts#493
…s#499) - Add getChartOfAccounts() to retrieve all Chart of Accounts - Add verifyChartOfAccountExists() to verify specific COA - Add getChartOfAccountById() to get COA by ID - Add setupChartOfAccounts() to verify COA structure exists - Functions verify COA structure exists before transactions Part of Epic SimpleAccounts#491: Prerequisites and Test Data Setup Depends on Task SimpleAccounts#493
…ounts#500) - Add comprehensive test suite for Epic SimpleAccounts#491 prerequisites - Tests all helper functions: VAT, COA, bank accounts, customers, suppliers, products, services - Validates petty cash account creation (essential for payment workflows) - Validates proper billing/shipping addresses for customers and suppliers - Validates VAT codes and Chart of Accounts structure - Includes end-to-end validation test that creates all prerequisites in sequence - All tests follow standardized patterns and naming conventions Part of Epic SimpleAccounts#491 Depends on SimpleAccounts#490, SimpleAccounts#493-499
- fix prerequisites test to use request fixture per-test instead of beforeAll - fix banking test navigation URL matching - make database cleanup non-blocking in test-setup-helpers - add auto-user creation logic in prerequisites test resolves playwright fixture reuse errors and improves test reliability. 4 tests now passing (up from 0).
- fix request usage in beforeAll to use page.request instead - ensures api calls work correctly when request fixture is not available
…#502) - Add transaction helpers for deposits, withdrawals - Add balance verification helpers - Add transaction list retrieval helpers - Add navigation helpers for transactions and statements - Add UI fallback methods for transaction creation Implements Epic SimpleAccounts#501 Task SimpleAccounts#502
…impleAccounts#503-511) - Task SimpleAccounts#503: Bank account creation test - Task SimpleAccounts#504: Opening balance entry test - Task SimpleAccounts#505: Deposit transaction creation test - Task SimpleAccounts#506: Withdrawal transaction creation test - Task SimpleAccounts#507: Transaction linking to receipts test - Task SimpleAccounts#508: Transaction linking to payments test - Task SimpleAccounts#509: Transaction history viewing test - Task SimpleAccounts#510: Bank statement generation test - Task SimpleAccounts#511: Account balance calculations verification test Implements Epic SimpleAccounts#501 Tasks SimpleAccounts#503-511
- Add quotation-helpers.ts with helper functions
- Generate quotation numbers using pattern: QTN-${Date.now()}
- Support creating quotations via API
- Support getting quotation details and list
- Support sending/posting quotations
- Add navigation helpers for quotation pages
- Follows same pattern as invoice-helpers.ts
…ice workflow tests - Task SimpleAccounts#525: Implement quotation creation test - Task SimpleAccounts#526: Implement quotation viewing/sending test - Task SimpleAccounts#527: Implement quotation-to-invoice conversion test - Task SimpleAccounts#528: Implement complete quotation-to-payment workflow test - Add quotation-to-invoice-workflow.spec.ts - Update quotation-helpers.ts to retrieve quotation ID after creation
…pers
- Add credit-note-helpers.ts with helper functions
- Generate credit note numbers using pattern: CN-${Date.now()}
- Support creating credit notes via API
- Support getting credit note details and list
- Support posting credit notes
- Support applying credit notes to invoices
- Support processing refunds for credit notes
- Add navigation helpers for credit note pages
- Follows same pattern as invoice-helpers.ts
…efund workflow tests - Task SimpleAccounts#553: Implement credit note creation from invoice test - Task SimpleAccounts#554: Implement credit note posting test - Task SimpleAccounts#555: Implement credit note application to invoice test - Task SimpleAccounts#556: Implement invoice balance updates after credit note test - Task SimpleAccounts#557: Implement refund processing test - Task SimpleAccounts#558: Implement refund recording test - Task SimpleAccounts#559: Implement accounts receivable updates verification test - Task SimpleAccounts#560: Implement bank account updates verification test - Add credit-note-refund-workflow.spec.ts - Fix credit note helper variable naming issue
6b1ef98 to
1f3b502
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements Phase 2: Revenue Cycles E2E Workflow Tests (Milestone #4)
Epics Implemented
Epic #523: Quotation-to-Invoice Workflow
Epic #551: Credit Note and Refund Workflow
Files Added
apps/frontend/e2e/helpers/quotation-helpers.ts- Quotation operation helpersapps/frontend/e2e/quotation-to-invoice-workflow.spec.ts- Quotation-to-invoice workflow testsapps/frontend/e2e/helpers/credit-note-helpers.ts- Credit note operation helpersapps/frontend/e2e/credit-note-refund-workflow.spec.ts- Credit note and refund workflow testsRelated Issues