From 03045c5ccc23ff9a11de6b0a7101c20352056b4b Mon Sep 17 00:00:00 2001 From: Nalem7 <61624650+nabim777@users.noreply.github.com> Date: Tue, 13 Jun 2023 14:36:17 +0545 Subject: [PATCH] add tests for project space (#6485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: nabim777 <“nabinalemagar019@gmail.com”> --- .../features/apiAntivirus/antivirus.feature | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/acceptance/features/apiAntivirus/antivirus.feature b/tests/acceptance/features/apiAntivirus/antivirus.feature index b22fbf57cf..ee8d983748 100644 --- a/tests/acceptance/features/apiAntivirus/antivirus.feature +++ b/tests/acceptance/features/apiAntivirus/antivirus.feature @@ -212,3 +212,50 @@ Feature: antivirus | eicar.com | virusFile1.txt | | eicar_com.zip | virusFile2.zip | + + Scenario Outline: upload a file with virus to a project space + Given using spaces DAV path + And the administrator has given "Alice" the role "Space Admin" using the settings api + And user "Alice" has created a space "new-space" with the default quota using the GraphApi + And user "Alice" has created a folder "uploadFolder" in space "new-space" + When user "Alice" uploads a file "filesForUpload/filesWithVirus/" to "/uploadFolder/" in space "new-space" 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 . Upload not possible. Virus: Win.Test.EICAR_HDB-1 | + And for user "Alice" the space "new-space" should not contain these entries: + | /uploadFolder/ | + When user "Alice" uploads a file "filesForUpload/filesWithVirus/" to "/" in space "new-space" 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 . Upload not possible. Virus: Win.Test.EICAR_HDB-1 | + And for user "Alice" the space "new-space" should not contain these entries: + | / | + Examples: + | filename | newfilename | + | eicar.com | virusFile1.txt | + | eicar_com.zip | virusFile2.zip | + + + Scenario Outline: upload a file with virus to a shared project space + Given using spaces DAV path + And user "Brian" has been created with default attributes and without skeleton files + And the administrator has given "Alice" the role "Space Admin" using the settings api + And user "Alice" has created a space "new-space" with the default quota using the GraphApi + And user "Alice" has shared a space "new-space" with settings: + | shareWith | Brian | + | role | editor | + When user "Brian" uploads a file "/filesForUpload/filesWithVirus/" to "/" 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 . Upload not possible. Virus: Win.Test.EICAR_HDB-1 | + And for user "Brian" the space "new-space" should not contain these entries: + | / | + And for user "Alice" the space "new-space" should not contain these entries: + | / | + Examples: + | filename | newfilename | + | eicar.com | virusFile1.txt | + | eicar_com.zip | virusFile2.zip |