From 9a2a49316d5afc655358d9f4ff5d2453aa5d537d Mon Sep 17 00:00:00 2001 From: Prajwol Amatya Date: Tue, 27 Aug 2024 14:49:59 +0545 Subject: [PATCH] added test to open file with non-existing file id --- .../features/apiCollaboration/wopi.feature | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/acceptance/features/apiCollaboration/wopi.feature b/tests/acceptance/features/apiCollaboration/wopi.feature index 4e2a9106c9d..54d8707c1a2 100644 --- a/tests/acceptance/features/apiCollaboration/wopi.feature +++ b/tests/acceptance/features/apiCollaboration/wopi.feature @@ -252,6 +252,36 @@ Feature: collaboration (wopi) | /app/open?file_id=<>&app_name=FakeOffice | | /app/open?file_id=<> | + + Scenario Outline: open file with non-existing file id + Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt" + And we save it into "FILEID" + And user "Alice" has deleted file "/simple.odt" + When user "Alice" sends HTTP method "POST" to URL "" + Then the HTTP status code should be "404" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "RESOURCE_NOT_FOUND" + }, + "message": { + "const": "file does not exist" + } + } + } + """ + Examples: + | app-endpoint | + | /app/open?file_id=<>&app_name=FakeOffice | + | /app/open?file_id=<> | + @issue-9495 Scenario Outline: open file with .odt extension (open-with-web) Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"