Skip to content

Commit

Permalink
Merge pull request #2808 from owncloud/remove-unnecessary-await
Browse files Browse the repository at this point in the history
Remove unnecessary async-await
  • Loading branch information
haribhandari07 authored Jan 3, 2020
2 parents 732eba8 + a3ae63c commit 68acdbf
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 52 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"sourceType": "module"
},
"rules": {
"require-await": "warn"
},
"globals": {
"require": false,
Expand Down
2 changes: 1 addition & 1 deletion apps/files/src/components/Trashbin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default {
const self = this
function deleteFile (file) {
return async () => {
return () => {
return self.$client.fileTrash.clearTrashBin(file.id)
.then(() => {
self.$_ocTrashbin_removeFileFromList([file])
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/helpers/filesFoldersHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports.getAllFiles = async function (user) {
return filenames.filter(elements => !elements.endsWith('/'))
}

exports.getElementsMatchingPattern = async function (pattern, files) {
exports.getElementsMatchingPattern = function (pattern, files) {
return files.filter(elements => elements.toLowerCase().includes(pattern))
}

Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/pageObjects/FilesPageElement/filesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ module.exports = {
* @returns {Promise.<[]>} Array of files/folders element
*/
allFileRows: async function () {
this
await this
.waitForElementNotPresent('@filesListProgressBar')
.waitForElementVisible({
selector: '@fileRows',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ module.exports = {
*
* @returns {Promise.<string[]>} Array of autocomplete webElementIds
*/
deleteShareWithUserGroup: async function (item) {
deleteShareWithUserGroup: function (item) {
const informationSelector = util.format(this.elements.collaboratorInformationByCollaboratorName.selector, item)
const deleteSelector = informationSelector + this.elements.deleteShareButton.selector
return this
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/pageObjects/phoenixPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
.click('@messageCloseIcon')
.waitForElementNotPresent('@messageCloseIcon')
},
toggleNotificationDrawer: async function () {
toggleNotificationDrawer: function () {
return this.waitForElementVisible('@notificationBell').click('@notificationBell')
},
/**
Expand Down
94 changes: 47 additions & 47 deletions tests/acceptance/stepDefinitions/filesContext.js

Large diffs are not rendered by default.

0 comments on commit 68acdbf

Please sign in to comment.