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`;
|
`tr:${trPosition}-child > .text-right > .no-wrap > :nth-child(${btnPosition}) > .q-btn > .q-btn__content > .q-icon`;
|
||||||
|
|
||||||
const selectors = {
|
const selectors = {
|
||||||
firstRowDownloadBtn: getBtnSelector('first',1),
|
firstRowDownloadBtn: getBtnSelector('first', 1),
|
||||||
firstRowEditBtn: getBtnSelector('first', 2),
|
firstRowEditBtn: getBtnSelector('first', 2),
|
||||||
firstRowDeleteBtn: getBtnSelector('first', 3),
|
firstRowDeleteBtn: getBtnSelector('first', 3),
|
||||||
lastRowDeleteBtn: getBtnSelector('last', 3),
|
lastRowDeleteBtn: getBtnSelector('last', 3),
|
||||||
|
@ -66,7 +66,8 @@ describe('Vehicle DMS', () => {
|
||||||
cy.testDmsAction('create', formSelectors, data, 'Data saved');
|
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;
|
let fileName;
|
||||||
cy.get(selectors.firstRowId)
|
cy.get(selectors.firstRowId)
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
|
@ -74,7 +75,6 @@ describe('Vehicle DMS', () => {
|
||||||
label = label.trim();
|
label = label.trim();
|
||||||
fileName = `${label}.jpg`;
|
fileName = `${label}.jpg`;
|
||||||
});
|
});
|
||||||
cy.intercept('GET', /\/api\/dms\/\d+\/downloadFile/).as('download');
|
|
||||||
cy.get(selectors.firstRowDownloadBtn).click();
|
cy.get(selectors.firstRowDownloadBtn).click();
|
||||||
|
|
||||||
cy.wait('@download').then((interception) => {
|
cy.wait('@download').then((interception) => {
|
||||||
|
|
Loading…
Reference in New Issue