diff --git a/tests/acceptance/features/apiNotification/emailNotification.feature b/tests/acceptance/features/apiNotification/emailNotification.feature index 09b610a86a5..a75f81eab6d 100644 --- a/tests/acceptance/features/apiNotification/emailNotification.feature +++ b/tests/acceptance/features/apiNotification/emailNotification.feature @@ -140,7 +140,7 @@ Feature: Email notification And user "Brian" has switched the system language to "es" And user "Carol" has switched the system language to "de" And user "Alice" has created a space "new-space" with the default quota using the GraphApi - When user "Alice" has shared a space "new-space" with settings: + When user "Alice" shares a space "new-space" with settings: | shareWith | group1 | | role | viewer | Then the HTTP status code should be "200" diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index c6d9e62375e..60ea35c13a1 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -900,7 +900,6 @@ public function theJsonDataFromLastResponseShouldMatch( null, $userName, ); - $this->featureContext->assertJsonDocumentMatchesSchema( $responseBody, $this->featureContext->getJSONSchema($schemaString) @@ -930,7 +929,7 @@ public function checkPermissionsInResponse( "Expected response status code should be 200", $response ); - Assert::assertIsArray($spaceAsArray = $this->getSpaceByNameFromResponse($spaceName), "No space with name $spaceName found"); + Assert::assertIsArray($spaceAsArray = $this->getSpaceByNameFromResponse($spaceName, $response), "No space with name $spaceName found"); $permissions = $spaceAsArray["root"]["permissions"]; $userId = $this->featureContext->getUserIdByUserName($grantedUser); @@ -981,9 +980,9 @@ public function userShouldNotHaveSpace( $response ); if (\trim($shouldOrNot) === "not") { - $this->jsonRespondedShouldNotContain($spaceName); + Assert::assertEmpty($this->getSpaceByNameFromResponse($spaceName, $response), "space $spaceName should not be available for a user"); } else { - Assert::assertNotEmpty($this->getSpaceByNameFromResponse($spaceName), "space '$spaceName' should be available for a user '$user' but not found"); + Assert::assertNotEmpty($this->getSpaceByNameFromResponse($spaceName, $response), "space '$spaceName' should be available for a user '$user' but not found"); } }