[tests-only][full-ci] Refactoring all graphapi related featurefile wording (#7389)

* refactoring the feature file steps

* addressing review
This commit is contained in:
Sabin Panta
2023-10-30 17:57:42 +05:45
committed by GitHub
parent 632de1bef5
commit 1c6600365c
42 changed files with 147 additions and 148 deletions
@@ -339,7 +339,7 @@ Feature: Change data of space
When user "<user>" uploads a file inside space "Project Jupiter" owned by the user "Alice" with content "new content" to ".space/readme.md" using the WebDAV API
Then the HTTP status code should be "<code>"
And for user "<user>" the content of the file ".space/readme.md" of the space "Project Jupiter" should be "<expectedContent>"
When user "<user>" lists all available spaces via the GraphApi
When user "<user>" lists all available spaces via the Graph API
And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/readme.md" and match
"""
{
@@ -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 |
@@ -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 |
@@ -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
@@ -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
"""
@@ -81,7 +81,7 @@ Feature: List and create spaces
Given user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "folder"
And user "Brian" has shared folder "folder" with user "Alice" with permissions "31"
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
"""
@@ -150,7 +150,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
"""
@@ -181,13 +181,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
"""
@@ -244,7 +244,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
"""
@@ -347,7 +347,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
"""
@@ -418,7 +418,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"
@@ -434,7 +434,7 @@ Feature: List and create spaces
And user "Brian" has uploaded file with content "this is a test file." to "test.txt"
And the administrator has assigned the role "<userRole>" to user "Alice" using the Graph API
And user "Brian" has shared file "/test.txt" with user "Alice"
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 "Shares" owned by "Alice" and match
"""
@@ -91,7 +91,7 @@ Feature: lock files
Scenario Outline: lock a file in the project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a space "Project" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "textfile.txt"
And user "Alice" has shared a space "Project" with settings:
| shareWith | Brian |
@@ -117,7 +117,7 @@ Feature: lock files
Scenario Outline: lock a file in the project space using file-id
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a space "Project" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has shared a space "Project" with settings:
@@ -144,7 +144,7 @@ Feature: lock files
Scenario: viewer cannot lock a file in the project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a space "Project" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has shared a space "Project" with settings:
@@ -203,7 +203,7 @@ Feature: lock files
| /remote.php/dav/spaces/<<FILEID>> |
| /dav/spaces/<<FILEID>> |
Scenario: viewer cannot lock a file in the shares using file-id
Given user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And we save it into "FILEID"
@@ -214,4 +214,3 @@ Feature: lock files
When user "Brian" locks file using file-id path "<dav-path>" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "403"
@@ -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 |
@@ -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
"""
{
@@ -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"
@@ -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
"""
@@ -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
"""
@@ -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"
+15 -15
View File
@@ -13,7 +13,7 @@ Feature: Tag
| 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 "use-tag" with the default quota using the GraphApi
And user "Alice" has created a space "use-tag" with the default quota using the Graph API
And user "Alice" has created a folder "folderMain" in space "use-tag"
And user "Alice" has uploaded a file inside space "use-tag" with content "some content" to "folderMain/insideTheFolder.txt"
@@ -39,13 +39,13 @@ Feature: Tag
And the "PROPFIND" response should contain a space "use-tag" with these key and value pairs:
| key | value |
| oc:tags | fileTag |
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| tag level#1 |
| tag with symbols @^$#^%$@%!_+) |
| fileTag |
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| tag level#1 |
@@ -74,7 +74,7 @@ Feature: Tag
And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs:
| key | value |
| oc:tags | fileTag,tag with symbol @^$#^%$@%!_+) |
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| my tag |
@@ -91,7 +91,7 @@ Feature: Tag
| tag level#1 |
| tag with symbols @^$#^%$@%!_+) |
Then the HTTP status code should be "<code>"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response <shouldOrNot> contain following tags:
| tag level#1 |
@@ -111,7 +111,7 @@ Feature: Tag
| path | folderMain |
| shareWith | Brian |
| role | viewer |
When user "Brian" lists all available tags via the GraphApi
When user "Brian" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| folderTag |
@@ -127,7 +127,7 @@ Feature: Tag
| tag in a shared resource |
| second tag |
Then the HTTP status code should be "<code>"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response <shouldOrNot> contain following tags:
| tag in a shared resource |
@@ -154,7 +154,7 @@ Feature: Tag
| tag in a shared resource |
| second tag |
Then the HTTP status code should be "<code>"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response <shouldOrNot> contain following tags:
| tag in a shared resource |
@@ -193,7 +193,7 @@ Feature: Tag
| folderTag |
| marketing |
Then the HTTP status code should be "200"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| development |
@@ -208,7 +208,7 @@ Feature: Tag
| marketing |
When user "Alice" removes the folder "folderMain" from space "use-tag"
Then the HTTP status code should be "204"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should not contain following tags:
| folderTag |
@@ -220,14 +220,14 @@ Feature: Tag
| folderTag |
| marketing |
And user "Alice" has disabled a space "use-tag"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should not contain following tags:
| folderTag |
| marketing |
When user "Alice" deletes a space "use-tag"
Then the HTTP status code should be "204"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should not contain following tags:
| folderTag |
@@ -241,7 +241,7 @@ Feature: Tag
And user "Alice" has removed the folder "folderMain" from space "use-tag"
When user "Alice" restores the folder "folderMain" from the trash of the space "use-tag" to "/folderMain"
Then the HTTP status code should be "201"
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| folderTag |
@@ -268,7 +268,7 @@ Feature: Tag
And the "PROPFIND" response should contain a space "use-tag" with these key and value pairs:
| key | value |
| oc:tags | file,,Tag |
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| finance |
@@ -288,7 +288,7 @@ Feature: Tag
And the "PROPFIND" response should contain a space "use-tag" with these key and value pairs:
| key | value |
| oc:tags | engineering,finance,hr,qa |
When user "Alice" lists all available tags via the GraphApi
When user "Alice" lists all available tags via the Graph API
Then the HTTP status code should be "200"
And the response should contain following tags:
| engineering |
@@ -13,7 +13,7 @@ Feature: Restore 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 "restore objects" with the default quota using the GraphApi
And user "Alice" has created a space "restore objects" with the default quota using the Graph API
And user "Alice" has created a folder "newFolder" in space "restore objects"
And user "Alice" has uploaded a file inside space "restore objects" with content "test" to "newFolder/file.txt"