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
3 changed files with 15 additions and 23 deletions

View File

@ -210,6 +210,7 @@ function onDrag() {
class="all-pointer-events absolute delete-button zindex" class="all-pointer-events absolute delete-button zindex"
@click.stop="viewDeleteDms(index)" @click.stop="viewDeleteDms(index)"
round round
:data-cy="`delete-button-${index+1}`"
/> />
<QIcon <QIcon
name="play_circle" name="play_circle"
@ -227,6 +228,7 @@ function onDrag() {
class="rounded-borders cursor-pointer fit" class="rounded-borders cursor-pointer fit"
@click="openDialog(media.dmsFk)" @click="openDialog(media.dmsFk)"
v-if="!media.isVideo" v-if="!media.isVideo"
:data-cy="`file-${index+1}`"
> >
</QImg> </QImg>
<video <video
@ -235,6 +237,7 @@ function onDrag() {
muted="muted" muted="muted"
v-if="media.isVideo" v-if="media.isVideo"
@click="openDialog(media.dmsFk)" @click="openDialog(media.dmsFk)"
:data-cy="`file-${index+1}`"
/> />
</QCard> </QCard>
</div> </div>

View File

@ -1,6 +1,6 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
// redmine.verdnatura.es/issues/8417 describe('ClaimPhoto', () => {
describe.skip('ClaimPhoto', () => { const carrouselClose = '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon';
beforeEach(() => { beforeEach(() => {
const claimId = 1; const claimId = 1;
cy.login('developer'); cy.login('developer');
@ -16,6 +16,7 @@ describe.skip('ClaimPhoto', () => {
}); });
it('should add new file with drag and drop', () => { it('should add new file with drag and drop', () => {
cy.get('.container').should('be.visible').and('exist');
cy.get('.container').selectFile('test/cypress/fixtures/image.jpg', { cy.get('.container').selectFile('test/cypress/fixtures/image.jpg', {
action: 'drag-drop', action: 'drag-drop',
}); });
@ -23,33 +24,23 @@ describe.skip('ClaimPhoto', () => {
}); });
it('should open first image dialog change to second and close', () => { it('should open first image dialog change to second and close', () => {
cy.get(':nth-last-child(1) > .q-card').click(); cy.dataCy('file-1').click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( cy.get(carrouselClose).click();
'be.visible',
);
cy.get('.q-carousel__control > button').click(); cy.dataCy('file-1').click();
cy.get('.q-carousel__control > button').as('nextButton').click();
cy.get( cy.get('.q-carousel__slide > .q-ma-none').should('be.visible');
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon', cy.get(carrouselClose).click();
).click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
'not.be.visible',
);
}); });
it('should remove third and fourth file', () => { it('should remove third and fourth file', () => {
cy.get( cy.dataCy('delete-button-4').click();
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get( cy.get(
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block', '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click(); ).click();
cy.get('.q-notification__message').should('have.text', 'Data deleted'); cy.get('.q-notification__message').should('have.text', 'Data deleted');
cy.get( cy.dataCy('delete-button-3').click();
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get( cy.get(
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block', '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click(); ).click();

View File

@ -17,7 +17,6 @@ describe('InvoiceOut summary', () => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/invoice-out/1/summary`); cy.visit(`/#/invoice-out/1/summary`);
}); });
it('open the descriptors', () => { it('open the descriptors', () => {
cy.get(firstRowDescriptors(1)).click(); cy.get(firstRowDescriptors(1)).click();
cy.get('.descriptor').should('be.visible'); cy.get('.descriptor').should('be.visible');
@ -33,9 +32,8 @@ describe('InvoiceOut summary', () => {
cy.get('.q-item > .q-item__label').should('include.text', '1101'); cy.get('.q-item > .q-item__label').should('include.text', '1101');
}); });
it.skip('should open the ticket list', () => { it('should open the ticket list', () => {
cy.get(toTicketList).click(); cy.get(toTicketList).click();
cy.get('.descriptor').should('be.visible');
cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111'); cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
}); });