fix: refs #8417 fixed claimPhoto e2e test
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
PAU ROVIRA ROSALENY 2025-02-27 12:40:01 +01:00
parent c3c8a78fd8
commit f7f12b8c3b
1 changed files with 6 additions and 13 deletions

View File

@ -1,6 +1,6 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
// redmine.verdnatura.es/issues/8417 // redmine.verdnatura.es/issues/8417
describe.skip('ClaimPhoto', () => { describe('ClaimPhoto', () => {
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,12 +24,8 @@ 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.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( cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click();
'be.visible',
);
cy.get('.q-carousel__control > button').click();
cy.get( cy.get(
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon', '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
@ -39,17 +36,13 @@ describe.skip('ClaimPhoto', () => {
}); });
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();