Skip to content

Commit

Permalink
refactoring the feature file steps
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Panta committed Oct 20, 2023
1 parent b375782 commit 62d3538
Show file tree
Hide file tree
Showing 40 changed files with 144 additions and 140 deletions.
10 changes: 5 additions & 5 deletions tests/acceptance/features/apiAntivirus/antivirus.feature
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Feature: antivirus
Scenario Outline: upload a file with virus to a project space
Given 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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "uploadFolder" in space "new-space"
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
Expand All @@ -244,7 +244,7 @@ Feature: antivirus
Given using spaces DAV path
And user "Brian" has been created with default attributes and without skeleton files
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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
Expand Down Expand Up @@ -459,7 +459,7 @@ Feature: antivirus
Scenario: try to overwrite the .space/readme.md file
Given 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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder ".space" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "Here you can add a description for this Space." to ".space/readme.md"
When user "Alice" uploads a file inside space "new-space" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to ".space/readme.md" using the WebDAV API
Expand All @@ -474,7 +474,7 @@ Feature: antivirus
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created a space "new-space" with the default quota using the GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
Expand All @@ -494,7 +494,7 @@ Feature: antivirus
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created a space "new-space" with the default quota using the GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiContract/copy.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Copy test
| Alice |
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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API


Scenario: check the COPY response headers
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiContract/propfind.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Propfind test
| 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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API


Scenario: space-admin checks the PROPFIND request of a space
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiContract/spacesReport.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: REPORT request to project space
| 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 "findData" with the default quota using the GraphApi
And user "Alice" has created a space "findData" with the default quota using the Graph API


Scenario: check the response of the searched file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Report test
| 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 "find data" with the default quota using the GraphApi
And user "Alice" has created a space "find data" with the default quota using the Graph API
And user "Alice" has created a folder "folderMain/SubFolder1/subFOLDER2" in space "find data"
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
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiDownloads/download.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Download file in project space
| Bob |
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 "download file" with the default quota using the GraphApi
And user "Alice" has created a space "download file" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "download file" with content "some content" to "file.txt"
And user "Alice" has shared a space "download file" with settings:
| shareWith | Brian |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Download space
| 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 "Project-space" with the default quota using the GraphApi
And user "Alice" has created a space "Project-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project-space" with content "some data" to "file1.txt"
And user "Alice" has created a folder ".space" in space "Project-space"
And user "Alice" has uploaded a file inside space "Project-space" with content "space description" to ".space/readme.md"
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiGraph/deleteUser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Feature: delete user
And user "Brian" has been created with default attributes and without skeleton files
When the user "Alice" deletes a user "Brian" using the Graph API
Then the HTTP status code should be "204"
When user "Alice" lists all spaces via the GraphApi with query "$filter=driveType eq 'personal'"
When user "Alice" lists all spaces via the Graph API with query "$filter=driveType eq 'personal'"
Then the json responded should not contain a space with name "Brian Murphy"


Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/apiGraph/userGDPRExport.feature
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ Feature: user GDPR (General Data Protection Regulation) report
Scenario: generate a GDPR report and check events when a space is shared
Given user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "GDPR Space" with the default quota using the GraphApi
And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API
And user "Alice" has shared a space "GDPR Space" with settings:
| shareWith | Brian |
| role | viewer |
Expand Down Expand Up @@ -958,7 +958,7 @@ Feature: user GDPR (General Data Protection Regulation) report

Scenario: generate a GDPR report and check events when a space is created
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "GDPR Space" with the default quota using the GraphApi
And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API
When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API
And user "Alice" downloads the content of GDPR report ".personal_data_export.json"
Then the HTTP status code of responses on each endpoint should be "201, 200" respectively
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Email notification

Scenario: user gets an email notification when someone shares a project space
Given 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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
When user "Alice" shares a space "new-space" with settings:
| shareWith | Brian |
| role | Editor |
Expand Down Expand Up @@ -49,7 +49,7 @@ Feature: Email notification
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Carol" has been added to group "group1"
And user "Alice" has created a space "new-space" with the default quota using the GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
When user "Alice" shares a space "new-space" with settings:
| shareWith | group1 |
| shareType | 8 |
Expand Down Expand Up @@ -139,7 +139,7 @@ Feature: Email notification
And user "Carol" has been added to group "group1"
And user "Brian" has switched the system language to "es"
And user "Carol" has switched the system language to "de"
And user "Alice" has created a space "new-space" with the default quota using the GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
When user "Alice" shares a space "new-space" with settings:
| shareWith | group1 |
| role | viewer |
Expand All @@ -164,7 +164,7 @@ Feature: Email notification

Scenario: user gets an email notification when space admin unshares a space
Given 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 GraphApi
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Notification
| Brian |
| Carol |
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "notification checking" with the default quota using the GraphApi
And user "Alice" has created a space "notification checking" with the default quota using the Graph API


