Skip to content

Commit

Permalink
Used kebab case for example table header name
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Mar 19, 2024
1 parent 0473224 commit ddb1fc8
Show file tree
Hide file tree
Showing 12 changed files with 246 additions and 246 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Feature: assign role
When user "Alice" tries to get all existing roles
Then the HTTP status code should be "<http-status-code>"
Examples:
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 201 |
| User | 201 |
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 201 |
| User | 201 |

@issue-5032
Scenario Outline: only admin user can see assignments list
Expand All @@ -22,10 +22,10 @@ Feature: assign role
When user "Alice" tries to get list of assignment
Then the HTTP status code should be "<http-status-code>"
Examples:
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 401 |
| User | 401 |
| user-role | http-status-code |
| Admin | 201 |
| Space Admin | 401 |
| User | 401 |


Scenario Outline: a user cannot change own role
Expand All @@ -35,13 +35,13 @@ Feature: assign role
Then the HTTP status code should be "400"
And user "Alice" should have the role "<user-role>"
Examples:
| user-role | desired-role |
| Admin | User |
| Admin | Space Admin |
| Space Admin | Admin |
| Space Admin | Space Admin |
| User | Admin |
| User | Space Admin |
| user-role | desired-role |
| Admin | User |
| Admin | Space Admin |
| Space Admin | Admin |
| Space Admin | Space Admin |
| User | Admin |
| User | Space Admin |


Scenario Outline: only admin user can change the role for another user
Expand All @@ -54,11 +54,11 @@ Feature: assign role
Then the HTTP status code should be "<http-status-code>"
And user "Brian" should have the role "<expected-role>"
Examples:
| user-role | desired-role | http-status-code | expected-role |
| Admin | User | 201 | User |
| Admin | Space Admin | 201 | Space Admin |
| Admin | Admin | 201 | Admin |
| Space Admin | Admin | 400 | User |
| Space Admin | Space Admin | 400 | User |
| User | Admin | 400 | User |
| User | Space Admin | 400 | User |
| user-role | desired-role | http-status-code | expected-role |
| Admin | User | 201 | User |
| Admin | Space Admin | 201 | Space Admin |
| Admin | Admin | 201 | Admin |
| Space Admin | Admin | 400 | User |
| Space Admin | Space Admin | 400 | User |
| User | Admin | 400 | User |
| User | Space Admin | 400 | User |
102 changes: 51 additions & 51 deletions tests/acceptance/features/apiAntivirus/antivirus.feature
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ Feature: antivirus
| permissions | change |
| expireDate | 2040-01-01T23:59:59+0100 |
| password | %public% |
When user "Alice" uploads file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" using the WebDAV API
When user "Alice" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
Expand All @@ -121,14 +121,14 @@ Feature: antivirus
| password | newpasswd |
| expireDate | 2040-01-01T23:59:59+0100 |
| password | %public% |
When user "Alice" uploads file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" using the WebDAV API
When user "Alice" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
Expand All @@ -142,15 +142,15 @@ Feature: antivirus
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
When user "Brian" uploads file "filesForUpload/filesWithVirus/<filename>" to "/Shares/uploadFolder/<newfilename>" using the WebDAV API
When user "Brian" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/Shares/uploadFolder/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
Expand All @@ -162,15 +162,15 @@ Feature: antivirus
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "Shares" using the WebDAV API
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/uploadFolder/<new-file-name>" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |

Expand All @@ -182,15 +182,15 @@ Feature: antivirus
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with group "group1"
When user "Brian" uploads file "filesForUpload/filesWithVirus/<filename>" to "/Shares/uploadFolder/<newfilename>" using the WebDAV API
When user "Brian" uploads file "filesForUpload/filesWithVirus/<file-name>" to "/Shares/uploadFolder/<new-file-name>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| dav-path-version | filename | newfilename |
| dav-path-version | file-name | new-file-name |
| old | eicar.com | virusFile1.txt |
| old | eicar_com.zip | virusFile2.zip |
| new | eicar.com | virusFile1.txt |
Expand All @@ -204,15 +204,15 @@ Feature: antivirus
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with group "group1"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "Shares" using the WebDAV API
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/uploadFolder/<new-file-name>" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<newfilename>" should not exist
And as "Alice" file "/uploadFolder/<newfilename>" should not exist
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |

