WEB-1095: [Playwright] Loan account E2E specs — create, approve/disburse, reject & undo - #3823
WEB-1095: [Playwright] Loan account E2E specs — create, approve/disburse, reject & undo#3823devvaansh wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note
|
| Layer / File(s) | Summary |
|---|---|
Loan creation flow playwright/pages/loans/create-loan-account.page.ts, playwright/pages/index.ts, playwright/tests/loans/create-loan-account.spec.ts |
Adds the creation page object, product selection, form filling, validated step navigation, schedule generation, submission, and creation-flow tests. |
Account navigation and actions playwright/pages/loans/loan-account-view.page.ts, playwright/pages/loans/loan-account-action.page.ts |
Adds account loading, overlay handling, nested action-menu lookup, tab navigation, action-specific form handling, submission, and undo support. |
Loan lifecycle validation playwright/tests/loans/lifecycle/* |
Adds UI and API validation for approval, disbursement, rejection, undo approval, and undo disbursal transitions. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Possibly related PRs
- openMF/web-app#3767: Introduces loan-account factories and test-data types used by the lifecycle tests.
- openMF/web-app#3814: Introduces loan-account routes, selectors, factories, and client navigation used by the page objects.
- openMF/web-app#3815: Adds parallel Playwright page objects and lifecycle coverage for account workflows.
Suggested reviewers: iohacker
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly summarizes the loan-account Playwright E2E coverage for creation, lifecycle actions, rejection, and undo transitions. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@playwright/pages/loans/create-loan-account.page.ts`:
- Around line 260-265: Update waitForSchedule to wait for the
generateScheduleButton to become visible before deciding whether to click it,
rather than performing a single immediate visibility check. Preserve the
existing fallback behavior for visibility-check failures and continue waiting
for scheduleRows after triggering or skipping the button.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d18d27f-6730-496b-a512-d51ae2bba72d
📒 Files selected for processing (8)
playwright/pages/index.tsplaywright/pages/loans/create-loan-account.page.tsplaywright/pages/loans/loan-account-action.page.tsplaywright/pages/loans/loan-account-view.page.tsplaywright/tests/loans/create-loan-account.spec.tsplaywright/tests/loans/lifecycle/approve-disburse.spec.tsplaywright/tests/loans/lifecycle/reject.spec.tsplaywright/tests/loans/lifecycle/undo-transitions.spec.ts
…rse, reject & undo
50362ba to
fd45f84
Compare
Description
Adds the Playwright E2E page objects and specs for the loan-account domain, built on the WEB-1094 test infrastructure (selectors, routes,
fineract-apiloan surface, loan factory, Material form helpers).Page objects (L3):
create-loan-account,loan-account-view,loan-account-action.Specs (L5):
create-loan-account— happy-path loan application through the UI.lifecycle/approve-disburse— approve a submitted loan, then disburse it to Active.lifecycle/reject— reject a submitted loan application.lifecycle/undo-transitions— undo approval / undo disbursal back to the prior state.Preconditions (active client, submitted/approved/active loan) are arranged through the WEB-1094 API factories, so each spec exercises only the UI transition under test rather than re-driving setup through forms.
Verification:
prettier --checkandeslintclean; all loan specs pass as chromium UI tests against the running app + live Fineract.Dependencies: WEB-1094 (test infrastructure) — merged. Independent of the savings PR (WEB-1092); no cross-domain coupling.
Related issues and discussion
WEB-1095
Screenshots, if any
N/A — test-only change; no application code is modified.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit
New Features
Tests