Skip to content

Commit

Permalink
Merge pull request #6170 from owncloud/expiration-date-fail
Browse files Browse the repository at this point in the history
[tests-only][full-ci]Fix expiration date failing tests
  • Loading branch information
dpakach authored Dec 20, 2021
2 parents 273781e + bbb7328 commit 0407f3d
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,17 @@ module.exports = {
return this.click('@publicLinkDeleteExpirationDateButton')
}
const dateToSet = new Date(Date.parse(value))
client.execute(
`document.querySelector('#oc-files-file-link-expire-date').__vue__.$refs.calendar.move(new Date(Date.parse('${value}')))`,
[]
)
if (shareType === 'link') {
client.execute(
`document.querySelector('#oc-files-file-link-expire-date').__vue__.$refs.calendar.move(new Date(Date.parse('${value}')))`,
[]
)
} else {
client.execute(
`document.querySelector('.files-recipient-expiration-datepicker').__vue__.$refs.calendar.move(new Date(Date.parse('${value}')))`,
[]
)
}

if (shareType === 'collaborator' || shareType === 'link') {
const disabled = await this.isExpiryDateDisabled(dateToSet)
Expand Down

0 comments on commit 0407f3d

Please sign in to comment.