From 912126c54b1b291b5e810b3f9744b6054d057b44 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Thu, 7 Sep 2023 17:56:00 +0200 Subject: [PATCH 1/2] changed search test --- .drone.star | 2 +- ...-failures-with-ocis-server-ocis-storage.md | 3 - .../features/webUIFilesSearch/search.feature | 67 ------------------- tests/acceptance/pageObjects/webPage.js | 30 --------- .../stepDefinitions/searchContext.js | 6 -- .../cucumber/features/smoke/search.feature | 16 +++++ 6 files changed, 17 insertions(+), 107 deletions(-) delete mode 100644 tests/acceptance/features/webUIFilesSearch/search.feature delete mode 100644 tests/acceptance/stepDefinitions/searchContext.js diff --git a/.drone.star b/.drone.star index e5f770f488f..9c599b36f44 100644 --- a/.drone.star +++ b/.drone.star @@ -16,7 +16,7 @@ OC_CI_HUGO = "owncloudci/hugo:0.115.2" OC_CI_NODEJS = "owncloudci/nodejs:18" OC_CI_PHP = "owncloudci/php:7.4" OC_CI_WAIT_FOR = "owncloudci/wait-for:latest" -OC_TESTING_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.8.3" +OC_TESTING_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.8.5" OC_UBUNTU = "owncloud/ubuntu:20.04" PLUGINS_DOCKER = "plugins/docker:20.14" PLUGINS_GH_PAGES = "plugins/gh-pages:1" diff --git a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md index c84932e1c3b..cbf8b2deb36 100644 --- a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md +++ b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md @@ -56,9 +56,6 @@ Other free text and markdown formatting can be used elsewhere in the document if ### [Listing shares via ocs API does not show path for parent folders](https://github.com/owncloud/ocis/issues/1231) - [webUISharingPublicManagement/shareByPublicLink.feature:110](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature#L111) -### [Propfind response to trashbin endpoint is different in ocis](https://github.com/owncloud/product/issues/186) -- [webUIFilesSearch/search.feature:60](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L60) - ### [Conflict / overwrite issues with TUS](https://github.com/owncloud/ocis/issues/1294) - [webUIUpload/uploadFileGreaterThanQuotaSize.feature:11](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/uploadFileGreaterThanQuotaSize.feature#L11) diff --git a/tests/acceptance/features/webUIFilesSearch/search.feature b/tests/acceptance/features/webUIFilesSearch/search.feature deleted file mode 100644 index 63d18639c83..00000000000 --- a/tests/acceptance/features/webUIFilesSearch/search.feature +++ /dev/null @@ -1,67 +0,0 @@ -@skipOnOC10 @issue-ocis-6378 @issue-ocis-1330 -Feature: Search - - As a user - I would like to be able to search for files - So that I can find needed files quickly - - Background: - Given these users have been created with default attributes and without skeleton files in the server: - | username | - | Alice | - | user0 | - And user "Alice" has created the following folders in the server - | entry_name | - | simple-folder | - | simple-empty-folder | - | strängé नेपाली folder | - And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server - And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server - And user "Alice" has logged in using the webUI - And the user has reloaded the current page of the webUI - - - Scenario: Search for a newly uploaded file - When the user uploads file "simple.pdf" using the webUI - And the user opens folder "simple-folder" directly on the webUI - And the user uploads file "simple.odt" using the webUI - And the user browses to the files page - And the user searches for "simple" using the webUI - Then file "simple.pdf" should be listed on the webUI - And file "simple-folder/simple.odt" should be listed on the webUI - - - Scenario: Search for files with difficult names - Given user "Alice" has uploaded file with content "does-not-matter" to "/strängéनेपालीloremfile.txt" in the server - And the user has reloaded the current page of the webUI - When the user searches for "lorem" using the webUI - Then file "strängéनेपालीloremfile.txt" should be listed on the webUI - - - Scenario: Search for files with difficult names and difficult search phrase - Given user "Alice" has uploaded file with content "does-not-matter" to "/strängéनेपालीloremfile.txt" in the server - And the user has reloaded the current page of the webUI - When the user searches for "strängéनेपाली" using the webUI - Then file "strängéनेपालीloremfile.txt" should be listed on the webUI - - - Scenario: Search for deleted folder in the trashbin - Given user "Alice" has created folder "deleted folder" in the server - And user "Alice" has created folder "not deleted folder" in the server - And the following files have been deleted by user "Alice" in the server - | name | - | deleted folder | - When the user browses to the trashbin page - And the user searches for "folder" using the webUI - Then folder "not deleted folder" should be listed on the webUI - And folder "deleted folder" should not be listed on the webUI - - - Scenario: Delete file from search list - Given user "Alice" has uploaded file with content "uploaded content" to "file-to-delete.txt" in the server - When the user reloads the current page of the webUI - When the user searches for "file-to" using the webUI - And the user deletes file "file-to-delete.txt" using the webUI - Then file "file-to-delete.txt" should not be listed on the webUI - And as "Alice" file "file-to-delete.txt" should not exist in the server - And as "Alice" the file with original path "file-to-delete.txt" should exist in the trashbin in the server diff --git a/tests/acceptance/pageObjects/webPage.js b/tests/acceptance/pageObjects/webPage.js index 6e14904b5e5..9749a7a892d 100644 --- a/tests/acceptance/pageObjects/webPage.js +++ b/tests/acceptance/pageObjects/webPage.js @@ -1,42 +1,12 @@ const util = require('util') const { client } = require('nightwatch-api') const { join } = require('../helpers/path') -const { defaultUsers } = require('../helpers/userSettings') module.exports = { url: function () { return join(this.api.launchUrl, '/') }, commands: { - /** - * - * @param {string} searchTerm - */ - search: async function (searchTerm) { - // wait for search indexing to be finished - await this.pause(2000) - return this.initAjaxCounters() - .isVisible( - { - selector: '@openSearchButton', - suppressNotFoundErrors: true - }, - (result) => { - if (result.value === true) { - this.click('@openSearchButton') - .waitForElementVisible('@searchInputField') - .setValue('@searchInputField', [searchTerm, this.api.Keys.ENTER]) - } else { - this.waitForElementVisible('@searchInputField').setValue('@searchInputField', [ - searchTerm, - this.api.Keys.ENTER - ]) - } - } - ) - .waitForElementNotVisible('@searchLoadingIndicator') - .waitForOutstandingAjaxCalls() - }, /** * @param {string} page */ diff --git a/tests/acceptance/stepDefinitions/searchContext.js b/tests/acceptance/stepDefinitions/searchContext.js deleted file mode 100644 index e3aed0b093c..00000000000 --- a/tests/acceptance/stepDefinitions/searchContext.js +++ /dev/null @@ -1,6 +0,0 @@ -const { client } = require('nightwatch-api') -const { When } = require('@cucumber/cucumber') - -When('the user searches for {string} using the webUI', function (searchTerm) { - return client.page.webPage().search(searchTerm) -}) diff --git a/tests/e2e/cucumber/features/smoke/search.feature b/tests/e2e/cucumber/features/smoke/search.feature index 72176527266..ff55f815926 100644 --- a/tests/e2e/cucumber/features/smoke/search.feature +++ b/tests/e2e/cucumber/features/smoke/search.feature @@ -34,6 +34,7 @@ Feature: Search | resource | type | | folder | folder | | FolDer/child-one/child-two | folder | + | strängéनेपालीName | folder | And "Alice" enables the option to display the hidden file And "Alice" uploads the following resources | resource | @@ -105,6 +106,21 @@ Feature: Search | folder | | FolDer | + + # search difficult names + When "Alice" searches "strängéनेपालीName" using the global search and the "everywhere" filter and presses enter + Then following resources should be displayed in the files list for user "Alice" + | strängéनेपालीName | + + # deleting folder from search result and search deleted resource + When "Alice" deletes the following resource using the sidebar panel + | resource | from | + | strängéनेपालीName | | + And "Alice" searches "forDeleting" using the global search and the "everywhere" filter + Then following resources should not be displayed in the search list for user "Alice" + | resource | + | strängéनेपालीName | + And "Alice" navigates to the shared with me page When "Alice" reshares the following resource | resource | recipient | type | role | resourceType | From aaa5c1d01c3886d4e48393e8715c4d37ed889c74 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Fri, 8 Sep 2023 10:20:46 +0200 Subject: [PATCH 2/2] remove webUIFilesSearch from dron.star --- .drone.star | 2 -- 1 file changed, 2 deletions(-) diff --git a/.drone.star b/.drone.star index 9c599b36f44..03c60a83fa9 100644 --- a/.drone.star +++ b/.drone.star @@ -107,7 +107,6 @@ config = { "oCISFiles2": [ "webUIFilesList", "webUIFilesDetails", - "webUIFilesSearch", ], "oCISFiles3": [ "webUIRenameFiles", @@ -219,7 +218,6 @@ basicTestSuites = [ "webUIFilesCopy", "webUIFilesDetails", "webUIFilesList", - "webUIFilesSearch", "webUILogin", "webUIMoveFilesFolders", "webUIOperationsWithFolderShares",