diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java index 1a77753f..4c0f5732 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/HsOfficeScenarioTests.java @@ -80,7 +80,7 @@ class HsOfficeScenarioTests extends ScenarioTest { @Produces("Operations-Contact: Dennis Krause for Test AG") void shouldAddOperationsContactToPartner() { new AddOperationsContactToPartner(this) - .given("partnerPersonUuid", "%{Person: Test AG}") + .given("partnerPersonTradeName", "Test AG") .given("operationsContactFamilyName", "Krause") .given("operationsContactGivenName", "Dennis") .given("operationsContactPhoneNumber", "+49 9932 587741") diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddOperationsContactToPartner.java b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddOperationsContactToPartner.java index b5267196..2c06d308 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddOperationsContactToPartner.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/scenarios/partner/AddOperationsContactToPartner.java @@ -7,6 +7,7 @@ import org.springframework.http.HttpStatus; import static io.restassured.http.ContentType.JSON; import static org.springframework.http.HttpStatus.CREATED; +import static org.springframework.http.HttpStatus.OK; public class AddOperationsContactToPartner extends UseCase { @@ -16,6 +17,13 @@ public class AddOperationsContactToPartner extends UseCase + httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}")) + .expecting(OK).expecting(JSON), + response -> response.expectArrayElements(1).getFromBody("[0].uuid") + ); + keep("Person: %{operationsContactGivenName} %{operationsContactFamilyName}", () -> httpPost("/api/hs/office/persons", usingJsonBody(""" @@ -49,7 +57,7 @@ public class AddOperationsContactToPartner extends UseCase