Skip to content

Commit

Permalink
Fix expiration date failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SwikritiT committed Dec 20, 2021
1 parent 273781e commit bbb7328
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 bbb7328

Please sign in to comment.