fix: #8417 fixed claimPhoto e2e test #1512

Merged
provira merged 26 commits from 8417-e2eClaimPhoto into dev 2025-03-05 07:26:55 +00:00
1 changed files with 11 additions and 4 deletions
Showing only changes of commit e2a9eadf44 - Show all commits

View File

@ -1,5 +1,4 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
// redmine.verdnatura.es/issues/8417
describe('ClaimPhoto', () => { describe('ClaimPhoto', () => {
beforeEach(() => { beforeEach(() => {
const claimId = 1; const claimId = 1;
@ -23,13 +22,21 @@ describe('ClaimPhoto', () => {
cy.get('.q-notification__message').should('have.text', 'Data saved'); cy.get('.q-notification__message').should('have.text', 'Data saved');
}); });
it('should open first image dialog change to second and close', () => { it.only('should open first image dialog change to second and close', () => {
cy.dataCy('file-1').click(); cy.waitForElement('[data-cy="file-1"] .q-img__image--loaded');
cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click(); 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( cy.get(
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon', '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
).click(); ).click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
'not.be.visible', 'not.be.visible',
); );