From 67cdb88f668d0df85f79175583de05a48207be08 Mon Sep 17 00:00:00 2001 From: mdmytriv Date: Fri, 11 Apr 2025 15:49:26 +0300 Subject: [PATCH] FINERACT-2181: added e2e tests interestRecognitionOnDisbursementDate flag --- .../resources/features/LoanAccrualActivity.feature | 4 ++++ .../test/resources/features/LoanChargeOff.feature | 2 ++ .../src/test/resources/features/LoanProduct.feature | 13 ++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature index 9879d107c..71b979595 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature @@ -4556,6 +4556,7 @@ Feature: LoanAccrualActivity When Admin creates a fully customized loan with the following data: | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | | LP2_ADV_PYMNT_INTEREST_RECOGNITION_DISBURSEMENT_DAILY_EMI_360_30_ACCRUAL_ACTIVITY | 31 January 2024 | 2000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "true" And Admin successfully approves the loan on "31 January 2024" with "2000" amount and expected disbursement date on "31 January 2024" When Admin successfully disburse the loan on "31 January 2024" with "2000" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -5052,6 +5053,7 @@ Feature: LoanAccrualActivity When Admin creates a fully customized loan with the following data: | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | | LP2_ADV_PYMNT_INTEREST_RECOGNITION_DISBURSEMENT_DAILY_EMI_360_30_ACCRUAL_ACTIVITY | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "true" And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "200" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -5393,6 +5395,7 @@ Feature: LoanAccrualActivity When Admin creates a fully customized loan with the following data: | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | | LP2_ADV_PYMNT_INTEREST_RECOGNITION_DISBURSEMENT_DAILY_EMI_360_30_ACCRUAL_ACTIVITY | 01 January 2024 | 2000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "true" And Admin successfully approves the loan on "01 January 2024" with "2000" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "2000" EUR transaction amount #run COB for 01st of Jan 2024 @@ -5729,6 +5732,7 @@ Feature: LoanAccrualActivity When Admin creates a fully customized loan with the following data: | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | | LP2_ADV_PYMNT_INTEREST_RECOGNITION_DISBURSEMENT_DAILY_EMI_360_30_ACCRUAL_ACTIVITY | 01 January 2024 | 2000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "true" And Admin successfully approves the loan on "01 January 2024" with "2000" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "2000" EUR transaction amount #run COB for 01st of Jan 2024 diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature index 488137934..4eb31752c 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature @@ -6614,6 +6614,7 @@ Feature: Charge-off Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 54.75 | 0 | 0 | 1054.75 | 0 | 0 | 0 | 1054.75 | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "true" And Admin successfully approves the loan on "1 January 2024" with "1000" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "1000" EUR transaction amount And Admin runs inline COB job for Loan @@ -6662,6 +6663,7 @@ Feature: Charge-off Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 54.75 | 0 | 0 | 1054.75 | 0 | 0 | 0 | 1054.75 | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "false" And Admin successfully approves the loan on "1 January 2024" with "1000" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "1000" EUR transaction amount And Admin runs inline COB job for Loan diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature index 75ac07696..9a02ca0cb 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature @@ -208,8 +208,19 @@ Feature: LoanProduct | Delinquent | | 3 | true | false | | Other | | 4 | true | false | - Scenario: As a user I would like to verify interestRecognitionOnDisbursementDate flag in loan product response + @TestRailId:C3587 + Scenario: As a user I would like to verify interestRecognitionOnDisbursementDate=false flag in loan product response When Admin sets the business date to "01 January 2025" When Admin creates a client with random data And Admin successfully creates a new customised Loan submitted on date: "01 January 2025", with Principal: "1000", a loanTermFrequency: 1 months, and numberOfRepayments: 1 Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "false" + + @TestRailId:C3588 + Scenario: As a user I would like to verify interestRecognitionOnDisbursementDate=true flag in loan product response + When Admin sets the business date to "01 January 2025" + When Admin creates a client with random data + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_RECOGNITION_DISBURSEMENT_DAILY_EMI_360_30_ACCRUAL_ACTIVITY | 01 January 2025 | 1000 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + Then Loan Product response contains interestRecognitionOnDisbursementDate flag with value "true"