MarianaDmytrivBinariks commented on code in PR #5841:
URL: https://github.com/apache/fineract/pull/5841#discussion_r3232475162


##########
fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscount.feature:
##########
@@ -1131,13 +1149,41 @@ Feature: Working Capital Discount
       | WCLP_DISCOUNT_DISALLOW_ATTRIBUTES_OVERRIDE | 2026-01-01      | 
2026-01-01               | Active | 100.0     | 100.0             | 100.0       
 | 1.0               | null             | null             | null     |
 # --- add discount after disbursement is forbidden due to overrides disallowed 
--- #
     And Update discount with "20" amount on Working Capital loan account 
failed due to override disallowed by product
-
+# --- undo working capital disbursal --- #
     Then Admin successfully undo Working Capital disbursal
     And Working capital loan account has the correct data:
       | product.name                               | submittedOnDate | 
expectedDisbursementDate | status   | principal | approvedPrincipal | 
totalPayment | periodPaymentRate | discountProposed | discountApproved | 
discount |
       | WCLP_DISCOUNT_DISALLOW_ATTRIBUTES_OVERRIDE | 2026-01-01      | 
2026-01-01               | Approved | 100.0     | 100.0             | 100.0     
   | 1.0               | null             | null             | null     |
+# --- undo working capital approval --- #
     When Admin makes undo approval on the working capital loan
     Then Working capital loan undo approval was successful
     And Working capital loan account has the correct data:
       | product.name                               | submittedOnDate | 
expectedDisbursementDate | status                         | principal | 
approvedPrincipal | totalPayment | periodPaymentRate | discountProposed | 
discountApproved | discount |
       | WCLP_DISCOUNT_DISALLOW_ATTRIBUTES_OVERRIDE | 2026-01-01      | 
2026-01-01               | Submitted and pending approval | 100.0     | 0.0     
          | 100.0        | 1.0               | null             | null          
   | null     |
+
+  @TestRailId:C74518
+  Scenario: Verify that undo disbursal of WCL account set discount to null and 
restores the approved discount after disbursement override - UC5.2
+    When Admin sets the business date to "01 January 2026"
+    And Admin creates a client with random data
+    And Admin creates a working capital loan with the following data:
+      | LoanProduct | submittedOnDate | expectedDisbursementDate | 
principalAmount | totalPayment | periodPaymentRate | discount |
+      | WCLP        | 01 January 2026 | 01 January 2026          | 100         
    | 100          | 1                 |          |
+    And Working capital loan account has the correct data:
+      | product.name | submittedOnDate | expectedDisbursementDate | status     
                    | principal | approvedPrincipal | totalPayment | 
periodPaymentRate | discountProposed | discountApproved | discount |
+      | WCLP         | 2026-01-01      | 2026-01-01               | Submitted 
and pending approval | 100.0     | 0.0               | 100.0        | 1.0       
        | null             | null             | null     |
+    Then Working capital loan creation was successful
+    Then Admin successfully approves the working capital loan on "01 January 
2026" with "100" amount and "14" discount amount and expected disbursement date 
on "01 January 2026"
+    And Working capital loan account has the correct data:
+      | product.name | submittedOnDate | expectedDisbursementDate | status   | 
principal | approvedPrincipal | totalPayment | periodPaymentRate | 
discountProposed | discountApproved | discount |
+      | WCLP         | 2026-01-01      | 2026-01-01               | Approved | 
100.0     | 100.0             | 100.0        | 1.0               | null         
    | 14.0             | null     |
+    Then Admin successfully disburse the Working Capital loan on "01 January 
2026" with "100" EUR transaction amount and "13" discount amount
+    Then Working Capital loan status will be "ACTIVE"
+    And Working capital loan account has the correct data:
+      | product.name | submittedOnDate | expectedDisbursementDate | status | 
principal | approvedPrincipal | totalPayment | periodPaymentRate | discount |
+      | WCLP         | 2026-01-01      | 2026-01-01               | Active | 
113.0     | 100.0             | 100.0        | 1.0               | 13.0     |
+# --- undo working capital disbursal --- #
+    Then Admin successfully undo Working Capital disbursal
+    Then Working Capital loan status will be "APPROVED"
+    And Working capital loan account has the correct data:
+      | product.name | submittedOnDate | expectedDisbursementDate | status   | 
principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | 
totalPaidPrincipal | realizedIncome | unrealizedIncome |
+      | WCLP         | 2026-01-01      | 2026-01-01               | Approved | 
100.0     | 100.0             | 100.0        | 1.0               | null     | 
0.0                | 0.0            | 0.0              |

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to