Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Mar 12, 2020
1 parent f906430 commit 194d865
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/helpers/sharingHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ module.exports = {
} else if (expectedDetail.field === 'expiration') {
expectedDetail.value = sharingHelper.calculateDate(expectedDetail.value)
}

if (!(expectedDetail.field in share) || share[expectedDetail.field].toString() !== expectedDetail.value) {
found = false
break
Expand Down
12 changes: 3 additions & 9 deletions tests/acceptance/stepDefinitions/sharingContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ const assertUsersGroupsWithPatternInAutocompleteListExcluding = async function (
* @param {boolean} remote
*/
const userSharesFileOrFolderWithUserOrGroupWithExpirationDate = async function ({
resource, sharee, days,
shareWithGroup = false, remote = false
resource, sharee, days, shareWithGroup = false, remote = false
}) {
const api = client.page
.FilesPageElement
Expand All @@ -342,12 +341,7 @@ const userSharesFileOrFolderWithUserOrGroupWithExpirationDate = async function (
.openSharingDialog(resource)

return api.sharingDialog().shareWithUserOrGroup(
sharee,
shareWithGroup,
'Viewer',
undefined,
remote,
days
sharee, shareWithGroup, 'Viewer', undefined, remote, days
)
}

Expand Down Expand Up @@ -1017,7 +1011,7 @@ When('the user (tries to )share/shares file/folder/resource {string} with user {
return userSharesFileOrFolderWithUserOrGroupWithExpirationDate({ resource, sharee, days })
})

When('the user (tries to )share/shares file/folder/resource {string} with group {string} which expires after {int} day/days using the webUI',
When('the user tries to share file/folder/resource {string} with group {string} which expires after {int} day/days using the webUI',
function (resource, sharee, days) {
return userSharesFileOrFolderWithUserOrGroupWithExpirationDate(
{
Expand Down

0 comments on commit 194d865

Please sign in to comment.