fix: refs #8581 update Cypress test paths and improve download validation logic
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
b86ba0c67b
commit
fc0d409ab6
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
find 'test/cypress/integration' \
|
||||
find 'test/cypress/integration/invoiceIn/' \
|
||||
-mindepth 1 \
|
||||
-maxdepth 1 \
|
||||
-type d | \
|
||||
|
|
|
@ -549,13 +549,14 @@ Cypress.Commands.add('validateDownload', (trigger, opts = {}) => {
|
|||
alias = 'download',
|
||||
} = opts;
|
||||
cy.intercept('GET', url).as(alias);
|
||||
trigger();
|
||||
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;
|
||||
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;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue