Skip to content

Commit

Permalink
Mouse-click on overwrite dialog overlay to remove file upload popup
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Nov 21, 2019
1 parent f374011 commit 5bc7a4e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tests/acceptance/pageObjects/filesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,14 @@ module.exports = {
})
},
confirmFileOverwrite: function () {
return this
.waitForElementVisible('@fileOverwriteConfirm')
.click('@fileOverwriteConfirm')
.waitForElementNotVisible('@fileOverwriteConfirm')
return this.waitForElementVisible('@fileOverwriteConfirm')
// clicking file overwrite dialog overlay to remove file upload
// popup, as we upload the file directly using `setValue`. The overwrite
// dialog is too fast and does not give time to close the dropdown beforehand
.clickElementAt(this.elements.fileOverwriteDialog.selector, 0, 0)
.waitForElementNotVisible(this.elements.newFolderButton.selector)
.click(this.elements.fileOverwriteConfirm.selector)
.waitForElementNotVisible(this.elements.fileOverwriteConfirm.selector)
.waitForAjaxCallsToStartAndFinish()
},
createNewFile: function (newFileName) {
Expand Down Expand Up @@ -414,7 +418,9 @@ module.exports = {
fileOverwriteConfirm: {
selector: '#files-overwrite-confirm'
},

fileOverwriteDialog: {
selector: '#overwrite-dialog'
},
/**
* path from inside the side-bar
*/
Expand Down

0 comments on commit 5bc7a4e

Please sign in to comment.