fix: refs #8441 format code for improved readability and consistency in Vehicle DMS tests
This commit is contained in:
parent
3eeb23f89d
commit
ce54da0039
|
@ -3,7 +3,7 @@ describe('Vehicle DMS', () => {
|
|||
`tr:${trPosition}-child > .text-right > .no-wrap > :nth-child(${btnPosition}) > .q-btn > .q-btn__content > .q-icon`;
|
||||
|
||||
const selectors = {
|
||||
firstRowDownloadBtn: getBtnSelector('first',1),
|
||||
firstRowDownloadBtn: getBtnSelector('first', 1),
|
||||
firstRowEditBtn: getBtnSelector('first', 2),
|
||||
firstRowDeleteBtn: getBtnSelector('first', 3),
|
||||
lastRowDeleteBtn: getBtnSelector('last', 3),
|
||||
|
@ -62,19 +62,19 @@ describe('Vehicle DMS', () => {
|
|||
fileInput: selectors.fileInput,
|
||||
saveFormBtn: selectors.saveFormBtn,
|
||||
};
|
||||
|
||||
|
||||
cy.testDmsAction('create', formSelectors, data, 'Data saved');
|
||||
});
|
||||
|
||||
it('Should download DMS', () => {
|
||||
|
||||
it.only('Should download DMS', () => {
|
||||
cy.intercept('GET', /\/api\/dms\/\d+\/downloadFile/).as('download');
|
||||
let fileName;
|
||||
cy.get(selectors.firstRowId)
|
||||
.invoke('text')
|
||||
.then((label) => {
|
||||
label = label.trim();
|
||||
fileName = `${label}.jpg`;
|
||||
});
|
||||
cy.intercept('GET', /\/api\/dms\/\d+\/downloadFile/).as('download');
|
||||
.invoke('text')
|
||||
.then((label) => {
|
||||
label = label.trim();
|
||||
fileName = `${label}.jpg`;
|
||||
});
|
||||
cy.get(selectors.firstRowDownloadBtn).click();
|
||||
|
||||
cy.wait('@download').then((interception) => {
|
||||
|
|
Loading…
Reference in New Issue