add some comments to test-reports

This commit is contained in:
Michael Hoennig 2024-10-30 07:02:48 +01:00
parent 8721400226
commit e5cc1da71a
4 changed files with 8 additions and 5 deletions

View File

@ -19,7 +19,7 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerPersonTradeName}"))
.expecting(OK).expecting(JSON),
response -> response.expectArrayElements(1).getFromBody("[0].holder.uuid"),
"From that output above, we're taking the UUID of the holder of the first result element.",
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one.",
"**HINT**: With production data, you might get multiple results and have to decide which is the right one."
);

View File

@ -21,7 +21,8 @@ public class AddOperationsContactToPartner extends UseCase<AddOperationsContactT
keep("Person: %{partnerPersonTradeName}", () ->
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
.expecting(OK).expecting(JSON),
response -> response.expectArrayElements(1).getFromBody("[0].uuid")
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
);
keep("Person: %{operationsContactGivenName} %{operationsContactFamilyName}",

View File

@ -21,7 +21,8 @@ public class AddRepresentativeToPartner extends UseCase<AddRepresentativeToPartn
keep("Person: %{partnerPersonTradeName}", () ->
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
.expecting(OK).expecting(JSON),
response -> response.expectArrayElements(1).getFromBody("[0].uuid")
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
);
keep("Person: %{representativeGivenName} %{representativeFamilyName}", () ->

View File

@ -24,7 +24,8 @@ public class CreatePartner extends UseCase<CreatePartner> {
keep("Person: Hostsharing eG", () ->
httpGet("/api/hs/office/persons?name=Hostsharing+eG")
.expecting(OK).expecting(JSON),
response -> response.expectArrayElements(1).getFromBody("[0].uuid")
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
"Even in production data we expect this query to return just a single result." // TODO.impl: add constraint?
);
keep("Person: %{tradeName}", () ->