refactor: refs #8484 clean up test files by removing commented issue references and updating test cases
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-02-17 11:27:31 +01:00
parent 67865b26af
commit b43813d3b3
9 changed files with 19 additions and 25 deletions

View File

@ -35,7 +35,6 @@ describe('ClaimDevelopment', () => {
cy.saveCard();
});
// TODO: #8112
it('should add and remove new line', () => {
cy.wait(['@workers', '@workers']);
cy.addCard();

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" />
// redmine.verdnatura.es/issues/8417
describe('ClaimPhoto', () => {
beforeEach(() => {
const claimId = 1;
@ -24,36 +24,36 @@ 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'
':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'
'be.visible',
);
cy.get('.q-carousel__control > .q-btn > .q-btn__content > .q-icon').click();
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',
).click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
'not.be.visible'
'not.be.visible',
);
});
it('should remove third and fourth file', () => {
cy.get(
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get(
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
'.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-child(3) > .q-btn > .q-btn__content > .q-icon'
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get(
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click();
cy.get('.q-notification__message').should('have.text', 'Data deleted');
});

View File

@ -21,7 +21,7 @@ describe('InvoiceInList', () => {
cy.url().should('include', `/invoice-in/${id}/summary`);
});
});
// https://redmine.verdnatura.es/issues/8420
it('should open the details', () => {
cy.get(firstDetailBtn).click();
cy.get(summaryHeaders).eq(1).contains('Basic data');

View File

@ -15,7 +15,7 @@ describe('Item list', () => {
cy.get('.q-menu .q-item').contains('Anthurium').click();
cy.get('.q-virtual-scroll__content > :nth-child(4) > :nth-child(4)').click();
});
// https://redmine.verdnatura.es/issues/8421
it('should create an item', () => {
const data = {
Description: { val: `Test item` },
@ -29,7 +29,7 @@ describe('Item list', () => {
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('Data created');
cy.get(
':nth-child(2) > .q-drawer > .q-drawer__content > .q-scrollarea > .q-scrollarea__container > .q-scrollarea__content'
':nth-child(2) > .q-drawer > .q-drawer__content > .q-scrollarea > .q-scrollarea__container > .q-scrollarea__content',
).should('be.visible');
});
});

View File

@ -17,7 +17,7 @@ describe('Item tag', () => {
cy.checkNotification("The tag or priority can't be repeated for an item");
});
it.skip('should add a new tag', () => {
it('should add a new tag', () => {
cy.get('.q-page').should('be.visible');
cy.get('.q-page-sticky > div').click();
cy.get('.q-page-sticky > div').click();

View File

@ -1,5 +1,4 @@
/// <reference types="cypress" />
// https://redmine.verdnatura.es/issues/8423
describe('Ticket expedtion', () => {
const tableContent = '.q-table .q-virtual-scroll__content';
const stateTd = 'td:nth-child(9)';

View File

@ -14,7 +14,7 @@ describe('TicketSale', () => {
cy.get(firstRow).find('.q-checkbox__inner').click();
};
it.skip('it should add item to basket', () => {
it('it should add item to basket', () => {
cy.window().then((win) => {
cy.stub(win, 'open').as('windowOpen');
});

View File

@ -18,11 +18,11 @@ describe('WorkerNotificationsManager', () => {
cy.visit(`/#/worker/${salesPersonId}/notifications`);
cy.get(firstAvailableNotification).click();
cy.checkNotification(
'The notification subscription of this worker cant be modified'
'The notification subscription of this worker cant be modified',
);
});
it.skip('should active a notification that is yours', () => {
it('should active a notification that is yours', () => {
cy.login('developer');
cy.visit(`/#/worker/${developerId}/notifications`);
cy.waitForElement(activeList);

View File

@ -58,16 +58,13 @@ Cypress.Commands.add('login', (user = 'developer') => {
});
Cypress.Commands.add('domContentLoad', (timeout = 5000) => {
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'), {
timeout,
interval: 5000,
});
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
});
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
originalFn(url, options);
cy.domContentLoad();
});
});
Cypress.Commands.add('waitForElement', (element, timeout = 5000) => {
cy.get(element, { timeout }).should('be.visible').and('not.be.disabled');
@ -400,8 +397,7 @@ Cypress.Commands.add('clickButtonWithText', (buttonText) => {
cy.get('.q-btn').contains(buttonText).click();
});
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
originalFn(url, options);
cy.get('main', { timeout: 10000 }).should('exist');
});
});