Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptance test steps for public link share #32734

Merged
merged 1 commit into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/acceptance/features/apiMain/external-storage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ Feature: external-storage
And user "user0" has created a folder "/local_storage/foo"
And user "user0" has moved file "/textfile0.txt" to "/local_storage/foo/textfile0.txt"
And user "user0" has shared folder "/local_storage/foo" with user "user1"
When user "user1" creates a share using the sharing API with settings
When user "user1" creates a public link share using the sharing API with settings
| path | foo |
| shareType | 3 |
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the share fields of the last share should include
Expand Down
9 changes: 3 additions & 6 deletions tests/acceptance/features/apiMain/transfer-ownership.feature
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ Feature: transfer-ownership
And user "user0" has created a folder "/test"
And user "user0" has uploaded file "data/textfile.txt" to "/test/somefile.txt"
And user "user0" has shared folder "/test" with user "user2" with permissions 31
And user "user1" has created a share with settings
And user "user1" has created a public link share with settings
| path | /test/somefile.txt |
| shareType | 3 |
When the administrator transfers ownership of path "test" from "user0" to "user1" using the occ command
And the command should have been successful
Then the downloaded content when downloading file "/test/somefile.txt" for user "user2" with range "bytes=0-6" should be "This is"
Expand Down Expand Up @@ -253,13 +252,11 @@ Feature: transfer-ownership
And user "user0" has created a folder "/test"
And user "user0" has created a folder "/test/foo"
And user "user0" has uploaded file "data/textfile.txt" to "/test/somefile.txt"
And user "user0" creates a share using the sharing API with settings
And user "user0" creates a public link share using the sharing API with settings
| path | /test/somefile.txt |
| shareType | 3 |
And user "user0" has shared file "/test" with user "user1" with permissions 31
And user "user1" creates a share using the sharing API with settings
And user "user1" creates a public link share using the sharing API with settings
| path | /test |
| shareType | 3 |
When the administrator transfers ownership from "user0" to "user1" using the occ command
Then the command should have been successful
And as "user0" the folder "/test" should not exist
Expand Down
40 changes: 15 additions & 25 deletions tests/acceptance/features/apiShareManagement/createShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ Feature: sharing
|1 |100 |
|2 |200 |

Scenario Outline: Creating a new public share of a file
Scenario Outline: Creating a new public link share of a file
Given using OCS API version "<ocs_api_version>"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | welcome.txt |
| shareType | 3 |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the last public shared file should be able to be downloaded without a password
Expand All @@ -80,11 +79,10 @@ Feature: sharing
|2 |200 |

@smokeTest
Scenario Outline: Creating a new public share of a file with password
Scenario Outline: Creating a new public link share of a file with password
Given using OCS API version "<ocs_api_version>"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | welcome.txt |
| shareType | 3 |
| password | publicpw |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
Expand All @@ -94,11 +92,10 @@ Feature: sharing
|1 |100 |
|2 |200 |

Scenario Outline: Trying to create a new public share of a file with edit permissions results in a read-only share
Scenario Outline: Trying to create a new public link share of a file with edit permissions results in a read-only share
Given using OCS API version "<ocs_api_version>"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | welcome.txt |
| shareType | 3 |
| permissions | 31 |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
Expand All @@ -115,11 +112,10 @@ Feature: sharing
|1 |100 |
|2 |200 |

Scenario Outline: Creating a new public share of a folder
Scenario Outline: Creating a new public link share of a folder
Given using OCS API version "<ocs_api_version>"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
| shareType | 3 |
| password | publicpw |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
Expand Down Expand Up @@ -158,9 +154,8 @@ Feature: sharing
Scenario Outline: Creating a link share with no specified permissions defaults to read permissions
Given using OCS API version "<ocs_api_version>"
And user "user0" has created a folder "/afolder"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | /afolder |
| shareType | 3 |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the share fields of the last share should include
Expand All @@ -176,9 +171,8 @@ Feature: sharing
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_allow_public_upload" of app "core" has been set to "no"
And user "user0" has created a folder "/afolder"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | /afolder |
| shareType | 3 |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the share fields of the last share should include
Expand All @@ -193,9 +187,8 @@ Feature: sharing
Scenario Outline: Creating a link share with edit permissions keeps it
Given using OCS API version "<ocs_api_version>"
And user "user0" has created a folder "/afolder"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | /afolder |
| shareType | 3 |
| permissions | 15 |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
Expand Down Expand Up @@ -260,11 +253,10 @@ Feature: sharing
|1 |100 |
|2 |200 |

