Skip to content

Commit

Permalink
Acceptance test step to enable/disable tech_preview
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Sep 3, 2019
1 parent 8d08a9a commit fdafab9
Show file tree
Hide file tree
Showing 17 changed files with 164 additions and 49 deletions.
7 changes: 7 additions & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ default:
- '%paths.base%/../features/apiShareManagementBasic'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
Expand All @@ -126,6 +127,7 @@ default:
- '%paths.base%/../features/apiShareOperations'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
Expand All @@ -135,6 +137,7 @@ default:
- '%paths.base%/../features/apiShareReshare'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
Expand All @@ -144,6 +147,7 @@ default:
- '%paths.base%/../features/apiShareUpdate'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
Expand Down Expand Up @@ -183,6 +187,7 @@ default:
- '%paths.base%/../features/apiWebdavLocks'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- PublicWebDavContext:
- WebDavLockingContext:
- WebDavPropertiesContext:
Expand All @@ -192,6 +197,7 @@ default:
- '%paths.base%/../features/apiWebdavLocks2'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- PublicWebDavContext:
- WebDavLockingContext:
- WebDavPropertiesContext:
Expand All @@ -210,6 +216,7 @@ default:
contexts:
- FeatureContext: *common_feature_context_params
- LoggingContext:
- OccContext:
- SearchContext:
- PublicWebDavContext:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a new public link share of a file, the default permissions are read (1)
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has uploaded file with content "user0 file" to "/randomfile.txt"
When user "user0" creates a public link share using the sharing API with settings
| path | randomfile.txt |
Expand Down Expand Up @@ -190,7 +191,8 @@ Feature: sharing

@smokeTest @public_link_share-feature-required
Scenario Outline: Creating a new public link share of a file with password
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has uploaded file with content "user0 file" to "/randomfile.txt"
When user "user0" creates a public link share using the sharing API with settings
| path | randomfile.txt |
Expand Down Expand Up @@ -222,7 +224,8 @@ Feature: sharing

@public_link_share-feature-required
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>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has uploaded file with content "user0 file" to "/randomfile.txt"
When user "user0" creates a public link share using the sharing API with settings
| path | randomfile.txt |
Expand Down Expand Up @@ -252,7 +255,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a new public link share of a folder, the default permissions are read (1) and can be accessed with no password or any password
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
Then the OCS status code should be "<ocs_status_code>"
Expand Down Expand Up @@ -282,7 +286,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a new public link share of a folder, with a password
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
| password | %public% |
Expand Down Expand Up @@ -379,7 +384,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a link share with no specified permissions defaults to read permissions when public upload disabled globally
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And 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 folder "/afolder"
When user "user0" creates a public link share using the sharing API with settings
Expand Down Expand Up @@ -415,7 +421,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a link share with edit permissions keeps it
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has created folder "/afolder"
When user "user0" creates a public link share using the sharing API with settings
| path | /afolder |
Expand All @@ -435,7 +442,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a link share with upload permissions keeps it
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has created folder "/afolder"
When user "user0" creates a public link share using the sharing API with settings
| path | /afolder |
Expand Down Expand Up @@ -862,7 +870,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: user creates a public link share of a file with file name longer than 64 chars
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has uploaded file with content "long file" to "/aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog.txt"
When user "user0" creates a public link share using the sharing API with settings
| path | /aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog.txt |
Expand All @@ -877,7 +886,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: user creates a public link share of a folder with folder name longer than 64 chars
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has created folder "/aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog"
And user "user0" has moved file "welcome.txt" to "aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog/welcome.txt"
When user "user0" creates a public link share using the sharing API with settings
Expand Down Expand Up @@ -1141,7 +1151,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Create a public link with default expiration date set and max expiration date enforced
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And parameter "shareapi_default_expire_date" of app "core" has been set to "yes"
And parameter "shareapi_enforce_expire_date" of app "core" has been set to "yes"
And user "user0" has uploaded file with content "user0 file" to "/randomfile.txt"
Expand Down Expand Up @@ -1323,7 +1334,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Creating a new public link share of a folder, and checking it's content
Given using OCS API version "<ocs_api_version>"
Given the administrator has enabled DAV tech_preview
And using OCS API version "<ocs_api_version>"
And user "user0" has uploaded file with content "ownCloud test text file parent" to "/PARENT/parent.txt"
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ Feature: sharing

@smokeTest @files_trashbin-app-required
Scenario: deleting a file out of a share as recipient creates a backup for the owner
Given using OCS API version "1"
Given the administrator has enabled DAV tech_preview
And using OCS API version "1"
And user "user0" has been created with default attributes and skeleton files
And user "user1" has been created with default attributes and without skeleton files
And user "user0" has created folder "/shared"
Expand All @@ -103,7 +104,8 @@ Feature: sharing