Expand All @@ -222,22 +222,22 @@ Feature: antivirus
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 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
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/uploadFolder/<new-file-name>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification for resource "<newfilename>" with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And user "Alice" should get a notification for resource "<new-file-name>" with subject "Virus found" and message:
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Alice" folder "uploadFolder" of the space "new-space" should not contain these entries:
| <newfilename> |
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" in space "new-space" using the WebDAV API
| <new-file-name> |
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification for resource "<newfilename>" with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And user "Alice" should get a notification for resource "<new-file-name>" with subject "Virus found" and message:
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Alice" the space "new-space" should not contain these entries:
| /<newfilename> |
| /<new-file-name> |
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |

Expand All @@ -250,17 +250,17 @@ Feature: antivirus
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
When user "Brian" uploads a file "/filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" in space "new-space" using the WebDAV API
When user "Brian" uploads a file "/filesForUpload/filesWithVirus/<file-name>" to "/<new-file-name>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
| message |
| Virus found in <new-file-name>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Brian" the space "new-space" should not contain these entries:
| /<newfilename> |
| /<new-file-name> |
And for user "Alice" the space "new-space" should not contain these entries:
| /<newfilename> |
| /<new-file-name> |
Examples:
| filename | newfilename |
| file-name | new-file-name |
| eicar.com | virusFile1.txt |
| eicar_com.zip | virusFile2.zip |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ Feature: delay post-processing of uploaded files
@issue-5326
Scenario Outline: user sends GET request to the file while it's still being processed
Given user "Alice" has uploaded file with content "uploaded content" to "/file.txt"
When user "Alice" requests "<dav_path>" with "GET" without retrying
When user "Alice" requests "<dav-path>" with "GET" without retrying
Then the HTTP status code should be "425"
Examples:
| dav_path |
| dav-path |
| /remote.php/webdav/file.txt |
| /remote.php/dav/files/%username%/file.txt |
| /dav/spaces/%spaceid%/file.txt |


Scenario Outline: user sends PROPFIND request to the file while it's still being processed
Given user "Alice" has uploaded file with content "uploaded content" to "/file.txt"
When user "Alice" requests "<dav_path>" with "PROPFIND" without retrying
When user "Alice" requests "<dav-path>" with "PROPFIND" without retrying
Then the HTTP status code should be "207"
And the value of the item "//d:response/d:propstat/d:status" in the response should be "HTTP/1.1 425 TOO EARLY"
Examples:
| dav_path |
| dav-path |
| /remote.php/webdav/file.txt |
| /remote.php/dav/files/%username%/file.txt |
| /dav/spaces/%spaceid%/file.txt |
Expand All @@ -35,12 +35,12 @@ Feature: delay post-processing of uploaded files
Scenario Outline: user sends PROPFIND request to the folder while files in the folder are still being processed
Given user "Alice" has created folder "my_data"
And user "Alice" has uploaded file with content "uploaded content" to "/my_data/file.txt"
When user "Alice" requests "<dav_path>" with "PROPFIND" without retrying
When user "Alice" requests "<dav-path>" with "PROPFIND" without retrying
Then the HTTP status code should be "207"
And as user "Alice" the value of the item "//d:status" of path "<dav_path>/" in the response should be "HTTP/1.1 200 OK"
And as user "Alice" the value of the item "//d:status" of path "<dav_path>/file.txt" in the response should be "HTTP/1.1 425 TOO EARLY"
And as user "Alice" the value of the item "//d:status" of path "<dav-path>/" in the response should be "HTTP/1.1 200 OK"
And as user "Alice" the value of the item "//d:status" of path "<dav-path>/file.txt" in the response should be "HTTP/1.1 425 TOO EARLY"
Examples:
| dav_path |
| dav-path |
| /remote.php/webdav/my_data |
| /remote.php/dav/files/%username%/my_data |
| /dav/spaces/%spaceid%/my_data |
Loading

0 comments on commit ddb1fc8

Please sign in to comment.