diff --git a/tests/acceptance/pageObjects/filesPage.js b/tests/acceptance/pageObjects/filesPage.js index 983af7ab73d..f853c45fdd5 100644 --- a/tests/acceptance/pageObjects/filesPage.js +++ b/tests/acceptance/pageObjects/filesPage.js @@ -255,10 +255,9 @@ module.exports = { return ( this.waitForElementVisible('@dialog') .waitForAnimationToFinish() - // 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.dialog.selector, 0, 0) + // clicking new resource dropdown to hide it, 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.newResourceDropdown.selector, 0, 0) .waitForElementNotVisible('@newFolderButton') .click('@dialogConfirmBtn') .waitForElementNotPresent('@dialog') @@ -288,6 +287,9 @@ module.exports = { deleteSelectedButton: { selector: '#delete-selected-btn' }, + newResourceDropdown: { + selector: '#new-file-menu-drop' + }, newFolderButton: { selector: '#new-folder-btn' },