fix: refs #8441 format code for improved readability and consistency in Vehicle DMS tests

This commit is contained in:
Jose Antonio Tubau 2025-04-25 09:04:07 +02:00
parent 3eeb23f89d
commit ce54da0039
1 changed files with 10 additions and 10 deletions

View File

@ -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),
@ -66,15 +66,15 @@ describe('Vehicle DMS', () => {
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) => {