@files_trashbin-app-required
Scenario: deleting a folder out of a share as recipient creates a backup for the owner
Given using OCS API version "1"
Given the administrator has enabled DAV tech_preview
And using OCS API version "1"
And user "user0" has been created with default attributes and skeleton files
And user "user1" has been created with default attributes and without skeleton files
And user "user0" has created folder "/shared"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Feature: sharing

@smokeTest @files_trashbin-app-required
Scenario Outline: moving a file out of a share as recipient creates a backup for the owner
Given using <dav-path-version> DAV path
Given the administrator has enabled DAV tech_preview
And using <dav-path-version> DAV path
And user "user0" has created folder "/shared"
And user "user0" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "user0" has shared file "/shared" with user "user1"
Expand All @@ -38,7 +39,8 @@ Feature: sharing

@files_trashbin-app-required
Scenario Outline: moving a folder out of a share as recipient creates a backup for the owner
Given using <dav-path-version> DAV path
Given the administrator has enabled DAV tech_preview
And using <dav-path-version> DAV path
And user "user0" has created folder "/shared"
And user "user0" has created folder "/shared/sub"
And user "user0" has moved file "/textfile0.txt" to "/shared/sub/shared_file.txt"
Expand All @@ -56,7 +58,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Public can or can-not delete file through publicly shared link depending on having delete permissions
Given user "user0" has moved file "welcome.txt" to "PARENT/welcome.txt"
Given the administrator has enabled DAV tech_preview
And user "user0" has moved file "welcome.txt" to "PARENT/welcome.txt"
And user "user0" has created a public link share with settings
| path | /PARENT |
| permissions | <permissions> |
Expand All @@ -72,7 +75,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Public link share permissions work correctly for renaming and share permissions read,update,create
Given user "user0" has created a public link share with settings
Given the administrator has enabled DAV tech_preview
And user "user0" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
Expand All @@ -86,7 +90,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Public link share permissions work correctly for renaming and share permissions read,update,create,delete
Given user "user0" has created a public link share with settings
Given the administrator has enabled DAV tech_preview
And user "user0" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
Expand All @@ -100,7 +105,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Public link share permissions work correctly for upload with share permissions read,update,create
Given user "user0" has moved file "welcome.txt" to "PARENT/welcome.txt"
Given the administrator has enabled DAV tech_preview
And user "user0" has moved file "welcome.txt" to "PARENT/welcome.txt"
And user "user0" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create |
Expand All @@ -114,7 +120,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario Outline: Public link share permissions work correctly for upload with share permissions read,update,create,delete
Given user "user0" has moved file "welcome.txt" to "PARENT/welcome.txt"
Given the administrator has enabled DAV tech_preview
And user "user0" has moved file "welcome.txt" to "PARENT/welcome.txt"
And user "user0" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Feature: sharing
@smokeTest @public_link_share-feature-required
@issue-36076
Scenario: Downloading from upload-only share is forbidden
Given user "user0" has moved file "/textfile0.txt" to "/FOLDER/test.txt"
Given the administrator has enabled DAV tech_preview
And user "user0" has moved file "/textfile0.txt" to "/FOLDER/test.txt"
When user "user0" creates a public link share using the sharing API with settings
| path | FOLDER |
| permissions | create |
Expand All @@ -18,7 +19,8 @@ Feature: sharing

@public_link_share-feature-required
Scenario: Downloading from share after the share source was deleted
Given user "user0" has created a public link share with settings
Given the administrator has enabled DAV tech_preview
And user "user0" has created a public link share with settings
| path | PARENT |
| permissions | read |
When user "user0" deletes folder "PARENT" using the WebDAV API
Expand Down Expand Up @@ -65,6 +67,7 @@ Feature: sharing

@smokeTest @public_link_share-feature-required
Scenario: Download a file that is in a folder contained in a folder that has been shared with public with default permissions
Given the administrator has enabled DAV tech_preview
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
| password | %public% |
Expand Down Expand Up @@ -93,6 +96,7 @@ Feature: sharing

@public_link_share-feature-required
Scenario: Download a file that is in a folder contained in a folder that has been shared with public with Read/Write permission
Given the administrator has enabled DAV tech_preview
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
| password | %public% |
Expand Down Expand Up @@ -122,6 +126,7 @@ Feature: sharing

@public_link_share-feature-required
Scenario: Download a file that is in a folder contained in a folder that has been shared with public with Read only permission
Given the administrator has enabled DAV tech_preview
When user "user0" creates a public link share using the sharing API with settings
| path | PARENT |
| password | %public% |
Expand Down
Loading

0 comments on commit fdafab9

Please sign in to comment.