Skip to content

Commit

Permalink
refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Mar 6, 2020
1 parent a1139ac commit 804ef17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ module.exports = {
.waitForOutstandingAjaxCalls()
.waitForElementNotPresent('@addShareSaveButton')
},
saveCollaboratorEditForm: function () {
saveChanges: function () {
return this.waitForElementVisible('@saveShareButton')
.initAjaxCounters()
.click('@saveShareButton')
Expand Down Expand Up @@ -268,7 +268,7 @@ module.exports = {
}
}
if (changed) {
await this.saveCollaboratorEditForm()
await this.saveChanges()
} else {
await this.clickCancel()
}
Expand Down Expand Up @@ -298,7 +298,7 @@ module.exports = {
for (const permission of enabledPermissions) {
await this.toggleSinglePermission(permission)
}
await this.saveCollaboratorEditForm()
await this.saveChanges()
},
/**
*
Expand Down Expand Up @@ -370,7 +370,7 @@ module.exports = {
changeCollaboratorRole: async function (collaborator, newRole) {
await collaboratorDialog.clickEditShare(collaborator)
await this.changeCollaboratorRoleInDropdown(newRole)
return this.saveCollaboratorEditForm()
return this.saveChanges()
},
/**
* @params {string} newRole
Expand Down Expand Up @@ -498,7 +498,7 @@ module.exports = {
.FilesPageElement
.publicLinksDialog()
.setPublicLinkExpiryDate(value)
return this.saveCollaboratorEditForm()
return this.saveChanges()
}
},
elements: {
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/stepDefinitions/sharingContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ Given('user {string} has created a new share with following settings',
function (sharer, dataTable) {
const settings = dataTable.rowsHash()
let expireDate = settings.expireDate
if (typeof settings.expireDate !== 'undefined') {
expireDate = sharingHelper.calculateDate(settings.expireDate)
if (typeof expireDate !== 'undefined') {
expireDate = sharingHelper.calculateDate(expireDate)
}
return shareFileFolder(
settings.path,
Expand Down

0 comments on commit 804ef17

Please sign in to comment.