Skip to content

Commit e6f26d9

Browse files
committed
Fix step def
1 parent c65c331 commit e6f26d9

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -786,10 +786,12 @@ public void iCallTheBatchTransactionsEndpointWithExpectedStatusOfAndCallbackurlA
786786
logger.info("Batch Transactions Response: " + scenarioScopeState.response);
787787
}
788788

789-
@And("I should assert total txn count and successful txn count in payment batch detail response for batch account lookup")
790-
public void iShouldAssertTotalTxnCountAndSuccessfulTxnCountInPaymentBatchDetailResponseForBatchAccountLookup() {
791-
assertThat(scenarioScopeState.paymentBatchDetail).isNotNull();
792-
assertThat(scenarioScopeState.paymentBatchDetail.getInstructionList().size()).isEqualTo(3);
789+
@And("I should assert total txn count and successful txn count with {int} txns in payment batch detail response for batch account lookup")
790+
public void iShouldAssertTotalTxnCountAndSuccessfulTxnCountInPaymentBatchDetailResponseForBatchAccountLookup(int expectedCount) {
791+
await().atMost(awaitMost, SECONDS).pollDelay(pollDelay, SECONDS).pollInterval(pollInterval, SECONDS).untilAsserted(() -> {
792+
assertThat(scenarioScopeState.paymentBatchDetail).isNotNull();
793+
assertThat(scenarioScopeState.paymentBatchDetail.getInstructionList().size()).isEqualTo(expectedCount);
794+
});
793795
}
794796

795797
@And("I am able to parse actuator response")

src/test/java/org/mifos/integrationtest/cucumber/stepdef/IdentityMapperStepDef.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,11 @@ public void iWillAssertTheFieldsFromFetchBeneficiaryResponse() {
498498
public void iCreateAnIdentityMapperDTOForRegisterBeneficiaryFromCsvFile() {
499499
List<BeneficiaryDTO> beneficiaryDTOList = new ArrayList<>();
500500
payeeIdentity = generateUniqueNumber(16);
501-
BeneficiaryDTO beneficiaryDTO = new BeneficiaryDTO("3001003873110196", "00", null, "gorilla");
501+
BeneficiaryDTO beneficiaryDTO = new BeneficiaryDTO("1038731101961", "00", null, "gorilla");
502502
beneficiaryDTOList.add(beneficiaryDTO);
503-
beneficiaryDTO = new BeneficiaryDTO("3001003874120160", "00", null, "gorilla");
503+
beneficiaryDTO = new BeneficiaryDTO("1038741201602", "00", null, "gorilla");
504504
beneficiaryDTOList.add(beneficiaryDTO);
505-
beneficiaryDTO = new BeneficiaryDTO("3001003873110195", "00", null, "rhino");
505+
beneficiaryDTO = new BeneficiaryDTO("1038731101953", "00", null, "gorilla");
506506
beneficiaryDTOList.add(beneficiaryDTO);
507507
requestId = generateUniqueNumber(12);
508508
registerBeneficiaryBody = new AccountMapperRequestDTO(requestId, sourceBBID, beneficiaryDTOList);

src/test/java/resources/identityMapperTest.feature

+9-7
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,23 @@ Feature: Identity Account Mapper Api Test
236236
And I will assert the fields from fetch beneficiary response
237237
@gov @ext
238238
Scenario: Batch Account Lookup Integration Test
239-
Given I create an IdentityMapperDTO for Register Beneficiary from csv file
240-
When I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiaryApiTest"
241-
# And I will sleep for 3000 millisecond
242-
Given I have tenant as "paymentBB1"
243-
And I have the demo csv file "ph-ee-bulk-demo-7.csv"
239+
Given I have tenant as "paymentbb1"
240+
And I have the demo csv file "bulk_payment.csv"
241+
And I create a list of payee identifiers from csv file
242+
And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200
243+
And I create a IdentityMapperDTO for registering beneficiary
244+
Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary"
245+
And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration
244246
And I create a new clientCorrelationId
245247
And I have private key
246248
And I generate signature
247249
When I call the batch transactions endpoint with expected status of 202
248250
And I am able to parse batch transactions response
249251
And I fetch batch ID from batch transaction API's response
250252
# Then I will sleep for 10000 millisecond
251-
And I call the payment batch detail API with expected status of 200 with total 3 txns
253+
And I call the payment batch detail API with expected status of 200 with total 6 txns
252254
Then I am able to parse payment batch detail response
253-
And I should assert total txn count and successful txn count in payment batch detail response for batch account lookup
255+
And I should assert total txn count and successful txn count with 6 txns in payment batch detail response for batch account lookup
254256

255257
@gov
256258
Scenario: RB-011 Attempt to Register a 5 Beneficiary - 4 with a valid RegistrationInstitution and 1 with a invalid RegistrationInstitution not available in PayBB

0 commit comments

Comments
 (0)