diff options
author | max-nextcloud <max@nextcloud.com> | 2022-06-26 18:23:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 18:23:18 +0300 |
commit | 7c81b00332b6e221218dc38d964f41ec673e36ac (patch) | |
tree | d7236e46f15cefc796256871375084c82468fabe | |
parent | 89e2c5fcf2b48d41d860272190c9bd579b6298f9 (diff) | |
parent | 7b889d83e35db1f39423d8fa6efbcf41841dd8c1 (diff) |
Merge pull request #2626 from nextcloud/backport/2603/stable24
[stable24] text: fix cypress selector to find the right image
-rw-r--r-- | cypress/integration/images.spec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cypress/integration/images.spec.js b/cypress/integration/images.spec.js index 74efe74d4..5bde24733 100644 --- a/cypress/integration/images.spec.js +++ b/cypress/integration/images.spec.js @@ -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 |