Skip to content

Commit

Permalink
Merge pull request #2626 from nextcloud/backport/2603/stable24
Browse files Browse the repository at this point in the history
[stable24] text: fix cypress selector to find the right image
  • Loading branch information
max-nextcloud authored Jun 26, 2022
2 parents 89e2c5f + 7b889d8 commit 7c81b00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cypress/integration/images.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ const clickOnImageAction = (actionIndex, callback) => {
*/
const checkImage = (documentId, imageName, imageId, index) => {
const encodedName = fixedEncodeURIComponent(imageName)
const src = `.attachments.${documentId}/${encodedName}`

cy.log('Check the image is visible and well formed', { documentId, imageName, imageId, index, encodedName })
cy.log('Check the image is visible and well formed', documentId, imageName, imageId, index, encodedName)
return new Cypress.Promise((resolve, reject) => {
cy.get('#editor [data-component="image-view"]')
.filter('[data-src=".attachments.' + documentId + '/' + encodedName + '"]')
cy.get(`#editor [data-component="image-view"][data-src="${src}"]`)
.find('.image__view') // wait for load finish
.within(($el) => {
// keep track that we have created this image in the attachment dir
Expand Down

0 comments on commit 7c81b00

Please sign in to comment.