From 35672b0014db1b5b75d89728014919e578ae2d79 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Tue, 1 Nov 2022 15:13:14 +0545 Subject: [PATCH] Refactored feature files to make consistent inter-scenarios space --- .../features/apiAccountsHashDifficulty/addUser.feature | 1 + .../createShareToSharesFolder.feature | 1 + .../features/apiAccountsHashDifficulty/uploadFile.feature | 1 + .../apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature | 2 ++ tests/acceptance/features/apiGraph/changeOwnPassword.feature | 1 + .../features/apiGraph/createGroupCaseSensitive.feature | 1 + tests/acceptance/features/apiSpaces/search.feature | 1 + tests/acceptance/features/apiSpacesShares/copySpaces.feature | 1 - .../createFileFolderWhenSharesSpaceExist.feature | 4 ++++ .../features/apiSpacesShares/etagPropagation.feature | 2 ++ tests/acceptance/features/apiSpacesShares/moveSpaces.feature | 4 +++- 11 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature b/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature index 72ce768e02..61dcf152f6 100644 --- a/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature @@ -7,6 +7,7 @@ Feature: add user Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 + Scenario Outline: admin creates a user Given using OCS API version "" And user "brand-new-user" has been deleted diff --git a/tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature b/tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature index 671f78029f..36f2fa1f50 100644 --- a/tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature @@ -7,6 +7,7 @@ Feature: sharing Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 + Scenario Outline: Creating a share of a file with a user Given the administrator has set the default folder for received shares to "Shares" And auto-accept shares has been disabled diff --git a/tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature b/tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature index 75479e4d69..534704f1d3 100644 --- a/tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature @@ -7,6 +7,7 @@ Feature: upload file Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 + Scenario Outline: upload a file and check download content Given using OCS API version "" And user "Alice" has been created with default attributes and without skeleton files diff --git a/tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature b/tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature index 19daa8de92..5a54999e20 100644 --- a/tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature @@ -11,6 +11,7 @@ Feature: attempt to PUT files with invalid password Given user "Alice" has been created with default attributes and without skeleton files And user "Alice" has created folder "/PARENT" + Scenario: send PUT requests to webDav endpoints as normal user with wrong password When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "invalid" about user "Alice" | endpoint | @@ -21,6 +22,7 @@ Feature: attempt to PUT files with invalid password | /remote.php/dav/files/%username%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" + Scenario: send PUT requests to webDav endpoints as normal user with no password When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "" about user "Alice" | endpoint | diff --git a/tests/acceptance/features/apiGraph/changeOwnPassword.feature b/tests/acceptance/features/apiGraph/changeOwnPassword.feature index e487455a81..f51639c1c1 100644 --- a/tests/acceptance/features/apiGraph/changeOwnPassword.feature +++ b/tests/acceptance/features/apiGraph/changeOwnPassword.feature @@ -1,6 +1,7 @@ @api Feature: an user changes its own password + Scenario Outline: change own password Given user "Alice" has been created with default attributes and without skeleton files When the user "Alice" changes its own password "" to "" using the Graph API diff --git a/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature b/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature index d29236562b..a4a68e5834 100644 --- a/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature +++ b/tests/acceptance/features/apiGraph/createGroupCaseSensitive.feature @@ -1,6 +1,7 @@ @api Feature: create groups, group names are case insensitive + Scenario Outline: group names are case insensitive, creating groups with different upper and lower case names Given using OCS API version "" And group "" has been created diff --git a/tests/acceptance/features/apiSpaces/search.feature b/tests/acceptance/features/apiSpaces/search.feature index 0d6f14fca7..e09f23f679 100644 --- a/tests/acceptance/features/apiSpaces/search.feature +++ b/tests/acceptance/features/apiSpaces/search.feature @@ -17,6 +17,7 @@ Feature: Search And user "Alice" has uploaded a file inside space "find data" with content "some content" to "folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt" And using new DAV path + Scenario: Alice can find data from the project space When user "Alice" searches for "fol" using the WebDAV API Then the HTTP status code should be "207" diff --git a/tests/acceptance/features/apiSpacesShares/copySpaces.feature b/tests/acceptance/features/apiSpacesShares/copySpaces.feature index e49484b59b..154725fd82 100644 --- a/tests/acceptance/features/apiSpacesShares/copySpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/copySpaces.feature @@ -300,7 +300,6 @@ Feature: copy file | viewer | should not | 403 | - Scenario Outline: User copies a folder from a space project with different role to a space project with different role Given the administrator has given "Brian" the role "Space Admin" using the settings api And user "Brian" has created a space "Project1" with the default quota using the GraphApi diff --git a/tests/acceptance/features/apiSpacesShares/createFileFolderWhenSharesSpaceExist.feature b/tests/acceptance/features/apiSpacesShares/createFileFolderWhenSharesSpaceExist.feature index 0c97b153ca..7c7c0d5d08 100644 --- a/tests/acceptance/features/apiSpacesShares/createFileFolderWhenSharesSpaceExist.feature +++ b/tests/acceptance/features/apiSpacesShares/createFileFolderWhenSharesSpaceExist.feature @@ -13,6 +13,7 @@ Feature: create file or folder named similar to Shares folder And user "Alice" has shared folder "/FOLDER" with user "Brian" with permissions "read,update" And user "Brian" has accepted share "/FOLDER" offered by user "Alice" + Scenario Outline: create a folder with a name similar to Shares Given using spaces DAV path When user "Brian" creates folder "" using the WebDAV API @@ -25,6 +26,7 @@ Feature: create file or folder named similar to Shares folder | shares | | Share1 | + Scenario Outline: create a file with a name similar to Shares Given using spaces DAV path When user "Brian" uploads file with content "some text" to "" using the WebDAV API @@ -40,6 +42,7 @@ Feature: create file or folder named similar to Shares folder | shares | | Share1 | + Scenario: try to create a folder named Shares Given using spaces DAV path When user "Brian" creates folder "/Shares" using the WebDAV API @@ -47,6 +50,7 @@ Feature: create file or folder named similar to Shares folder And for user "Brian" the space "Shares" should contain these entries: | FOLDER/ | + Scenario: try to create a file named Shares Given using spaces DAV path When user "Brian" uploads file with content "some text" to "/Shares" using the WebDAV API diff --git a/tests/acceptance/features/apiSpacesShares/etagPropagation.feature b/tests/acceptance/features/apiSpacesShares/etagPropagation.feature index b021a24024..56f7cac9a8 100644 --- a/tests/acceptance/features/apiSpacesShares/etagPropagation.feature +++ b/tests/acceptance/features/apiSpacesShares/etagPropagation.feature @@ -9,6 +9,7 @@ Feature: check etag propagation after different file alterations And using spaces DAV path And user "Alice" has created folder "/upload" + Scenario: copying a file inside a folder as a share receiver changes its etag for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" And user "Alice" has shared folder "/upload" with user "Brian" @@ -36,6 +37,7 @@ Feature: check etag propagation after different file alterations | Alice | /upload/file.txt | Personal | | Brian | /upload/file.txt | Shares | + Scenario: copying a file inside a folder as a sharer changes its etag for all collaborators Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" And user "Alice" has shared folder "/upload" with user "Brian" diff --git a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature index f2a9ee51db..04b0f44bd9 100644 --- a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature @@ -11,6 +11,7 @@ Feature: move (rename) file | Brian | And using spaces DAV path + Scenario Outline: Moving a file within same space project with role manager and editor Given the administrator has given "Brian" the role "Space Admin" using the settings api And user "Brian" has created a space "Project" with the default quota using the GraphApi @@ -301,7 +302,8 @@ Feature: move (rename) file And for user "Brian" the space "Personal" should not contain these entries: | /testshare/testsubfolder | - Scenario: Overwriting a file while moving + + Scenario: Overwriting a file while moving Given user "Brian" has created folder "/folder" And user "Brian" has uploaded file with content "old content version 1" to "/folder/testfile.txt" And user "Brian" has uploaded file with content "old content version 2" to "/folder/testfile.txt"