refactor: refs #8484 add data-cy attribute for claim photo image and update test to use it
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
8a8233b82f
commit
63ef21d78e
|
@ -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
|
||||
|
|
|
@ -23,18 +23,20 @@ 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.waitForElement('[data-cy="claimPhoto_img"] .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.get('.q-carousel__control > button').as('nextButton').click();
|
||||
|
||||
cy.get('.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon')
|
||||
.as('closeButton')
|
||||
.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',
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue