Skip to content

Commit 3a8af86

Browse files
FINERACT-2354: e2e test scenarios for re-aging preview
1 parent ff13fb2 commit 3a8af86

File tree

9 files changed

+756
-129
lines changed

9 files changed

+756
-129
lines changed

fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,13 @@ public void loanInstallmentsObligationsMet() throws IOException {
25672567
assertThat(allInstallmentsObligationsMet).isTrue();
25682568
}
25692569

2570+
@Then("Loan is closed with zero outstanding balance and it's all installments have obligations met")
2571+
public void loanClosedAndInstallmentsObligationsMet() throws IOException {
2572+
loanInstallmentsObligationsMet();
2573+
loanOutstanding(0);
2574+
loanStatus("CLOSED_OBLIGATIONS_MET");
2575+
}
2576+
25702577
@Then("Loan closedon_date is {string}")
25712578
public void loanClosedonDate(String date) throws IOException {
25722579
Response<PostLoansResponse> loanCreateResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);

fineract-e2e-tests-runner/src/test/resources/features/Loan.feature

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7818,8 +7818,8 @@ Feature: Loan
78187818
| 01 January 2025 | 01 January 2025 | 700.0 | |
78197819
| 01 January 2025 | 01 January 2025 | 200.0 | |
78207820

7821-
When Loan Pay-off is made on "1 January 2025"
7822-
Then Loan's all installments have obligations met
7821+
When Loan Pay-off is made on "01 January 2025"
7822+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
78237823

78247824
@TestRailId:C4029
78257825
Scenario: Verify tranche interest bearing progressive loan that expects two tranches at the same date with over expected disb amount in expected order - UC2
@@ -7892,7 +7892,7 @@ Feature: Loan
78927892
| 01 January 2025 | 01 January 2025 | 250.0 | |
78937893

78947894
When Loan Pay-off is made on "1 January 2025"
7895-
Then Loan's all installments have obligations met
7895+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
78967896

78977897
@TestRailId:C4030
78987898
Scenario: Verify tranche interest bearing progressive loan that expects two tranches at the same date with over expected disb amount in not expected order - UC3
@@ -7966,6 +7966,9 @@ Feature: Loan
79667966
| 01 January 2025 | 01 January 2025 | 300.0 | |
79677967
| 01 January 2025 | 01 January 2025 | 600.0 | |
79687968

7969+
When Loan Pay-off is made on "01 January 2025"
7970+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
7971+
79697972
@TestRailId:C4031
79707973
Scenario: Verify tranche interest bearing progressive loan that expects two tranches at the same date with diff expected disb amounts in diff order - UC4
79717974
When Admin sets the business date to "01 January 2025"
@@ -8038,7 +8041,7 @@ Feature: Loan
80388041
| 01 January 2025 | 01 January 2025 | 300.0 | |
80398042

80408043
When Loan Pay-off is made on "1 January 2025"
8041-
Then Loan's all installments have obligations met
8044+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
80428045

80438046
@TestRailId:C4032
80448047
Scenario: Verify tranche interest bearing progressive loan that expects two tranches at the same date in defined order with over expected 2nd disb amount - UC5
@@ -8111,7 +8114,7 @@ Feature: Loan
81118114
| 01 January 2025 | 01 January 2025 | 800.0 | |
81128115

81138116
When Loan Pay-off is made on "1 January 2025"
8114-
Then Loan's all installments have obligations met
8117+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
81158118

81168119
@TestRailId:C4033
81178120
Scenario: Verify tranche interest bearing progressive loan that expects tranche with added 2nd tranche at the same date and undo disbursement - UC6
@@ -8246,7 +8249,7 @@ Feature: Loan
82468249
Then Admin fails to disburse the loan on "01 February 2025" with "50" amount
82478250

82488251
When Loan Pay-off is made on "1 February 2025"
8249-
Then Loan's all installments have obligations met
8252+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
82508253

82518254
@TestRailId:C4034
82528255
Scenario: Verify tranche interest bearing progressive loan that expects tranches at the same date with repayment and undo last disbursement - UC7
@@ -8357,7 +8360,7 @@ Feature: Loan
83578360
Then Admin fails to disburse the loan on "01 January 2025" with "200" amount
83588361

83598362
When Loan Pay-off is made on "1 January 2025"
8360-
Then Loan's all installments have obligations met
8363+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met
83618364

83628365
@TestRailId:C4035
83638366
Scenario: Verify tranche interest bearing progressive loan that expects tranche with added 2 tranches at the same date - UC8
@@ -8485,4 +8488,4 @@ Feature: Loan
84858488
Then Admin fails to disburse the loan on "01 February 2025" with "50" amount
84868489

84878490
When Loan Pay-off is made on "1 February 2025"
8488-
Then Loan's all installments have obligations met
8491+
Then Loan is closed with zero outstanding balance and it's all installments have obligations met

0 commit comments

Comments
 (0)