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 9 additions and 15 deletions
Showing only changes of commit 44be16e43a - Show all commits

View File

@ -1,5 +1,7 @@
/// <reference types="cypress" />
describe('ClaimPhoto', () => {
const carrouselClose = '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon';
const carrousel = '.q-carousel__slide > .q-img > .q-img__container > .q-img__image';
beforeEach(() => {
const claimId = 1;
cy.login('developer');
@ -23,23 +25,15 @@ describe('ClaimPhoto', () => {
});
it('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.dataCy('file-1').click();
cy.get(carrouselClose).click();
cy.get(carrousel).should('not.be.visible');
cy.dataCy('file-1').click();
cy.get(carrousel).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',
);
cy.get(carrouselClose,).click();
cy.get(carrousel).should('not.be.visible');
});
it('should remove third and fourth file', () => {