Skip to content

Commit

Permalink
chore(testing):[#226] fix cucumber batch id step
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed Jul 29, 2024
1 parent d25049c commit e0b8f72
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,22 @@ public void iCheckIfTheOrderContainsBatches(int batchesSize) {

@Then("I check, if the batch contains {int} jobs")
public void iCheckIfTheBatchContainsJobs(int jobSize) {
batchResponse = givenAuthentication(authenticationPropertiesBuilder).contentType(ContentType.JSON)
.get("/irs/orders/" + orderId + "/batches/"
+ batchId)
.as(BatchResponse.class);
await().atMost(10, TimeUnit.SECONDS)
.with()
.pollInterval(Duration.ofSeconds(1L))
.until(() -> getBatchResponse().getJobs().size() == jobSize);
batchResponse = getBatchResponse();

assertThat(batchResponse.getJobsInBatchChecksum()).isEqualTo(jobSize);
}

private BatchResponse getBatchResponse() {
return givenAuthentication(authenticationPropertiesBuilder).contentType(ContentType.JSON)
.get("/irs/orders/" + orderId + "/batches/"
+ batchId)
.as(BatchResponse.class);
}

@Then("I check, if job parameter are set with aspects:")
public void iCheckIfJobParameterAreSetWithAspects(List<String> aspects) {
completedJob = givenAuthentication(authenticationPropertiesBuilder).contentType(ContentType.JSON)
Expand Down

0 comments on commit e0b8f72

Please sign in to comment.