Skip to content

Commit

Permalink
changed search test
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Sep 7, 2023
1 parent dbd8a94 commit 5445dd1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
67 changes: 0 additions & 67 deletions tests/acceptance/features/webUIFilesSearch/search.feature

This file was deleted.

30 changes: 0 additions & 30 deletions tests/acceptance/pageObjects/webPage.js
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
6 changes: 0 additions & 6 deletions tests/acceptance/stepDefinitions/searchContext.js

This file was deleted.

16 changes: 16 additions & 0 deletions tests/e2e/cucumber/features/smoke/search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down

0 comments on commit 5445dd1

Please sign in to comment.