Skip to content

WEB-1095: [Playwright] Loan account E2E specs — create, approve/disburse, reject & undo - #3823

Draft
devvaansh wants to merge 1 commit into
openMF:devfrom
devvaansh:WEB-1095-playwright-loan-e2e-specs
Draft

WEB-1095: [Playwright] Loan account E2E specs — create, approve/disburse, reject & undo#3823
devvaansh wants to merge 1 commit into
openMF:devfrom
devvaansh:WEB-1095-playwright-loan-e2e-specs

Conversation

@devvaansh

@devvaansh devvaansh commented Aug 10, 2026

Copy link
Copy Markdown
Member

Description

Adds the Playwright E2E page objects and specs for the loan-account domain, built on the WEB-1094 test infrastructure (selectors, routes, fineract-api loan 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 --check and eslint clean; 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

    • Added end-to-end support for creating loan accounts, including product selection, loan details, terms, repayment schedules, and submission.
    • Added loan account actions for approval, disbursement, rejection, and reversing prior transitions.
    • Added navigation across loan account tabs, menus, statuses, and notifications.
  • Tests

    • Added coverage for loan creation, approval, disbursement, rejection, and lifecycle reversals.
    • Added validation for repayment schedules, dates, statuses, and transition results.

@devvaansh
devvaansh requested a review from a team August 10, 2026 15:07
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d6ad34e0-862e-4723-a261-4a4baa1fafc1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Added Playwright page objects for loan creation, loan account viewing, and loan actions. Added end-to-end tests for creation, approval, disbursement, rejection, and undo transitions.

Changes

Loan account Playwright workflows

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devvaansh
devvaansh marked this pull request as draft August 10, 2026 15:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 85415c7 and 50362ba.

📒 Files selected for processing (8)
  • playwright/pages/index.ts
  • playwright/pages/loans/create-loan-account.page.ts
  • playwright/pages/loans/loan-account-action.page.ts
  • playwright/pages/loans/loan-account-view.page.ts
  • playwright/tests/loans/create-loan-account.spec.ts
  • playwright/tests/loans/lifecycle/approve-disburse.spec.ts
  • playwright/tests/loans/lifecycle/reject.spec.ts
  • playwright/tests/loans/lifecycle/undo-transitions.spec.ts

Comment thread playwright/pages/loans/create-loan-account.page.ts
@devvaansh
devvaansh force-pushed the WEB-1095-playwright-loan-e2e-specs branch from 50362ba to fd45f84 Compare August 10, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant