refactor: refs #8484 add data-cy attribute for claim photo image and update test to use it

This commit is contained in:
Jorge Penadés 2025-02-26 13:38:01 +01:00
parent b91f159061
commit f100ce6cc4
2 changed files with 2 additions and 3 deletions

View File

@ -227,6 +227,7 @@ function onDrag() {
class="rounded-borders cursor-pointer fit"
@click="openDialog(media.dmsFk)"
v-if="!media.isVideo"
data-cy="claimPhoto_img"
>
</QImg>
<video

View File

@ -23,9 +23,7 @@ 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')
.as('firstImage')
.click();
cy.dataCy('claimPhoto_img').click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
'be.visible',
);