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
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
cd76a006a2
|
@ -53,10 +53,10 @@ describe('InvoiceInDescriptor', () => {
|
|||
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.validateDownload(() => cy.selectDescriptorOption(5));
|
||||
cy.selectDescriptorOption(5);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -84,7 +84,7 @@ describe('InvoiceInDescriptor', () => {
|
|||
|
||||
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();
|
||||
redirect(originalId);
|
||||
});
|
||||
|
|
|
@ -570,24 +570,6 @@ Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
|
|||
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) => {
|
||||
cy.window().then((win) => {
|
||||
cy.stub(win, 'open')
|
||||
|
|
Loading…
Reference in New Issue