From 671b17cdaf37d1f4df8bf6854b147cc67c4155d2 Mon Sep 17 00:00:00 2001 From: pradip Date: Thu, 5 Sep 2024 14:47:07 +0545 Subject: [PATCH] test: add tests for opening files with unsupported file formats --- .../features/apiCollaboration/wopi.feature | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/acceptance/features/apiCollaboration/wopi.feature b/tests/acceptance/features/apiCollaboration/wopi.feature index 994247dcaf..5977edbec9 100644 --- a/tests/acceptance/features/apiCollaboration/wopi.feature +++ b/tests/acceptance/features/apiCollaboration/wopi.feature @@ -493,3 +493,32 @@ Feature: collaboration (wopi) | /app/open-with-web?file_id=<>&app_name=FakeOffice&view_mode=view | | /app/open-with-web?file_id=<>&app_name=FakeOffice&view_mode=read | | /app/open-with-web?file_id=<>&app_name=FakeOffice&view_mode=write | + + @issue-9928 + Scenario Outline: open unsupported file format (open-with-web) + Given user "Alice" has uploaded file "filesForUpload/simple.pdf" to "simple.pdf" + And we save it into "FILEID" + When user "Alice" sends HTTP method "POST" to URL "" + Then the HTTP status code should be "500" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "const": "SERVER_ERROR" + }, + "message": { + "const": "Error contacting the requested application, please use a different one or try again later" + } + } + } + """ + Examples: + | app-endpoint | + | /app/open-with-web?file_id=<>&app_name=FakeOffice | + | /app/open-with-web?file_id=<> |