diff --git a/docs/ocis/development/testing.md b/docs/ocis/development/testing.md index ee4063d247b..3e966009595 100644 --- a/docs/ocis/development/testing.md +++ b/docs/ocis/development/testing.md @@ -352,7 +352,7 @@ TEST_OCIS=true \ TEST_SERVER_URL="https://localhost:9200" \ EMAIL_HOST="localhost" \ EMAIL_PORT=9000 \ -BEHAT_FEATURE="tests/acceptance/features/apiEmailNotification/emailNotification.feature" \ +BEHAT_FEATURE="tests/acceptance/features/apiNotification/emailNotification.feature" \ make test-acceptance-api ``` diff --git a/tests/acceptance/features/apiNotification/notification.feature b/tests/acceptance/features/apiNotification/notification.feature index f15bd30f8ed..a0a364df324 100644 --- a/tests/acceptance/features/apiNotification/notification.feature +++ b/tests/acceptance/features/apiNotification/notification.feature @@ -1,7 +1,7 @@ @api Feature: Notification As a user - I want to be notified of actions + I want to be notified of various events So that I can stay updated about the information Background: @@ -130,7 +130,7 @@ Feature: Notification Scenario Outline: user gets a notification of unsharing resource Given user "Alice" has shared entry "" with user "Brian" And user "Brian" has accepted share "/" offered by user "Alice" - And user "Alice" has unshared folder "" for "Brian" + And user "Alice" has unshared entity "" shared to "Brian" When user "Brian" lists all notifications Then the HTTP status code should be "200" And the JSON response should contain a notification message with the subject "Resource unshared" and the message-details should match diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index ac8c30af16a..013099414fc 100644 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -3055,7 +3055,7 @@ public function getShares(string $user, string $path):SimpleXMLElement { $user, $this->getPasswordForUser($user), "GET", - $this->getSharesEndpointPath($path), + $this->getSharesEndpointPath("?path=$path"), $this->getStepLineRef(), [], $this->ocsApiVersion @@ -3075,7 +3075,7 @@ public function getShares(string $user, string $path):SimpleXMLElement { */ public function checkPublicShares(string $user, string $path, ?TableNode $TableNode):void { $user = $this->getActualUsername($user); - $response = $this->getShares($user, "?path=$path"); + $response = $this->getShares($user, $path); $this->verifyTableNodeColumns($TableNode, ['path', 'permissions', 'name']); if ($TableNode instanceof TableNode) { @@ -3126,7 +3126,7 @@ public function checkPublicShares(string $user, string $path, ?TableNode $TableN public function checkPublicSharesAreEmpty(string $user, string $entry, string $path):void { $user = $this->getActualUsername($user); $this->asFileOrFolderShouldExist($user, $entry, $path); - $response = $this->getShares($user, "?path=$path"); + $response = $this->getShares($user, $path); //It shouldn't have public shares Assert::assertEquals( 0, @@ -3146,7 +3146,7 @@ public function checkPublicSharesAreEmpty(string $user, string $entry, string $p * @return string|null */ public function getPublicShareIDByName(string $user, string $path, string $name):?string { - $response = $this->getShares($user, "?path=$path"); + $response = $this->getShares($user, $path); foreach ($response as $elementResponded) { if ((string) $elementResponded->name[0] === $name) { return (string) $elementResponded->id[0]; @@ -3480,7 +3480,7 @@ public function assertNoSharesOfUserAreInState(string $user, string $state):void } /** - * @Given /^user "([^"]*)" has unshared folder "([^"]*)" for "([^"]*)"$/ + * @Given /^user "([^"]*)" has unshared (?:folder|file|entity) "([^"]*)" shared to "([^"]*)"$/ * * @param string $sharer * @param string $path @@ -3489,12 +3489,11 @@ public function assertNoSharesOfUserAreInState(string $user, string $state):void * @return void * @throws JsonException */ - public function userHasUnsharedFolderFor(string $sharer, string $path, string $sharee): void { + public function userHasUnsharedResourceSharedTo(string $sharer, string $path, string $sharee): void { $sharer = $this->getActualUsername($sharer); $sharee = $this->getActualUsername($sharee); - $path = "?path=$path&share_types=0"; - $response = $this->getShares($sharer, $path); + $response = $this->getShares($sharer, "$path&share_types=0"); $shareId = null; foreach ($response as $shareElement) { if ((string)$shareElement->share_with[0] === $sharee) {