From 85b2f96e29033dc87476b8e9c4236b9f1fb3e698 Mon Sep 17 00:00:00 2001 From: Sawjan Gurung Date: Fri, 10 May 2024 12:35:00 +0545 Subject: [PATCH] test: delete share, delete, trashbin and login accpetance suties (#10889) --- .drone.star | 18 --- .../deleteFilesFolders.feature | 79 ------------- .../webUIFilesDetails/fileDetails.feature | 72 ------------ .../features/webUILogin/openidLogin.feature | 47 -------- .../shareWithUsers.feature | 27 ----- .../trashbinDelete.feature | 104 ------------------ .../trashbinFilesFolders.feature | 46 -------- .../cucumber/features/shares/share.feature | 8 +- 8 files changed, 6 insertions(+), 395 deletions(-) delete mode 100644 tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature delete mode 100644 tests/acceptance/features/webUIFilesDetails/fileDetails.feature delete mode 100644 tests/acceptance/features/webUILogin/openidLogin.feature delete mode 100644 tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature delete mode 100644 tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature delete mode 100644 tests/acceptance/features/webUITrashbinFilesFolders/trashbinFilesFolders.feature diff --git a/.drone.star b/.drone.star index 8f932f61eeb..6e88b6657a7 100644 --- a/.drone.star +++ b/.drone.star @@ -101,22 +101,12 @@ config = { "", ], "suites": { - "oCISBasic": [ - "webUILogin", - ], "oCISFiles1": [ "webUICreateFilesFolders", - "webUIDeleteFilesFolders", - ], - "oCISFiles2": [ - "webUIFilesDetails", ], "oCISFiles5": [ "webUITextEditor", ], - "oCISSharingInternal2": [ - "webUISharingInternalUsers", - ], "oCISSharingPublic1": [ "webUISharingPublicBasic", ], @@ -127,8 +117,6 @@ config = { "webUISharingPublicDifferentRoles", ], "oCISTrashbinJourney": [ - "webUITrashbinDelete", - "webUITrashbinFilesFolders", "webUITrashbinRestore", ], }, @@ -150,17 +138,11 @@ config = { basicTestSuites = [ "webUICreateFilesFolders", - "webUIDeleteFilesFolders", - "webUIFilesDetails", - "webUILogin", "webUISharingAcceptShares", - "webUISharingInternalUsers", "webUISharingPublicBasic", "webUISharingPublicDifferentRoles", "webUISharingPublicManagement", "webUITextEditor", - "webUITrashbinDelete", - "webUITrashbinFilesFolders", "webUITrashbinRestore", ] diff --git a/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature b/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature deleted file mode 100644 index f53d85b5ba9..00000000000 --- a/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature +++ /dev/null @@ -1,79 +0,0 @@ -Feature: deleting files and folders - As a user - I want to delete files and folders - So that I can keep my filing system clean and tidy - - Background: - Given user "Alice" has been created with default attributes and without skeleton files in the server - - - Scenario Outline: Delete a file with problematic characters - Given user "Alice" has created file in the server - And user "Alice" has logged in using the webUI - When the user deletes file using the webUI - Then file should not be listed on the webUI - When the user reloads the current page of the webUI - Then file should not be listed on the webUI - Examples: - | file_name | - | "'single'" | - | "\"double\" quotes" | - | "question?" | - | "&and#hash" | - - - Scenario: delete a file on a public share with problematic characters - Given user "Alice" has created file "lorem.txt" in the server - And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has renamed the following file in the server - | from-name-parts | to-name-parts | - | lorem.txt | simple-folder/ | - | | 'single' | - | | "double" quotes | - | | question? | - | | &and#hash | - And user "Alice" has shared folder "simple-folder" with link with "read, update, create, delete" permissions in the server - When the public uses the webUI to access the last public link created by user "Alice" in a new session - And the user deletes the following file using the webUI - | name-parts | - | 'single' | - | "double" quotes | - | question? | - | &and#hash | - Then the following file should not be listed on the webUI - | name-parts | - | 'single' | - | "double" quotes | - | question? | - | &and#hash | - And no message should be displayed on the webUI - When the user reloads the current page of the webUI - Then the following file should not be listed on the webUI - | name-parts | - | 'single' | - | "double" quotes | - | question? | - | &and#hash | - - - - Scenario: Delete folder with dot in the name - Given user "Alice" has created the following folders in the server - | folders | - | fo. | - | fo.1 | - | fo...1.. | - | fo.xyz | - And user "Alice" has logged in using the webUI - When the user batch deletes these files using the webUI - | folders | - | fo. | - | fo.1 | - | fo...1.. | - | fo.xyz | - Then as "Alice" these folders should not be listed on the webUI - | folders | - | fo. | - | fo.1 | - | fo...1.. | - | fo.xyz | diff --git a/tests/acceptance/features/webUIFilesDetails/fileDetails.feature b/tests/acceptance/features/webUIFilesDetails/fileDetails.feature deleted file mode 100644 index 8ab02a25a95..00000000000 --- a/tests/acceptance/features/webUIFilesDetails/fileDetails.feature +++ /dev/null @@ -1,72 +0,0 @@ -Feature: User can open the details panel for any file or folder - As a user - I want to be able to open the details panel of any file or folder - So that the details of the file or folder are visible to me - - Background: - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | Alice | - | Brian | - And user "Alice" has logged in using the webUI - - @files_versions-app-required - Scenario: View different areas of the app-sidebar for a file in files page - Given user "Alice" has created file "lorem.txt" in the server - And the user has browsed to the personal page - When the user opens the sidebar for file "lorem.txt" on the webUI - Then the app-sidebar should be visible - And the "details" details panel should be visible - And the "big" preview of thumbnail should be visible in the "details" panel - When the user switches to "actions" panel in details panel using the webUI - Then the "actions" details panel should be visible - And the "small" preview of thumbnail should be visible in the "actions" panel - When the user switches to "people" panel in details panel using the webUI - Then the "people" details panel should be visible - And the "small" preview of thumbnail should be visible in the "people" panel - When the user switches to "versions" panel in details panel using the webUI - Then the "versions" details panel should be visible - And the "small" preview of thumbnail should be visible in the "versions" panel - - @files_versions-app-required - Scenario: View different areas of the app-sidebar for a folder in files page - Given user "Alice" has created folder "simple-folder" in the server - And the user has browsed to the personal page - When the user opens the sidebar for folder "simple-folder" on the webUI - Then the app-sidebar should be visible - And the "details" details panel should be visible - And the "big" preview of thumbnail should be visible in the "details" panel - When the user switches to "actions" panel in details panel using the webUI - Then the "actions" details panel should be visible - And the "small" preview of thumbnail should be visible in the "actions" panel - When the user switches to "people" panel in details panel using the webUI - Then the "people" details panel should be visible - And the "small" preview of thumbnail should be visible in the "people" panel - - @ocis-reva-issue-106 - Scenario: without any share the shared-with-others page should be empty - When the user browses to the shared-with-others page using the webUI - Then there should be no resources listed on the webUI - - - Scenario: without any share the shared-with-me page should be empty - When the user browses to the shared-with-me page in accepted shares view - Then there should be no resources listed on the webUI - When the user browses to the shared-with-me page in declined shares view - Then there should be no resources listed on the webUI - - - Scenario: the sidebar is invisible after closing - Given user "Alice" has created file "lorem.txt" in the server - And the user has browsed to the personal page - When the user opens the sidebar for file "lorem.txt" on the webUI - Then the app-sidebar should be visible - When the user closes the app-sidebar using the webUI - Then the app-sidebar should be invisible - - @issue-4244 - Scenario: the sidebar is invisible after opening the selected folder - Given user "Alice" has created file "simple-folder" in the server - And the user has browsed to the personal page - When the user opens folder "simple-folder" using the webUI - Then the app-sidebar should be invisible diff --git a/tests/acceptance/features/webUILogin/openidLogin.feature b/tests/acceptance/features/webUILogin/openidLogin.feature deleted file mode 100644 index 2de9cd1d450..00000000000 --- a/tests/acceptance/features/webUILogin/openidLogin.feature +++ /dev/null @@ -1,47 +0,0 @@ -@openIdLogin @ocis-konnectd-issue-26 -Feature: login users - As a user - I want to be able to log into my account - So that I have access to my files - - As an admin - I want only authorised users to log in - So that unauthorised access is impossible - - Background: - Given user "Alice" has been created with default attributes and without skeleton files in the server - - - Scenario: admin login - Given the user has browsed to the login page - When the user clicks the authenticate button - And the user logs in with username "admin" and password "admin" using the webUI - Then the files table should be displayed - - - Scenario: logging out - Given user "Alice" has logged in using the webUI - And the user has browsed to the personal page - When the user logs out of the webUI - Then the user should be redirected to the IdP login page - - @ocisSmokeTest - Scenario: logging out redirects to the url with state attribute - Given user "Alice" has logged in using the webUI - And the user has browsed to the personal page - When the user logs out of the webUI - Then the user should be on page with the url containing "state=" - When user "Alice" logs in using the webUI - Then the files table should be displayed - - - Scenario: try to login with invalid username - Given the user has browsed to the login page - When the user tries to log in with username "invalid" and password "1234" using the webUI - Then the warning 'Logon failed. Please verify your credentials and try again.' should be displayed on the login page - - - Scenario: try to login with valid username and invalid password - Given the user has browsed to the login page - When the user tries to log in with username "Alice" and password "invalid" using the webUI - Then the warning 'Logon failed. Please verify your credentials and try again.' should be displayed on the login page diff --git a/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature b/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature deleted file mode 100644 index a110c14e5df..00000000000 --- a/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature +++ /dev/null @@ -1,27 +0,0 @@ -Feature: Sharing files and folders with internal users - As a user - I want to share files and folders with other users - So that those users can access the files and folders - - Background: - Given the administrator has set the default folder for received shares to "Shares" in the server - And these users have been created with default attributes and without skeleton files in the server: - | username | - | Alice | - | Brian | - And user "Brian" has created folder "simple-folder" in the server - - @issue-2897 @issue-ocis-2260 @disablePreviews - Scenario: sharing details of items inside a shared folder ("via" info) - Given user "Alice" has created folder "simple-folder" in the server - And user "Alice" has created folder "simple-folder/simple-empty-folder" in the server - And user "Carol" has been created with default attributes and without skeleton files in the server - And user "Alice" has uploaded file with content "test" to "/simple-folder/lorem.txt" in the server - And user "Alice" has shared folder "simple-folder" with user "Brian" in the server - And user "Alice" has logged in using the webUI - And the user opens folder "simple-folder" using the webUI - When the user opens the details dialog for folder "simple-empty-folder" using the webUI - Then the shared-via path in the details dialog should be "/simple-folder" - When the user opens the details dialog for file "lorem.txt" using the webUI - Then the shared-via path in the details dialog should be "/simple-folder" - diff --git a/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature b/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature deleted file mode 100644 index 082a66f0ce9..00000000000 --- a/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature +++ /dev/null @@ -1,104 +0,0 @@ -@files_trashbin-app-required @issue-ocis-web-118 -Feature: files and folders can be deleted from the trashbin - As a user - I want to delete files and folders from the trashbin - So that I can control my trashbin space and which files are kept in that space - - Background: - Given user "Alice" has been created with default attributes and without skeleton files in the server - Given user "Alice" has created file "lorem.txt" in the server - Given user "Alice" has created file "lorem-big.txt" in the server - And user "Alice" has created file "sample,1.txt" in the server - And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has created folder "Folder,With,Comma" in the server - And user "Alice" has created file "simple-folder/lorem.txt" in the server - And user "Alice" has created file "simple-folder/lorem-big.txt" in the server - And user "Alice" has uploaded file "data.zip" to "data.zip" in the server - And the following files have been deleted by user "Alice" in the server - | name | - | lorem.txt | - | simple-folder | - | sample,1.txt | - | lorem-big.txt | - | Folder,With,Comma | - | data.zip | - And user "Alice" has logged in using the webUI - And the user has browsed to the trashbin page - - @issue-product-188 - Scenario: Delete folders from trashbin and check that they are gone - When the user deletes the file "simple-folder" from the deleted files list - And the user deletes the file "Folder,With,Comma" from the deleted files list - Then folder "simple-folder" should not be listed on the webUI - And folder "Folder,With,Comma" should not be listed on the webUI - - @ocisSmokeTest @issue-4582 - Scenario: Select some files and delete from trashbin in a batch - When the user batch deletes these files permanently using the webUI - | name | - | lorem.txt | - | lorem-big.txt | - Then the deleted elements should not be listed on the webUI - And the deleted elements should not be listed on the webUI after a page reload - But file "data.zip" should be listed on the webUI - And folder "simple-folder" should be listed on the webUI - When the user browses to the files page - And file "lorem.txt" should not be listed on the webUI - And file "lorem-big.txt" should not be listed on the webUI - - @issue-4437 - Scenario: Delete single file from deleted files list - When the user deletes the file "lorem.txt" from the deleted files list - Then file "lorem.txt" should not be listed on the webUI - When the user reloads the current page of the webUI - Then file "lorem.txt" should not be listed on the webUI - - @issue-product-139 - Scenario: Clear trashbin - When the user clears the trashbin - Then the "success" message with header "All deleted files were removed" should be displayed on the webUI - And there should be no resources listed on the webUI - - - Scenario: Delete folders with dot in the name from trashbin - Given user "Alice" has created the following folders in the server - | folders | - | fo. | - | fo.1 | - | fo...1.. | - | fo.xyz | - And the following folders have been deleted by user "Alice" in the server - | name | - | fo. | - | fo.1 | - | fo...1.. | - | fo.xyz | - And the user has browsed to the trashbin page - And the user has reloaded the current page of the webUI - When the user batch deletes these files permanently using the webUI - | name | - | fo. | - | fo.1 | - | fo...1.. | - | fo.xyz | - Then the deleted elements should not be listed on the webUI - And the deleted elements should not be listed on the webUI after a page reload - - @issue-product-188 @issue-4582 - Scenario: Select all except for some files and delete from trashbin in a batch - When the user marks all files for batch action using the webUI - And the user unmarks these files for batch action using the webUI - | name | - | lorem.txt | - | lorem-big.txt | - And the user batch deletes the marked files permanently using the webUI - Then file "lorem.txt" should be listed on the webUI - And file "lorem-big.txt" should be listed on the webUI - But file "data.zip" should not be listed on the webUI - And folder "simple-folder" should not be listed on the webUI - - @issue-product-188 @issue-4582 - Scenario: Select all files and delete from trashbin in a batch - When the user marks all files for batch action using the webUI - And the user batch deletes the marked files permanently using the webUI - Then there should be no resources listed on the webUI diff --git a/tests/acceptance/features/webUITrashbinFilesFolders/trashbinFilesFolders.feature b/tests/acceptance/features/webUITrashbinFilesFolders/trashbinFilesFolders.feature deleted file mode 100644 index 3b4cdfa2704..00000000000 --- a/tests/acceptance/features/webUITrashbinFilesFolders/trashbinFilesFolders.feature +++ /dev/null @@ -1,46 +0,0 @@ -@files_trashbin-app-required -Feature: files and folders exist in the trashbin after being deleted - As a user - I want deleted files and folders to be available in the trashbin - So that I can recover data easily - - Background: - Given user "Alice" has been created with default attributes and without skeleton files in the server - And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server - And user "Alice" has uploaded file "lorem-big.txt" to "lorem-big.txt" in the server - And user "Alice" has uploaded file "new-lorem.txt" to "textfile0.txt" in the server - And user "Alice" has uploaded file "testavatar.png" to "testimage.png" in the server - And user "Alice" has created file "sample,1.txt" in the server - And user "Alice" has created file "strängé filename (duplicate #2 &).txt" in the server - And user "Alice" has created folder "Folder,With,Comma" in the server - And user "Alice" has created folder "strängé नेपाली folder" in the server - And user "Alice" has created folder "simple-folder" in the server - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server - And user "Alice" has uploaded file "lorem.txt" to "strängé नेपाली folder/lorem.txt" in the server - And user "Alice" has logged in using the webUI - - @issue-1910 - Scenario: trashbin list appears empty when no deleted files exist - When the user browses to the trashbin page - Then there should be no resources listed on the webUI - - - Scenario: Delete folders with dot in the name and check they are in the trashbin - Given user "Alice" has created the following folders in the server - | folders | - | fo. | - | fo.1 | - | fo...1.. | - | ... | - | ..fo | - | fo.xyz | - And the following folders have been deleted by user "Alice" in the server - | name | - | fo. | - | fo.1 | - | fo...1.. | - | ... | - | ..fo | - | fo.xyz | - When the user browses to the trashbin page - Then the deleted elements should be listed on the webUI diff --git a/tests/e2e/cucumber/features/shares/share.feature b/tests/e2e/cucumber/features/shares/share.feature index 60c7e77eacc..f22b5b0e11a 100644 --- a/tests/e2e/cucumber/features/shares/share.feature +++ b/tests/e2e/cucumber/features/shares/share.feature @@ -190,8 +190,9 @@ Feature: share | myfolder | | mainFolder | And "Alice" creates the following files into personal space using API - | pathToFile | content | - | new.txt | some content | + | pathToFile | content | + | new.txt | some content | + | mainFolder/lorem.txt | lorem epsum | And "Alice" opens the "files" app When "Alice" shares the following resource using the sidebar panel | resource | recipient | type | role | resourceType | expirationDate | @@ -205,6 +206,9 @@ Feature: share | Name | Brian Murphy | | Additional info | brian@example.org | | Type | User | + And "Alice" checks the following access details of share "mainFolder/lorem.txt" for user "Brian" + | Name | Brian Murphy | + | Type | User | And "Alice" sets the expiration date of share "myfolder" of group "sales" to "+3 days" And "Alice" checks the following access details of share "myfolder" for group "sales" | Name | sales department |