Scenario Outline: Do not allow sharing of the root
Scenario Outline: Do not allow public sharing of the root
Given using OCS API version "<ocs_api_version>"
When user "user0" creates a share using the sharing API with settings
When user "user0" creates a public link share using the sharing API with settings
| path | / |
| shareType | 3 |
Then the OCS status code should be "<ocs_status_code>"
Examples:
|ocs_api_version|ocs_status_code|
Expand All @@ -274,13 +266,11 @@ Feature: sharing
Scenario: Only allow 1 link share per file/folder
Given using OCS API version "1"
And as user "user0"
And the user has created a share with settings
And the user has created a public link share with settings
| path | welcome.txt |
| shareType | 3 |
And the last share id has been remembered
When the user creates a share using the sharing API with settings
When the user creates a public link share using the sharing API with settings
| path | welcome.txt |
| shareType | 3 |
Then the share ids should match

@smokeTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ So that ownCloud users cannot share file or folder
|1 |200 |
|2 |404 |

Scenario Outline: user tries to create public share of a file when the sharing api has been disabled
Scenario Outline: user tries to create public link share of a file when the sharing api has been disabled
Given using OCS API version "<ocs_api_version>"
When parameter "shareapi_enabled" of app "core" has been set to "no"
Then user "user0" should not be able to create a public share of file "welcome.txt" using the sharing API
Then user "user0" should not be able to create a public link share of file "welcome.txt" using the sharing API
And the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Examples:
Expand All @@ -70,10 +70,10 @@ So that ownCloud users cannot share file or folder
|2 |404 |

@smokeTest
Scenario Outline: user tries to create public share of a folder when the sharing api has been disabled
Scenario Outline: user tries to create public link share of a folder when the sharing api has been disabled
Given using OCS API version "<ocs_api_version>"
When parameter "shareapi_enabled" of app "core" has been set to "no"
Then user "user0" should not be able to create a public share of folder "/FOLDER" using the sharing API
Then user "user0" should not be able to create a public link share of folder "/FOLDER" using the sharing API
And the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ Feature: multilinksharing
@smokeTest
Scenario Outline: Creating three public shares of a folder
Given using OCS API version "<ocs_api_version>"
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
| permissions | 15 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
| permissions | 15 |
| name | sharedlink2 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
Expand All @@ -48,23 +45,20 @@ Feature: multilinksharing

Scenario Outline: Creating three public shares of a file
Given using OCS API version "<ocs_api_version>"
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink2 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
Expand All @@ -84,17 +78,15 @@ Feature: multilinksharing

Scenario Outline: Check that updating password doesn't remove name of links
Given using OCS API version "<ocs_api_version>"
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
| permissions | 15 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
Expand All @@ -114,16 +106,14 @@ Feature: multilinksharing

Scenario: Deleting a file deletes also its public links
Given using OCS API version "1"
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
Expand All @@ -135,30 +125,27 @@ Feature: multilinksharing
And as user "user0" the public shares of file "/textfile0.txt" should be
| | | |

Scenario Outline: Deleting one public share of a file doesn't affect the rest
Scenario Outline: Deleting one public link share of a file doesn't affect the rest
Given using OCS API version "<ocs_api_version>"
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink2 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink3 |
When user "user0" deletes public share named "sharedlink2" in file "/textfile0.txt" using the sharing API
When user "user0" deletes public link share named "sharedlink2" in file "/textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And as user "user0" the public shares of file "/textfile0.txt" should be
Expand All @@ -171,16 +158,14 @@ Feature: multilinksharing

Scenario: Overwriting a file doesn't remove its public shares
Given using OCS API version "1"
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | textfile0.txt |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| permissions | 1 |
Expand All @@ -192,17 +177,15 @@ Feature: multilinksharing

Scenario: Renaming a folder doesn't remove its public shares
Given using OCS API version "1"
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
| permissions | 15 |
| name | sharedlink1 |
And the user has created a share with settings
And the user has created a public link share with settings
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
| expireDate | +3 days |
| publicUpload | true |
Expand Down
6 changes: 2 additions & 4 deletions tests/acceptance/features/apiShareManagement/reShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ Feature: sharing
Given using OCS API version "<ocs_api_version>"
And user "user0" has created a folder "/test"
And user "user0" has shared folder "/test" with user "user1" with permissions 1
When user "user1" creates a share using the sharing API with settings
When user "user1" creates a public link share using the sharing API with settings
| path | /test |
| shareType | 3 |
| publicUpload | false |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Expand All @@ -99,9 +98,8 @@ Feature: sharing
Given using OCS API version "<ocs_api_version>"
And user "user0" has created a folder "/test"
And user "user0" has shared folder "/test" with user "user1" with permissions 15
When user "user1" creates a share using the sharing API with settings
When user "user1" creates a public link share using the sharing API with settings
| path | /test |
| shareType | 3 |
| publicUpload | false |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Expand Down
Loading