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

View File

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

View File

@ -17,7 +17,6 @@ describe('InvoiceOut summary', () => {
cy.login('developer');
cy.visit(`/#/invoice-out/1/summary`);
});
it('open the descriptors', () => {
cy.get(firstRowDescriptors(1)).click();
cy.get('.descriptor').should('be.visible');
@ -33,9 +32,8 @@ describe('InvoiceOut summary', () => {
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('.descriptor').should('be.visible');
cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
});