Signed-off-by: Kavita Gautam <kavita@jankaritech.com> test: public link multifile download Signed-off-by: Kavita Gautam <kavita@jankaritech.com> Apply suggestions from code review Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
73 lines
3.7 KiB
Gherkin
73 lines
3.7 KiB
Gherkin
Feature: Public can download folders from project space public link
|
|
As a public
|
|
I want to be able to download folder from public link
|
|
So that I can gain access to it's contents
|
|
|
|
Background:
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Alice |
|
|
| Brian |
|
|
And using spaces DAV path
|
|
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
|
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
|
|
|
@env-config
|
|
Scenario: download a folder from public link of a space
|
|
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
|
|
And using SharingNG
|
|
And user "Alice" has created a folder "NewFolder" in space "new-space"
|
|
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "NewFolder/test.txt"
|
|
And user "Alice" has created the following space link share:
|
|
| space | new-space |
|
|
| displayName | someName |
|
|
| permissionsRole | View |
|
|
When public downloads the folder "NewFolder" from the last created public link using the public files API
|
|
Then the HTTP status code should be "200"
|
|
And the downloaded zip archive should contain these files:
|
|
| name | content |
|
|
| NewFolder/test.txt | some content |
|
|
|
|
@env-config @issue-5229
|
|
Scenario: download a folder from public link of a folder inside a space
|
|
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
|
|
And using SharingNG
|
|
And user "Alice" has created a folder "NewFolder" in space "new-space"
|
|
And user "Alice" has created a folder "NewFolder/folder" in space "new-space"
|
|
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "NewFolder/folder/test.txt"
|
|
And user "Alice" has created the following resource link share:
|
|
| resource | NewFolder |
|
|
| space | new-space |
|
|
| displayName | public link |
|
|
| permissionsRole | View |
|
|
When public downloads the folder "folder" from the last created public link using the public files API
|
|
Then the HTTP status code should be "200"
|
|
And the downloaded zip archive should contain these files:
|
|
| name | content |
|
|
| folder/test.txt | some content |
|
|
|
|
@env-config
|
|
Scenario Outline: download an archive of a password protected public link share (project space)
|
|
And using SharingNG
|
|
And user "Alice" has created a folder "project-folder" in space "new-space"
|
|
And user "Alice" has uploaded a file inside space "new-space" with content "some content1" to "project-folder/test1.txt"
|
|
And user "Alice" has uploaded a file inside space "new-space" with content "some content2" to "project-folder/test2.txt"
|
|
And user "Alice" has uploaded a file inside space "new-space" with content "some content3" to "project-folder/test3.txt"
|
|
And user "Alice" has created the following resource link share:
|
|
| resource | project-folder |
|
|
| space | new-space |
|
|
| permissionsRole | <permissionsRole> |
|
|
| password | %public% |
|
|
When the public downloads the archive of the last created public link with password "%public%"
|
|
Then the HTTP status code should be "200"
|
|
And the downloaded "zip" archive should contain these files:
|
|
| name | content |
|
|
| test1.txt | some content1 |
|
|
| test2.txt | some content2 |
|
|
| test3.txt | some content3 |
|
|
|
|
Examples:
|
|
| permissionsRole |
|
|
| Edit |
|
|
| View |
|
|
| Upload | |