FINERACT-2412: e2e test scenarios get loan Api changes with active terms

This commit is contained in:
MarianaDmytrivBinariks
2026-02-03 11:28:52 +01:00
committed by Adam Saghy
parent 7bb4840d7a
commit 7a7ed538e6
2 changed files with 20 additions and 21 deletions
@@ -168,6 +168,7 @@ import org.apache.fineract.test.messaging.store.EventStore;
import org.apache.fineract.test.stepdef.AbstractStepDef;
import org.apache.fineract.test.support.TestContextKey;
import org.assertj.core.api.SoftAssertions;
import org.junit.jupiter.api.Assertions;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@@ -2176,6 +2177,15 @@ public class LoanStepDef extends AbstractStepDef {
.isEqualTo(lastPaymentAmountExpected);
}
@Then("Loan has {int} active number of terms")
public void loanActualNoTermCheck(Integer activeNoTermExpected) {
PostLoansResponse loanCreateResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
Long loanId = loanCreateResponse.getLoanId();
GetLoansLoanIdResponse loanIdResponse = ok(() -> fineractClient.loans().retrieveLoan(loanId, Map.of()));
Assertions.assertNotNull(loanIdResponse);
Assertions.assertEquals(activeNoTermExpected, loanIdResponse.getActualNoTerm());
}
@Then("Loan Repayment schedule has {int} periods, with the following data for periods:")
public void loanRepaymentSchedulePeriodsCheck(int linesExpected, DataTable table) {