Skip to content

Commit

Permalink
Merge pull request #7532 from owncloud/fixUploadNightlyFailure
Browse files Browse the repository at this point in the history
[tests-only][full-ci]Refactor code for upload nightly fail
  • Loading branch information
phil-davis authored Aug 26, 2022
2 parents 1a54195 + 013b8e3 commit f254f78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/pageObjects/personalPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ module.exports = {
.waitForElementNotPresent('@dialog')
.waitForAjaxCallsToStartAndFinish()
.waitForElementVisible('@fileUploadStatus')
.closeFileFolderUploadProgress()
return this
},
checkForButtonDisabled: function () {
Expand Down
17 changes: 10 additions & 7 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,16 @@ When('the user uploads a created file {string} using the webUI', function (eleme
return client.page.personalPage().uploadFile(uploadPath)
})

When('the user uploads a created file {string} with overwrite using the webUI', function (element) {
const uploadPath = path.join(client.globals.mountedUploadDir, element)
return client.page
.personalPage()
.selectFileForUpload(uploadPath)
.then(() => client.page.personalPage().confirmFileOverwrite())
})
When(
'the user uploads a created file {string} with overwrite using the webUI',
async function (file) {
const uploadPath = path.join(client.globals.mountedUploadDir, file)
await client.page.personalPage().selectFileForUpload(uploadPath)
await client.page.personalPage().confirmFileOverwrite()

return this
}
)

When('the public uploads file/folder {string} in files-drop page', function (element) {
const rootUploadDir = client.globals.mountedUploadDir
Expand Down

0 comments on commit f254f78

Please sign in to comment.