From e2a9eadf444d673076c868cb2e074209f3712be5 Mon Sep 17 00:00:00 2001 From: provira Date: Mon, 3 Mar 2025 08:58:56 +0100 Subject: [PATCH] fix: refs #8417 fixed failing test case --- test/cypress/integration/claim/claimPhoto.spec.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js index 3a9e43f17..d534db71f 100755 --- a/test/cypress/integration/claim/claimPhoto.spec.js +++ b/test/cypress/integration/claim/claimPhoto.spec.js @@ -1,5 +1,4 @@ /// -// redmine.verdnatura.es/issues/8417 describe('ClaimPhoto', () => { beforeEach(() => { const claimId = 1; @@ -23,13 +22,21 @@ describe('ClaimPhoto', () => { cy.get('.q-notification__message').should('have.text', 'Data saved'); }); - it('should open first image dialog change to second and close', () => { - cy.dataCy('file-1').click(); - cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click(); + it.only('should open first image dialog change to second and close', () => { + cy.waitForElement('[data-cy="file-1"] .q-img__image--loaded'); + cy.get( + ':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image', + ).click(); + cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( + 'be.visible', + ); + + cy.get('.q-carousel__control > button').as('nextButton').click(); cy.get( '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon', ).click(); + cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( 'not.be.visible', );