Scenario: get a notification of space shared
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/apiReshare/resharing.feature
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ Feature: Resharing

Scenario Outline: resharing with group with different permissions
Given group "security department" has been created
And the administrator has added a user "Ember" to the group "security department" using GraphApi
And the administrator has added a user "Fred" to the group "security department" using GraphApi
And the administrator has added a user "Ember" to the group "security department" using the Graph API
And the administrator has added a user "Fred" to the group "security department" using the Graph API
When user "Brian" shares folder "Shares/folder" with group "security department" with permissions "<permissions>" using the sharing API
Then the OCS status code should be "100"
And user "Ember" <canUpload> able to upload file "filesForUpload/textfile.txt" to "/Shares/folder/textfile.txt"
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiSearch/apiSpaceSearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Search
| 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 "find data" with the default quota using the GraphApi
And user "Alice" has created a space "find data" with the default quota using the Graph API
And user "Alice" has created a folder "folderMain/SubFolder1/subFOLDER2" in space "find data"
And user "Alice" has uploaded a file inside space "find data" with content "some content" to "folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt"

Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/features/apiSearch/contentSearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Feature: content search
Scenario Outline: search project space files by content
Given 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 "project-space" with the default quota using the GraphApi
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has created a folder "spacesFolderWithFile/spacesSubFolder" in space "project-space"
And user "Alice" has uploaded a file inside space "project-space" with content "hello world from nepal" to "keywordAtStart.txt"
And user "Alice" has uploaded a file inside space "project-space" with content "saying hello to the world" to "spacesFolderWithFile/keywordAtMiddle.txt"
Expand All @@ -128,7 +128,7 @@ Feature: content search
Given using spaces DAV path
And user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "project-space" with the default quota using the GraphApi
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has shared a space "project-space" with settings:
| shareWith | Brian |
| role | viewer |
Expand Down Expand Up @@ -177,7 +177,7 @@ Feature: content search
Scenario Outline: search across files with different format with search text highlight
Given using <dav-path-version> 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 "project-space" with the default quota using the GraphApi
And user "Alice" has created a space "project-space" with the default quota using the Graph API
And user "Alice" has uploaded file with content "this is a simple text file" to "test-text-file.txt"
And user "Alice" has uploaded file with content "this is a simple pdf file" to "test-pdf-file.pdf"
And user "Alice" has uploaded file with content "this is a simple cpp file" to "test-cpp-file.cpp"
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/features/apiSearch/tagSearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Feature: tag search
Scenario Outline: search project space files by tag
Given 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 "tag-space" with the default quota using the GraphApi
And user "Alice" has created a space "tag-space" with the default quota using the Graph API
And user "Alice" has created a folder "spacesFolderWithFile/spacesSubFolder" in space "tag-space"
And user "Alice" has uploaded a file inside space "tag-space" with content "tagged file" to "spacesFile.txt"
And user "Alice" has uploaded a file inside space "tag-space" with content "untagged file" to "spacesFileWithoutTag.txt"
Expand Down Expand Up @@ -92,7 +92,7 @@ Feature: tag search
Scenario Outline: search project space folders by tag
Given 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 "tag-space" with the default quota using the GraphApi
And user "Alice" has created a space "tag-space" with the default quota using the Graph API
And user "Alice" has created a folder "spacesFolder/spacesSubFolder" in space "tag-space"
And user "Alice" has created a folder "unTagSpacesFolder/unTagSpacesSubFolder" in space "tag-space"
And user "Alice" has tagged the following folders of the space "tag-space":
Expand Down Expand Up @@ -148,7 +148,7 @@ Feature: tag search
Given using spaces DAV path
And user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "tag-space" with the default quota using the GraphApi
And user "Alice" has created a space "tag-space" with the default quota using the Graph API
And user "Alice" has shared a space "tag-space" with settings:
| shareWith | Brian |
| role | viewer |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Disabling and deleting space
| Bob |
| Carol |
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "Project Moon" with the default quota using the GraphApi
And user "Alice" has created a space "Project Moon" with the default quota using the Graph API
And user "Alice" has shared a space "Project Moon" with settings:
| shareWith | Brian |
| role | editor |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: A manager of the space can edit public link
| 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 "edit space" with the default quota using the GraphApi
And user "Alice" has created a space "edit space" with the default quota using the Graph API
And user "Alice" has created a public link share of the space "edit space" with settings:
| permissions | 1 |
| password | qwerty |
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiSpaces/filePreviews.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Preview file in project space
| username |
| Alice |
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "previews of the files" with the default quota using the GraphApi
And user "Alice" has created a space "previews of the files" with the default quota using the Graph API
And using spaces DAV path


Expand Down
Loading

0 comments on commit 62d3538

Please sign in to comment.