Merge branch 'dev' of https: refs #8224//gitea.verdnatura.es/verdnatura/salix-front into 8224-contextMenu
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Alex Moreno 2025-05-07 07:35:36 +02:00
commit cd76a006a2
2 changed files with 4 additions and 22 deletions

View File

@ -53,10 +53,10 @@ describe('InvoiceInDescriptor', () => {
expect(response.statusCode).to.equal(200); expect(response.statusCode).to.equal(200);
}); });
}); });
// https://redmine.verdnatura.es/issues/8767
it.skip('should download the file properly', () => { it('should download the file properly', () => {
cy.visit('/#/invoice-in/1/summary'); cy.visit('/#/invoice-in/1/summary');
cy.validateDownload(() => cy.selectDescriptorOption(5)); cy.selectDescriptorOption(5);
}); });
}); });
@ -84,7 +84,7 @@ describe('InvoiceInDescriptor', () => {
beforeEach(() => cy.visit(`/#/invoice-in/${originalId}/summary`)); beforeEach(() => cy.visit(`/#/invoice-in/${originalId}/summary`));
it.skip('should create a correcting invoice and redirect to original invoice', () => { it('should create a correcting invoice and redirect to original invoice', () => {
createCorrective(); createCorrective();
redirect(originalId); redirect(originalId);
}); });

View File

@ -570,24 +570,6 @@ Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
cy.get(selector).should('have.attr', 'aria-checked', expectedVal.toString()); cy.get(selector).should('have.attr', 'aria-checked', expectedVal.toString());
}); });
Cypress.Commands.add('validateDownload', (trigger, opts = {}) => {
const {
url = /api\/dms\/\d+\/downloadFile\?access_token=.+/,
types = ['text/plain', 'image/jpeg'],
alias = 'download',
} = opts;
cy.intercept('GET', url).as(alias);
trigger().then(() => {
cy.wait(`@${alias}`).then(({ response }) => {
expect(response.statusCode).to.equal(200);
const isValidType = types.some((type) =>
response.headers['content-type'].includes(type),
);
expect(isValidType).to.be.true;
});
});
});
Cypress.Commands.add('validatePdfDownload', (match, trigger) => { Cypress.Commands.add('validatePdfDownload', (match, trigger) => {
cy.window().then((win) => { cy.window().then((win) => {
cy.stub(win, 'open') cy.stub(win, 'open')