fix: refs #8581 update Cypress test paths and improve download validation logic
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-03-12 10:22:17 +01:00
parent b86ba0c67b
commit fc0d409ab6
2 changed files with 9 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
find 'test/cypress/integration' \ find 'test/cypress/integration/invoiceIn/' \
-mindepth 1 \ -mindepth 1 \
-maxdepth 1 \ -maxdepth 1 \
-type d | \ -type d | \

View File

@ -549,7 +549,7 @@ Cypress.Commands.add('validateDownload', (trigger, opts = {}) => {
alias = 'download', alias = 'download',
} = opts; } = opts;
cy.intercept('GET', url).as(alias); cy.intercept('GET', url).as(alias);
trigger(); trigger().then(() => {
cy.wait(`@${alias}`).then(({ response }) => { cy.wait(`@${alias}`).then(({ response }) => {
expect(response.statusCode).to.equal(200); expect(response.statusCode).to.equal(200);
const isValidType = types.some((type) => const isValidType = types.some((type) =>
@ -558,6 +558,7 @@ Cypress.Commands.add('validateDownload', (trigger, opts = {}) => {
expect(isValidType).to.be.true; 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) => {