From 0568224192df19e798179cae9bcd5f7cb56a0ed1 Mon Sep 17 00:00:00 2001 From: amrita Date: Wed, 18 Sep 2024 14:23:16 +0545 Subject: [PATCH 1/2] add edge case for check file info --- .../bootstrap/CollaborationContext.php | 67 ++ tests/acceptance/config/behat.yml | 1 + .../apiCollaboration/checkFileInfo.feature | 617 ++++++++++++++++++ 3 files changed, 685 insertions(+) diff --git a/tests/acceptance/bootstrap/CollaborationContext.php b/tests/acceptance/bootstrap/CollaborationContext.php index abf6ae73b9..d91e596069 100644 --- a/tests/acceptance/bootstrap/CollaborationContext.php +++ b/tests/acceptance/bootstrap/CollaborationContext.php @@ -22,6 +22,7 @@ use Behat\Behat\Context\Context; use Behat\Behat\Hook\Scope\BeforeScenarioScope; +use Behat\Gherkin\Node\TableNode; use GuzzleHttp\Exception\GuzzleException; use TestHelpers\HttpRequestHelper; use TestHelpers\WebDavHelper; @@ -33,6 +34,7 @@ use TestHelpers\CollaborationHelper; class CollaborationContext implements Context { private FeatureContext $featureContext; private SpacesContext $spacesContext; + private string $storeLastAppEndpointResponse; /** * This will run before EVERY scenario. @@ -52,6 +54,22 @@ class CollaborationContext implements Context { $this->spacesContext = $environment->getContext('SpacesContext'); } + /** + * @param string $appData + * + * @return void + */ + public function storeLastAppEndpointResponse(string $appData): void { + $this->storeLastAppEndpointResponse = $appData; + } + + /** + * @return string + */ + public function getLastAppEndpointResponse(): string { + return $this->storeLastAppEndpointResponse; + } + /** * @When user :user checks the information of file :file of space :space using office :app * @When user :user checks the information of file :file of space :space using office :app with view mode :view @@ -255,4 +273,53 @@ class CollaborationContext implements Context { ) ); } + + /** + * @Given user :user has sent POST request on app endpoint: + * + * @param string $user + * @param TableNode $items + * + * @return void + * @throws GuzzleException + */ + public function userHasSentPostRequestOnAppEndpoint(string $user, TableNode $items): void { + $rows = $items->getRowsHash(); + $appResponse = CollaborationHelper::sendPOSTRequestToAppOpen( + $this->spacesContext->getFileId($user, $rows['space'], $rows['resource']), + $rows['suites'], + $this->featureContext->getActualUsername($user), + $this->featureContext->getPasswordForUser($user), + $this->featureContext->getBaseUrl(), + $this->featureContext->getStepLineRef() + ); + $this->featureContext->theHTTPStatusCodeShouldBe(200, '', $appResponse); + $this->storeLastAppEndpointResponse($appResponse->getBody()->getContents()); + } + + /** + * @When user :user tries to get the file information of file using wopi endpoint + * @When user :user gets the file information of file using wopi endpoint + * + * @param string $user + * + * @return void + * @throws GuzzleException + */ + public function userTriesToCheckTheInformationOfDeletedFileUsingWopiEndpoint(string $user):void { + $response = json_decode($this->getLastAppEndpointResponse()); + $accessToken = $response->form_parameters->access_token; + + // Extract the WOPISrc from the app_url + $parsedUrl = parse_url($response->app_url); + parse_str($parsedUrl['query'], $queryParams); + $wopiSrc = $queryParams['WOPISrc']; + + $this->featureContext->setResponse( + HttpRequestHelper::get( + $wopiSrc . "?access_token=$accessToken", + $this->featureContext->getStepLineRef() + ) + ); + } } diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 80426135cd..77adc1a097 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -412,6 +412,7 @@ default: - FeatureContext: *common_feature_context_params - SharingNgContext: - CollaborationContext: + - TrashbinContext: cliCommands: diff --git a/tests/acceptance/features/apiCollaboration/checkFileInfo.feature b/tests/acceptance/features/apiCollaboration/checkFileInfo.feature index f881aa34e8..8a1d5e684d 100644 --- a/tests/acceptance/features/apiCollaboration/checkFileInfo.feature +++ b/tests/acceptance/features/apiCollaboration/checkFileInfo.feature @@ -599,3 +599,620 @@ Feature: check file info with different wopi apps | Collabora | | FakeOffice | | OnlyOffice | + + + Scenario Outline: try to get file info of deleted file with office suites + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | | + And user "Alice" has deleted file "/textfile0.txt" + When user "Alice" tries to get the file information of file using wopi endpoint + Then the HTTP status code should be "500" + Examples: + | office-suites | + | Collabora | + | FakeOffice | + | OnlyOffice | + + + Scenario: get file info of restored file from trashbin (collabora) + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | Collabora | + And user "Alice" has deleted file "/textfile0.txt" + And user "Alice" has restored the file with original path "/textfile0.txt" + When user "Alice" gets the file information of file using wopi endpoint + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "BaseFileName", + "DisablePrint", + "OwnerId", + "PostMessageOrigin", + "Size", + "UserCanWrite", + "UserCanNotWriteRelative", + "UserId", + "UserFriendlyName", + "EnableOwnerTermination", + "SupportsLocks", + "SupportsRename", + "UserCanRename", + "BreadcrumbDocName" + ], + "properties": { + "BaseFileName": { + "const": "textfile0.txt" + }, + "PostMessageOrigin": { + "const": "https://localhost:9200" + }, + "DisablePrint": { + "const": false + }, + "OwnerId": { + "type": "string" + }, + "Size": { + "const": 11 + }, + "UserCanWrite": { + "const": true + }, + "UserCanNotWriteRelative": { + "const": false + }, + "EnableOwnerTermination": { + "const": true + }, + "UserId": { + "type": "string" + }, + "SupportsLocks": { + "const": true + }, + "SupportsRename": { + "const": true + }, + "UserFriendlyName": { + "const": "Alice Hansen" + }, + "UserCanRename": { + "const": true + }, + "BreadcrumbDocName": { + "const": "textfile0.txt" + } + } + } + """ + + + Scenario: get file info of restored file from trashbin (fakeOffice) + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | FakeOffice | + And user "Alice" has deleted file "/textfile0.txt" + And user "Alice" has restored the file with original path "/textfile0.txt" + When user "Alice" gets the file information of file using wopi endpoint + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "BaseFileName", + "OwnerId", + "Size", + "UserId", + "Version", + "SupportsCobalt", + "SupportsContainers", + "SupportsDeleteFile", + "SupportsEcosystem", + "SupportsExtendedLockLength", + "SupportsFolders", + "SupportsGetLock", + "SupportsLocks", + "SupportsRename", + "SupportsUpdate", + "SupportsUserInfo", + "UserFriendlyName", + "ReadOnly", + "RestrictedWebViewOnly", + "UserCanAttend", + "UserCanNotWriteRelative", + "UserCanPresent", + "UserCanRename", + "UserCanWrite", + "AllowAdditionalMicrosoftServices", + "AllowExternalMarketplace", + "DisablePrint", + "DisableTranslation", + "BreadcrumbDocName" + ], + "properties": { + "BaseFileName": { + "const": "textfile0.txt" + }, + "OwnerId": { + "type": "string" + }, + "Size": { + "const": 11 + }, + "UserId": { + "type": "string" + }, + "Version": { + "type": "string" + }, + "SupportsCobalt": { + "const": false + }, + "SupportsContainers": { + "const": false + }, + "SupportsDeleteFile": { + "const": true + }, + "SupportsEcosystem": { + "const": false + }, + "SupportsExtendedLockLength": { + "const": true + }, + "SupportsFolders": { + "const": false + }, + "SupportsGetLock": { + "const": true + }, + "SupportsLocks": { + "const": true + }, + "SupportsRename": { + "const": true + }, + "SupportsUpdate": { + "const": true + }, + "SupportsUserInfo": { + "const": false + }, + "UserFriendlyName": { + "const": "Alice Hansen" + }, + "ReadOnly": { + "const": false + }, + "RestrictedWebViewOnly": { + "const": false + }, + "UserCanAttend": { + "const": false + }, + "UserCanNotWriteRelative": { + "const": false + }, + "UserCanPresent": { + "const": false + }, + "UserCanRename": { + "const": true + }, + "UserCanWrite": { + "const": true + }, + "AllowAdditionalMicrosoftServices": { + "const": false + }, + "AllowExternalMarketplace": { + "const": false + }, + "DisablePrint": { + "const": false + }, + "DisableTranslation": { + "const": false + }, + "BreadcrumbDocName": { + "const": "textfile0.txt" + } + } + } + """ + + + Scenario: get file info of restored file from trashbin (onlyOffice) + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | OnlyOffice | + And user "Alice" has deleted file "/textfile0.txt" + And user "Alice" has restored the file with original path "/textfile0.txt" + When user "Alice" gets the file information of file using wopi endpoint + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "BaseFileName", + "Version", + "BreadcrumbDocName", + "BreadcrumbFolderName", + "BreadcrumbFolderUrl", + "PostMessageOrigin", + "DisablePrint", + "UserFriendlyName", + "UserId", + "ReadOnly", + "UserCanNotWriteRelative", + "UserCanRename", + "UserCanWrite", + "SupportsLocks", + "SupportsRename", + "SupportsUpdate" + ], + "properties": { + "BaseFileName": { + "const": "textfile0.txt" + }, + "UserId": { + "type": "string" + }, + "Version": { + "type": "string" + }, + "SupportsLocks": { + "const": true + }, + "SupportsRename": { + "const": true + }, + "SupportsUpdate": { + "const": true + }, + "UserFriendlyName": { + "const": "Alice Hansen" + }, + "ReadOnly": { + "const": false + }, + "UserCanNotWriteRelative": { + "const": false + }, + "UserCanRename": { + "const": true + }, + "UserCanWrite": { + "const": true + }, + "DisablePrint": { + "const": false + }, + "BreadcrumbDocName": { + "const": "textfile0.txt" + }, + "BreadcrumbFolderName": { + "const": "Alice Hansen" + }, + "BreadcrumbFolderUrl": { + "type": "string" + }, + "PostMessageOrigin": { + "type": "string" + } + } + } + """ + + + Scenario: get file info after renaming file (onlyOffice) + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | OnlyOffice | + And user "Alice" has moved file "textfile0.txt" to "renamedfile.txt" + When user "Alice" gets the file information of file using wopi endpoint + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "BaseFileName", + "Version", + "BreadcrumbDocName", + "BreadcrumbFolderName", + "BreadcrumbFolderUrl", + "PostMessageOrigin", + "DisablePrint", + "UserFriendlyName", + "UserId", + "ReadOnly", + "UserCanNotWriteRelative", + "UserCanRename", + "UserCanWrite", + "SupportsLocks", + "SupportsRename", + "SupportsUpdate" + ], + "properties": { + "BaseFileName": { + "const": "renamedfile.txt" + }, + "UserId": { + "type": "string" + }, + "Version": { + "type": "string" + }, + "SupportsLocks": { + "const": true + }, + "SupportsRename": { + "const": true + }, + "SupportsUpdate": { + "const": true + }, + "UserFriendlyName": { + "const": "Alice Hansen" + }, + "ReadOnly": { + "const": false + }, + "UserCanNotWriteRelative": { + "const": false + }, + "UserCanRename": { + "const": true + }, + "UserCanWrite": { + "const": true + }, + "DisablePrint": { + "const": false + }, + "BreadcrumbDocName": { + "const": "renamedfile.txt" + }, + "BreadcrumbFolderName": { + "const": "Alice Hansen" + }, + "BreadcrumbFolderUrl": { + "type": "string" + }, + "PostMessageOrigin": { + "type": "string" + } + } + } + """ + + + Scenario: get file info after renaming file (collabora) + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | Collabora | + And user "Alice" has moved file "textfile0.txt" to "renamedfile.txt" + When user "Alice" gets the file information of file using wopi endpoint + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "BaseFileName", + "DisablePrint", + "OwnerId", + "PostMessageOrigin", + "Size", + "UserCanWrite", + "UserCanNotWriteRelative", + "UserId", + "UserFriendlyName", + "EnableOwnerTermination", + "SupportsLocks", + "SupportsRename", + "UserCanRename", + "BreadcrumbDocName" + ], + "properties": { + "BaseFileName": { + "const": "renamedfile.txt" + }, + "PostMessageOrigin": { + "const": "https://localhost:9200" + }, + "DisablePrint": { + "const": false + }, + "OwnerId": { + "type": "string" + }, + "Size": { + "const": 11 + }, + "UserCanWrite": { + "const": true + }, + "UserCanNotWriteRelative": { + "const": false + }, + "EnableOwnerTermination": { + "const": true + }, + "UserId": { + "type": "string" + }, + "SupportsLocks": { + "const": true + }, + "SupportsRename": { + "const": true + }, + "UserFriendlyName": { + "const": "Alice Hansen" + }, + "UserCanRename": { + "const": true + }, + "BreadcrumbDocName": { + "const": "renamedfile.txt" + } + } + } + """ + + + Scenario: get file info after renaming file with (fakeOffice) + Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" + And user "Alice" has sent POST request on app endpoint: + | resource | textfile0.txt | + | space | Personal | + | suites | FakeOffice | + And user "Alice" has moved file "textfile0.txt" to "renamedfile.txt" + When user "Alice" gets the file information of file using wopi endpoint + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "BaseFileName", + "OwnerId", + "Size", + "UserId", + "Version", + "SupportsCobalt", + "SupportsContainers", + "SupportsDeleteFile", + "SupportsEcosystem", + "SupportsExtendedLockLength", + "SupportsFolders", + "SupportsGetLock", + "SupportsLocks", + "SupportsRename", + "SupportsUpdate", + "SupportsUserInfo", + "UserFriendlyName", + "ReadOnly", + "RestrictedWebViewOnly", + "UserCanAttend", + "UserCanNotWriteRelative", + "UserCanPresent", + "UserCanRename", + "UserCanWrite", + "AllowAdditionalMicrosoftServices", + "AllowExternalMarketplace", + "DisablePrint", + "DisableTranslation", + "BreadcrumbDocName" + ], + "properties": { + "BaseFileName": { + "const": "renamedfile.txt" + }, + "OwnerId": { + "type": "string" + }, + "Size": { + "const": 11 + }, + "UserId": { + "type": "string" + }, + "Version": { + "type": "string" + }, + "SupportsCobalt": { + "const": false + }, + "SupportsContainers": { + "const": false + }, + "SupportsDeleteFile": { + "const": true + }, + "SupportsEcosystem": { + "const": false + }, + "SupportsExtendedLockLength": { + "const": true + }, + "SupportsFolders": { + "const": false + }, + "SupportsGetLock": { + "const": true + }, + "SupportsLocks": { + "const": true + }, + "SupportsRename": { + "const": true + }, + "SupportsUpdate": { + "const": true + }, + "SupportsUserInfo": { + "const": false + }, + "UserFriendlyName": { + "const": "Alice Hansen" + }, + "ReadOnly": { + "const": false + }, + "RestrictedWebViewOnly": { + "const": false + }, + "UserCanAttend": { + "const": false + }, + "UserCanNotWriteRelative": { + "const": false + }, + "UserCanPresent": { + "const": false + }, + "UserCanRename": { + "const": true + }, + "UserCanWrite": { + "const": true + }, + "AllowAdditionalMicrosoftServices": { + "const": false + }, + "AllowExternalMarketplace": { + "const": false + }, + "DisablePrint": { + "const": false + }, + "DisableTranslation": { + "const": false + }, + "BreadcrumbDocName": { + "const": "renamedfile.txt" + } + } + } + """ From 16db9dd5cf9278a837da1254dacffd26f6aad460 Mon Sep 17 00:00:00 2001 From: amrita Date: Mon, 23 Sep 2024 11:19:06 +0545 Subject: [PATCH 2/2] address review --- .../bootstrap/CollaborationContext.php | 32 ++++++------ .../apiCollaboration/checkFileInfo.feature | 50 +++++++++---------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/tests/acceptance/bootstrap/CollaborationContext.php b/tests/acceptance/bootstrap/CollaborationContext.php index d91e596069..4dbf203750 100644 --- a/tests/acceptance/bootstrap/CollaborationContext.php +++ b/tests/acceptance/bootstrap/CollaborationContext.php @@ -34,7 +34,7 @@ use TestHelpers\CollaborationHelper; class CollaborationContext implements Context { private FeatureContext $featureContext; private SpacesContext $spacesContext; - private string $storeLastAppEndpointResponse; + private string $lastAppOpenData; /** * This will run before EVERY scenario. @@ -55,19 +55,19 @@ class CollaborationContext implements Context { } /** - * @param string $appData + * @param string $data * * @return void */ - public function storeLastAppEndpointResponse(string $appData): void { - $this->storeLastAppEndpointResponse = $appData; + public function setLastAppOpenData(string $data): void { + $this->lastAppOpenData = $data; } /** * @return string */ - public function getLastAppEndpointResponse(): string { - return $this->storeLastAppEndpointResponse; + public function getLastAppOpenData(): string { + return $this->lastAppOpenData; } /** @@ -275,39 +275,39 @@ class CollaborationContext implements Context { } /** - * @Given user :user has sent POST request on app endpoint: + * @Given user :user has sent the following app-open request: * * @param string $user - * @param TableNode $items + * @param TableNode $properties * * @return void * @throws GuzzleException */ - public function userHasSentPostRequestOnAppEndpoint(string $user, TableNode $items): void { - $rows = $items->getRowsHash(); + public function userHasSentTheFollowingAppOpenRequest(string $user, TableNode $properties): void { + $rows = $properties->getRowsHash(); $appResponse = CollaborationHelper::sendPOSTRequestToAppOpen( $this->spacesContext->getFileId($user, $rows['space'], $rows['resource']), - $rows['suites'], + $rows['app'], $this->featureContext->getActualUsername($user), $this->featureContext->getPasswordForUser($user), $this->featureContext->getBaseUrl(), $this->featureContext->getStepLineRef() ); $this->featureContext->theHTTPStatusCodeShouldBe(200, '', $appResponse); - $this->storeLastAppEndpointResponse($appResponse->getBody()->getContents()); + $this->setLastAppOpenData($appResponse->getBody()->getContents()); } /** - * @When user :user tries to get the file information of file using wopi endpoint - * @When user :user gets the file information of file using wopi endpoint + * @When user :user tries to get the information of the last opened file using wopi endpoint + * @When user :user gets the information of the last opened file using wopi endpoint * * @param string $user * * @return void * @throws GuzzleException */ - public function userTriesToCheckTheInformationOfDeletedFileUsingWopiEndpoint(string $user):void { - $response = json_decode($this->getLastAppEndpointResponse()); + public function userGetsTheInformationOfTheLastOpenedFileUsingWopiEndpoint(string $user): void { + $response = json_decode($this->getLastAppOpenData()); $accessToken = $response->form_parameters->access_token; // Extract the WOPISrc from the app_url diff --git a/tests/acceptance/features/apiCollaboration/checkFileInfo.feature b/tests/acceptance/features/apiCollaboration/checkFileInfo.feature index 8a1d5e684d..f9767905c8 100644 --- a/tests/acceptance/features/apiCollaboration/checkFileInfo.feature +++ b/tests/acceptance/features/apiCollaboration/checkFileInfo.feature @@ -600,16 +600,16 @@ Feature: check file info with different wopi apps | FakeOffice | | OnlyOffice | - + @issue-10097 Scenario Outline: try to get file info of deleted file with office suites Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: - | resource | textfile0.txt | - | space | Personal | - | suites | | + And user "Alice" has sent the following app-open request: + | resource | textfile0.txt | + | space | Personal | + | app | | And user "Alice" has deleted file "/textfile0.txt" - When user "Alice" tries to get the file information of file using wopi endpoint - Then the HTTP status code should be "500" + When user "Alice" tries to get the information of the last opened file using wopi endpoint + Then the HTTP status code should be "404" Examples: | office-suites | | Collabora | @@ -619,13 +619,13 @@ Feature: check file info with different wopi apps Scenario: get file info of restored file from trashbin (collabora) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: + And user "Alice" has sent the following app-open request: | resource | textfile0.txt | | space | Personal | - | suites | Collabora | + | app | Collabora | And user "Alice" has deleted file "/textfile0.txt" And user "Alice" has restored the file with original path "/textfile0.txt" - When user "Alice" gets the file information of file using wopi endpoint + When user "Alice" gets the information of the last opened file using wopi endpoint Then the HTTP status code should be "200" And the JSON data of the response should match """ @@ -697,13 +697,13 @@ Feature: check file info with different wopi apps Scenario: get file info of restored file from trashbin (fakeOffice) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: + And user "Alice" has sent the following app-open request: | resource | textfile0.txt | | space | Personal | - | suites | FakeOffice | + | app | FakeOffice | And user "Alice" has deleted file "/textfile0.txt" And user "Alice" has restored the file with original path "/textfile0.txt" - When user "Alice" gets the file information of file using wopi endpoint + When user "Alice" gets the information of the last opened file using wopi endpoint Then the HTTP status code should be "200" And the JSON data of the response should match """ @@ -835,13 +835,13 @@ Feature: check file info with different wopi apps Scenario: get file info of restored file from trashbin (onlyOffice) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: + And user "Alice" has sent the following app-open request: | resource | textfile0.txt | | space | Personal | - | suites | OnlyOffice | + | app | OnlyOffice | And user "Alice" has deleted file "/textfile0.txt" And user "Alice" has restored the file with original path "/textfile0.txt" - When user "Alice" gets the file information of file using wopi endpoint + When user "Alice" gets the information of the last opened file using wopi endpoint Then the HTTP status code should be "200" And the JSON data of the response should match """ @@ -921,12 +921,12 @@ Feature: check file info with different wopi apps Scenario: get file info after renaming file (onlyOffice) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: + And user "Alice" has sent the following app-open request: | resource | textfile0.txt | | space | Personal | - | suites | OnlyOffice | + | app | OnlyOffice | And user "Alice" has moved file "textfile0.txt" to "renamedfile.txt" - When user "Alice" gets the file information of file using wopi endpoint + When user "Alice" gets the information of the last opened file using wopi endpoint Then the HTTP status code should be "200" And the JSON data of the response should match """ @@ -1006,12 +1006,12 @@ Feature: check file info with different wopi apps Scenario: get file info after renaming file (collabora) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: + And user "Alice" has sent the following app-open request: | resource | textfile0.txt | | space | Personal | - | suites | Collabora | + | app | Collabora | And user "Alice" has moved file "textfile0.txt" to "renamedfile.txt" - When user "Alice" gets the file information of file using wopi endpoint + When user "Alice" gets the information of the last opened file using wopi endpoint Then the HTTP status code should be "200" And the JSON data of the response should match """ @@ -1083,12 +1083,12 @@ Feature: check file info with different wopi apps Scenario: get file info after renaming file with (fakeOffice) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" - And user "Alice" has sent POST request on app endpoint: + And user "Alice" has sent the following app-open request: | resource | textfile0.txt | | space | Personal | - | suites | FakeOffice | + | app | FakeOffice | And user "Alice" has moved file "textfile0.txt" to "renamedfile.txt" - When user "Alice" gets the file information of file using wopi endpoint + When user "Alice" gets the information of the last opened file using wopi endpoint Then the HTTP status code should be "200" And the JSON data of the response should match """