refactor: refs #8484 simplify image dialog test by using aliases for elements
gitea/salix-front/pipeline/pr-dev Build queued... Details

This commit is contained in:
Jorge Penadés 2025-02-26 13:30:39 +01:00
parent bc2b5976d9
commit b91f159061
1 changed files with 7 additions and 7 deletions

View File

@ -23,18 +23,18 @@ describe('ClaimPhoto', () => {
});
it('should open first image dialog change to second and close', () => {
cy.get(
':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image',
).click();
cy.get(':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image')
.as('firstImage')
.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('.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-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon')
.as('closeButton')
.click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
'not.be.visible',
);