fix: refs #8441 change test to allow downloading DMS files and ensure proper interception
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:
parent
b38c8cde0d
commit
0251735c82
|
@ -66,8 +66,7 @@ describe('Vehicle DMS', () => {
|
|||
cy.testDmsAction('create', formSelectors, data, 'Data saved');
|
||||
});
|
||||
|
||||
it.only('Should download DMS', () => {
|
||||
cy.intercept('GET', /\/api\/dms\/\d+\/downloadFile/).as('download');
|
||||
it('Should download DMS', () => {
|
||||
let fileName;
|
||||
cy.get(selectors.firstRowId)
|
||||
.invoke('text')
|
||||
|
@ -75,10 +74,10 @@ describe('Vehicle DMS', () => {
|
|||
label = label.trim();
|
||||
fileName = `${label}.jpg`;
|
||||
});
|
||||
cy.intercept('GET', /\/api\/dms\/\d+\/downloadFile/).as('download');
|
||||
cy.get(selectors.firstRowDownloadBtn).click();
|
||||
|
||||
cy.wait('@download').then((interception) => {
|
||||
expect(interception.response.statusCode).to.equal(200);
|
||||
expect(interception.response.headers['content-disposition']).to.contain(
|
||||
fileName,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue