@@ -97,26 +97,43 @@ Feature: collaboration (wopi)
9797 }
9898 """
9999
100- @issue-9928
100+
101101 Scenario : user tries to open text file without app name in url query (MIME type not registered in app-registry)
102102 Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "lorem.txt"
103103 And we save it into "FILEID"
104104 When user "Alice" tries to send HTTP method "POST" to URL "/app/open?file_id=<<FILEID>>"
105- Then the HTTP status code should be "500 "
105+ Then the HTTP status code should be "200 "
106106 And the JSON data of the response should match
107107 """
108108 {
109109 "type": "object",
110110 "required": [
111- "code",
112- "message"
111+ "app_url",
112+ "method",
113+ "form_parameters"
113114 ],
114115 "properties": {
115- "code": {
116- "const": "SERVER_ERROR"
116+ "app_url": {
117+ "type": "string",
118+ "pattern": "^.*\\?WOPISrc=.*wopi%2Ffiles%2F[a-fA-F0-9]{64}$"
117119 },
118- "message": {
119- "const": "Error contacting the requested application, please use a different one or try again later"
120+ "method": {
121+ "const": "POST"
122+ },
123+ "form_parameters": {
124+ "type": "object",
125+ "required": [
126+ "access_token",
127+ "access_token_ttl"
128+ ],
129+ "properties": {
130+ "access_token": {
131+ "type": "string"
132+ },
133+ "access_token_ttl": {
134+ "type": "string"
135+ }
136+ }
120137 }
121138 }
122139 }
@@ -229,7 +246,7 @@ Feature: collaboration (wopi)
229246 Scenario Outline : user tries to open unsupported file format
230247 Given user "Alice" has uploaded file "filesForUpload/simple.pdf" to "simple.pdf"
231248 And we save it into "FILEID"
232- When user "Alice" tries to send HTTP method "POST" to URL "< app-endpoint> "
249+ When user "Alice" tries to send HTTP method "POST" to URL "/ app/open?file_id=<<FILEID>>&app_name=FakeOffice "
233250 Then the HTTP status code should be "500"
234251 And the JSON data of the response should match
235252 """
@@ -249,10 +266,6 @@ Feature: collaboration (wopi)
249266 }
250267 }
251268 """
252- Examples :
253- | app -endpoint |
254- | /app /open ?file_id =<<FILEID >>&app_name =FakeOffice |
255- | /app /open ?file_id =<<FILEID >> |
256269
257270
258271 Scenario Outline : user tries to open deleted file
@@ -355,7 +368,7 @@ Feature: collaboration (wopi)
355368 Examples :
356369 | app -endpoint | url -query |
357370 | /app /open -with -web ?file_id =<<FILEID >>&app_name =FakeOffice | app =FakeOffice & |
358- | /app /open -with -web ?file_id =<<FILEID >> | |
371+ | /app /open -with -web ?file_id =<<FILEID >> | app = FakeOffice & |
359372
360373
361374 Scenario : open text file using open-with-web with app name in url query (MIME type not registered in app-registry)
@@ -379,26 +392,23 @@ Feature: collaboration (wopi)
379392 }
380393 """
381394
382- @issue-9928
395+
383396 Scenario : user tries to open text file using open-with-web without app name in url query (MIME type not registered in app-registry)
384397 Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "lorem.txt"
385398 And we save it into "FILEID"
386399 When user "Alice" tries to send HTTP method "POST" to URL "/app/open-with-web?file_id=<<FILEID>>"
387- Then the HTTP status code should be "500 "
400+ Then the HTTP status code should be "200 "
388401 And the JSON data of the response should match
389402 """
390403 {
391404 "type": "object",
392405 "required": [
393- "code",
394- "message"
406+ "uri"
395407 ],
396408 "properties": {
397- "code": {
398- "const": "SERVER_ERROR"
399- },
400- "message": {
401- "const": "Error contacting the requested application, please use a different one or try again later"
409+ "uri": {
410+ "type": "string",
411+ "pattern": "%base_url%/external\\?app=FakeOffice&contextRouteName=files-spaces-personal&fileId=%uuidv4_pattern%%24%uuidv4_pattern%%21%uuidv4_pattern%$"
402412 }
403413 }
404414 }
@@ -433,7 +443,7 @@ Feature: collaboration (wopi)
433443 Examples :
434444 | app -endpoint | url -query |
435445 | /app /open -with -web ?file_id =<<FILEID >>&app_name =FakeOffice | app =FakeOffice & |
436- | /app /open -with -web ?file_id =<<FILEID >> | |
446+ | /app /open -with -web ?file_id =<<FILEID >> | app = FakeOffice & |
437447
438448
439449 Scenario Outline : sharee open file with .odt extension (open-with-web)
@@ -465,7 +475,7 @@ Feature: collaboration (wopi)
465475 Examples :
466476 | app -endpoint | url -query |
467477 | /app /open -with -web ?file_id =<<FILEID >>&app_name =FakeOffice | app =FakeOffice & |
468- | /app /open -with -web ?file_id =<<FILEID >> | |
478+ | /app /open -with -web ?file_id =<<FILEID >> | app = FakeOffice & |
469479
470480
471481 Scenario Outline : open file with .odt extension with different view mode (open-with-web)
@@ -498,7 +508,7 @@ Feature: collaboration (wopi)
498508 Scenario Outline : user tries to open unsupported file format (open-with-web)
499509 Given user "Alice" has uploaded file "filesForUpload/simple.pdf" to "simple.pdf"
500510 And we save it into "FILEID"
501- When user "Alice" tries to send HTTP method "POST" to URL "< app-endpoint> "
511+ When user "Alice" tries to send HTTP method "POST" to URL "/ app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice "
502512 Then the HTTP status code should be "500"
503513 And the JSON data of the response should match
504514 """
@@ -518,10 +528,6 @@ Feature: collaboration (wopi)
518528 }
519529 }
520530 """
521- Examples :
522- | app -endpoint |
523- | /app /open -with -web ?file_id =<<FILEID >>&app_name =FakeOffice |
524- | /app /open -with -web ?file_id =<<FILEID >> |
525531
526532
527533 Scenario Outline : user tries to open deleted file (open-with-web)
0 commit comments