diff --git a/tests/acceptance/helpers/sharingHelper.js b/tests/acceptance/helpers/sharingHelper.js index bcdd2948ad6..ce9888b2bfa 100644 --- a/tests/acceptance/helpers/sharingHelper.js +++ b/tests/acceptance/helpers/sharingHelper.js @@ -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 diff --git a/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js b/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js index 9391f7350c8..d3ed299fe67 100644 --- a/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js +++ b/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js @@ -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) diff --git a/tests/acceptance/stepDefinitions/sharingContext.js b/tests/acceptance/stepDefinitions/sharingContext.js index 1c2f6f464a1..3f1fc8a0b1e 100644 --- a/tests/acceptance/stepDefinitions/sharingContext.js +++ b/tests/acceptance/stepDefinitions/sharingContext.js @@ -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 @@ -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 ) } @@ -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( {