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 12, 2023
1 parent 48857e9 commit 678f388
Show file tree
Hide file tree
Showing 29 changed files with 109 additions and 109 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 @@ -222,7 +222,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 @@ -248,7 +248,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 @@ -469,7 +469,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 @@ -484,7 +484,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 @@ -504,7 +504,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/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" has shared 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
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
16 changes: 8 additions & 8 deletions tests/acceptance/features/apiSpaces/listSpaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: List and create spaces


Scenario: ordinary user can request information about their Space via the Graph API
When user "Alice" lists all available spaces via the GraphApi
When user "Alice" lists all available spaces via the Graph API
Then the HTTP status code should be "200"
And the JSON response should contain space called "Alice Hansen" and match
"""
Expand Down Expand Up @@ -82,7 +82,7 @@ Feature: List and create spaces
And user "Brian" has created folder "folder"
And user "Brian" has shared folder "folder" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/folder" offered by user "Brian"
When user "Alice" lists all available spaces via the GraphApi with query "$filter=driveType eq 'personal'"
When user "Alice" lists all available spaces via the Graph API with query "$filter=driveType eq 'personal'"
Then the HTTP status code should be "200"
And the JSON response should contain space called "Alice Hansen" and match
"""
Expand Down Expand Up @@ -151,7 +151,7 @@ Feature: List and create spaces
Scenario: ordinary user will not see any space when using a filter for project
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "my project" of type "project" with quota "20"
When user "Alice" lists all available spaces via the GraphApi with query "$filter=driveType eq 'project'"
When user "Alice" lists all available spaces via the Graph API with query "$filter=driveType eq 'project'"
Then the HTTP status code should be "200"
And the JSON response should contain space called "my project" and match
"""
Expand Down Expand Up @@ -182,13 +182,13 @@ Feature: List and create spaces


Scenario: ordinary user can access their space via the webDav API
When user "Alice" lists all available spaces via the GraphApi
When user "Alice" lists all available spaces via the Graph API
And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api
Then the HTTP status code should be "207"


Scenario: user can list his personal space via multiple endpoints
When user "Alice" lists all available spaces via the GraphApi with query "$filter=driveType eq 'personal'"
When user "Alice" lists all available spaces via the Graph API with query "$filter=driveType eq 'personal'"
Then the HTTP status code should be "200"
And the JSON response should contain space called "Alice Hansen" owned by "Alice" and match
"""
Expand Down Expand Up @@ -245,7 +245,7 @@ Feature: List and create spaces
}
}
"""
When user "Alice" looks up the single space "Alice Hansen" via the GraphApi by using its id
When user "Alice" looks up the single space "Alice Hansen" via the Graph API by using its id
Then the HTTP status code should be "200"
And the JSON response should contain space called "Alice Hansen" and match
"""
Expand Down Expand Up @@ -348,7 +348,7 @@ Feature: List and create spaces
}
}
"""
When user "Alice" looks up the single space "Project Venus" via the GraphApi by using its id
When user "Alice" looks up the single space "Project Venus" via the Graph API by using its id
Then the HTTP status code should be "200"
And the JSON response should contain space called "Project Venus" and match
"""
Expand Down Expand Up @@ -419,7 +419,7 @@ Feature: List and create spaces

Scenario Outline: user cannot list space by id if he is not member of the space
Given the administrator has assigned the role "<role>" to user "Alice" using the Graph API
And user "Admin" has created a space "Project Venus" with the default quota using the GraphApi
And user "Admin" has created a space "Project Venus" with the default quota using the Graph API
When user "Alice" tries to look up the single space "Project Venus" owned by the user "Admin" by using its id
Then the HTTP status code should be "404"
And the json responded should not contain a space with name "Project Venus"
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiSpaces/publicLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: public link for a space
| 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 "public space" with the default quota using the GraphApi
And user "Alice" has created a space "public space" with the default quota using the Graph API
And user "Alice" has created a public link share of the space "public space" with settings:
| permissions | 1 |

Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiSpaces/quota.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: State of the quota
Scenario Outline: quota information is returned in the list of spaces returned via the Graph API
Given user "Alice" has created a space "<spaceName>" of type "project" with quota "100"
When user "Alice" uploads a file inside space "<spaceName>" with content "<fileContent>" to "test.txt" using the WebDAV API
And user "Alice" lists all available spaces via the GraphApi
And user "Alice" lists all available spaces via the Graph API
Then the JSON response should contain space called "<spaceName>" and match
"""
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Remove files, folder
| 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 "delete objects" with the default quota using the GraphApi
And user "Alice" has created a space "delete objects" with the default quota using the Graph API
And user "Alice" has created a folder "folderForDeleting/sub1/sub2" in space "delete objects"
And user "Alice" has uploaded a file inside space "delete objects" with content "some content" to "text.txt"

Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/features/apiSpaces/spaceManagement.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Space management


Scenario: space admin user can see another project space even if he is not member of the space
When user "Brian" lists all spaces via the GraphApi with query "$filter=driveType eq 'project'"
When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'project'"
Then the HTTP status code should be "200"
And the JSON response should contain space called "Project" and match
"""
Expand Down Expand Up @@ -53,7 +53,7 @@ Feature: Space management


Scenario: space admin user can see another personal spaces
When user "Brian" lists all spaces via the GraphApi with query "$filter=driveType eq 'personal'"
When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'personal'"
Then the HTTP status code should be "200"
And the JSON response should contain space called "Alice Hansen" and match
"""
Expand Down Expand Up @@ -84,7 +84,7 @@ Feature: Space management


Scenario: user without space admin permission cannot see another spaces
When user "Carol" tries to list all spaces via the GraphApi
When user "Carol" tries to list all spaces via the Graph API
Then the HTTP status code should be "200"
And the json responded should not contain a space with name "Project"
And the json responded should not contain a space with name "Alice Hansen"
Expand Down
Loading

0 comments on commit 678f388

Please sign in to comment.