2022-05-11 09:13:59 +02:00
Feature: Preview file in project space
2023-04-17 17:05:12 +05:45
As a user
I want to be able to download different files for the preview
So that I can preview the thumbnail of the file
2022-05-11 09:13:59 +02:00
Background:
2024-11-29 09:39:21 +05:45
Given these users have been created with default attributes:
2022-05-11 09:13:59 +02:00
| username |
| Alice |
2023-06-15 15:56:48 +02:00
And the administrator has assigned the role " Space Admin " to user " Alice " using the Graph API
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " previews of the files " with the default quota using the Graph API
2022-09-14 13:38:15 +05:45
And using spaces DAV path
2022-05-11 09:13:59 +02:00
2023-04-17 17:05:12 +05:45
Scenario Outline: user can preview created txt files in the project space
2024-03-21 09:14:50 +05:45
Given user " Alice " has uploaded a file inside space " previews of the files " with content " test " to " <file-name> "
When user " Alice " downloads the preview of " <file-name> " of the space " previews of the files " with width " <width> " and height " <height> " using the WebDAV API
2022-05-11 09:13:59 +02:00
Then the HTTP status code should be " 200 "
Examples:
2024-03-21 09:14:50 +05:45
| file-name | width | height |
2022-05-11 09:13:59 +02:00
| /file.txt | 36 | 36 |
| /name with spaces.txt | 1200 | 1200 |
2023-04-17 17:05:12 +05:45
Scenario Outline: user can preview image files in the project space
2022-08-23 17:05:12 +05:45
Given using spaces DAV path
And user " Alice " has uploaded a file from " <source> " to " <destination> " via TUS inside of the space " previews of the files " using the WebDAV API
When user " Alice " downloads the preview of " <destination> " of the space " previews of the files " with width " <width> " and height " <height> " using the WebDAV API
2022-05-11 09:13:59 +02:00
Then the HTTP status code should be " 200 "
Examples:
2022-08-23 17:05:12 +05:45
| source | destination | width | height |
| filesForUpload/testavatar.png | testavatar.png | 36 | 36 |
| filesForUpload/testavatar.png | testavatar.png | 1200 | 1200 |
| filesForUpload/testavatar.png | testavatar.png | 1920 | 1920 |
| filesForUpload/testavatar.jpg | testavatar.jpg | 36 | 36 |
| filesForUpload/testavatar.jpg | testavatar.jpg | 1200 | 1200 |
| filesForUpload/testavatar.jpg | testavatar.jpg | 1920 | 1920 |
| filesForUpload/example.gif | example.gif | 36 | 36 |
| filesForUpload/example.gif | example.gif | 1200 | 1200 |
| filesForUpload/example.gif | example.gif | 1280 | 1280 |
2023-10-26 12:59:34 +05:45
Scenario Outline: download preview of shared file inside project space
2024-11-29 09:39:21 +05:45
Given user " Brian " has been created with default attributes
2023-10-26 12:59:34 +05:45
And user " Alice " has uploaded a file from " <source> " to " <destination> " via TUS inside of the space " previews of the files " using the WebDAV API
2024-05-09 14:07:56 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | <destination> |
| space | previews of the files |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
2024-07-25 18:09:28 +05:45
And user " Brian " has a share " <destination> " synced
2023-10-26 12:59:34 +05:45
When user " Brian " downloads the preview of shared resource " /Shares/ <destination> " with width " 32 " and height " 32 " using the WebDAV API
Then the HTTP status code should be " 200 "
And the downloaded image should be " 32 " pixels wide and " 32 " pixels high
Examples:
| source | destination |
| filesForUpload/testavatar.png | testavatar.png |
2024-06-19 14:36:35 +05:45
| filesForUpload/lorem.txt | lorem.txt |
2024-10-18 16:50:47 +05:45
@env-config
2024-06-19 14:36:35 +05:45
Scenario Outline: download preview of shared file shared via Secure viewer permission role
2024-11-29 09:39:21 +05:45
Given user " Brian " has been created with default attributes
2024-10-18 16:50:47 +05:45
And the administrator has enabled the permissions role " Secure Viewer "
2024-06-19 14:36:35 +05:45
And user " Alice " has uploaded a file from " <source> " to " <destination> " via TUS inside of the space " Alice Hansen " using the WebDAV API
And user " Alice " has sent the following resource share invitation:
| resource | <destination> |
| space | Personal |
| sharee | Brian |
| shareType | user |
2024-10-18 16:50:47 +05:45
| permissionsRole | Secure Viewer |
2024-07-25 18:09:28 +05:45
And user " Brian " has a share " <destination> " synced
2024-06-19 14:36:35 +05:45
When user " Brian " downloads the preview of shared resource " /Shares/ <destination> " with width " 32 " and height " 32 " using the WebDAV API
Then the HTTP status code should be " 403 "
Examples:
| source | destination |
| filesForUpload/testavatar.png | testavatar.png |
2023-10-26 12:59:34 +05:45
| filesForUpload/lorem.txt | lorem.txt |
Scenario: download preview of file inside shared folder in project space
2024-11-29 09:39:21 +05:45
Given user " Brian " has been created with default attributes
2023-10-26 12:59:34 +05:45
And user " Alice " has created a folder " folder " in space " previews of the files "
And user " Alice " has uploaded a file inside space " previews of the files " with content " test " to " /folder/lorem.txt "
2024-05-09 14:07:56 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | /folder |
| space | previews of the files |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
2024-07-25 18:09:28 +05:45
And user " Brian " has a share " folder " synced
2023-10-26 12:59:34 +05:45
When user " Brian " downloads the preview of shared resource " Shares/folder/lorem.txt " with width " 32 " and height " 32 " using the WebDAV API
Then the HTTP status code should be " 200 "
And the downloaded image should be " 32 " pixels wide and " 32 " pixels high