From f7f12b8c3b75a498c845b33ece4292f6aa52416a Mon Sep 17 00:00:00 2001 From: provira Date: Thu, 27 Feb 2025 12:40:01 +0100 Subject: [PATCH] fix: refs #8417 fixed claimPhoto e2e test --- .../integration/claim/claimPhoto.spec.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js index c3522cbfe..f62a9e313 100755 --- a/test/cypress/integration/claim/claimPhoto.spec.js +++ b/test/cypress/integration/claim/claimPhoto.spec.js @@ -1,6 +1,6 @@ /// // redmine.verdnatura.es/issues/8417 -describe.skip('ClaimPhoto', () => { +describe('ClaimPhoto', () => { beforeEach(() => { const claimId = 1; cy.login('developer'); @@ -16,6 +16,7 @@ describe.skip('ClaimPhoto', () => { }); it('should add new file with drag and drop', () => { + cy.get('.container').should('be.visible').and('exist'); cy.get('.container').selectFile('test/cypress/fixtures/image.jpg', { action: 'drag-drop', }); @@ -23,12 +24,8 @@ describe.skip('ClaimPhoto', () => { }); it('should open first image dialog change to second and close', () => { - cy.get(':nth-last-child(1) > .q-card').click(); - cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( - 'be.visible', - ); - - cy.get('.q-carousel__control > button').click(); + cy.get(':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image').click(); + cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click(); cy.get( '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon', @@ -39,17 +36,13 @@ describe.skip('ClaimPhoto', () => { }); it('should remove third and fourth file', () => { - cy.get( - '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon', - ).click(); + cy.dataCy('delete-button-4').click(); cy.get( '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block', ).click(); cy.get('.q-notification__message').should('have.text', 'Data deleted'); - cy.get( - '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon', - ).click(); + cy.dataCy('delete-button-3').click(); cy.get( '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block', ).click();