#8581 invoiceIn e2e #1452

Merged
jorgep merged 153 commits from 8581-invoiceinE2e into dev 2025-03-20 08:58:01 +00:00
1 changed files with 6 additions and 2 deletions
Showing only changes of commit 8890006c43 - Show all commits

View File

@ -473,6 +473,7 @@ Cypress.Commands.add('validateDescriptor', (toCheck = {}) => {
});
Cypress.Commands.add('validateVnTableRows', (opts = {}) => {
cy.waitTableLoad();
let { cols = [], rows = [] } = opts;
if (!Array.isArray(cols)) cols = [cols];
const rowSelector = rows.length
@ -545,14 +546,17 @@ Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
Cypress.Commands.add('validateDownload', (trigger, opts = {}) => {
const {
url = /api\/dms\/\d+\/downloadFile\?access_token=.+/,
type = 'text/plain',
types = ['text/plain', 'image/jpeg'],
alias = 'download',
} = opts;
cy.intercept('GET', url).as(alias);
trigger();
cy.wait(`@${alias}`).then(({ response }) => {
expect(response.statusCode).to.equal(200);
expect(response.headers['content-type']).to.include(type);
const isValidType = types.some((type) =>
response.headers['content-type'].includes(type),
);
expect(isValidType).to.be.true;
});
});