Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Mar 13, 2020
1 parent baca28c commit ed6f148
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 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
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,7 @@ module.exports = {
* @param {int} days
*/
shareWithUserOrGroup: async function (
sharee,
shareWithGroup = false,
role,
permissions,
remote = false,
days
sharee, shareWithGroup = false, role, permissions, remote = false, days
) {
await collaboratorDialog.clickCreateShare()
await this.selectCollaboratorForShare(sharee, shareWithGroup, remote)
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 ed6f148

Please sign in to comment.