Skip to content

Commit

Permalink
Merge pull request owncloud#5123 from owncloud/fix-markdown-editor-test
Browse files Browse the repository at this point in the history
[Tests-Only] wait for markdown page after opening file in markdown editor
  • Loading branch information
phil-davis authored May 19, 2021
2 parents dde78b8 + 51a0345 commit bf4bac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/acceptance/pageObjects/markdownEditorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ module.exports = {
.clearValueWithEvent('@editorTextarea')
.setValue('@editorTextarea', content)
},
waitForPageLoaded: function() {
return this.waitForElementVisible('@editorTextarea')
},
/**
* appends new content to the existing content
* @param {string} content
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/stepDefinitions/markdownEditorContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const filesList = client.page.FilesPageElement.filesList()

Given('the user has opened file {string} in the markdown editor webUI', async fileName => {
await filesList.clickOnFileName(fileName)
await markdownEditor.waitForPageLoaded()
const actualFileName = await markdownEditor.getFileName()
return assertEqualText(fileName, actualFileName)
})
Expand Down

0 comments on commit bf4bac0

Please sign in to comment.