From 3769f32a004de01967535f3feea5933b3c96e087 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 23 May 2025 11:24:13 +0200 Subject: [PATCH] test: refs #9026 fix test --- .../integration/ticket/negative/TicketLackDetail.spec.js | 4 ++-- test/cypress/integration/vnComponent/vnTable.commands.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js b/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js index 9c46d4184..04c077ffd 100644 --- a/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js +++ b/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js @@ -1,7 +1,7 @@ /// const firstRow = 'tr.cursor-pointer > :nth-child(1)'; const ticketId = 1000000; -const itemId = 88; +const itemId = '88'; const clickNotificationAction = () => { const notification = '.q-notification'; cy.waitForElement(notification); @@ -19,7 +19,7 @@ describe('Ticket Lack detail', { testIsolation: true }, () => { cy.viewport(1980, 1020); cy.login('developer'); cy.intercept('GET', /\/api\/Tickets\/itemLack\/88.*$/).as('getItemLack'); - cy.visit('/#/ticket/negative/88'); + cy.visit(`/#/ticket/negative/${itemId}`); cy.window().then((win) => { cy.stub(win, 'open').as('open'); }); diff --git a/test/cypress/integration/vnComponent/vnTable.commands.js b/test/cypress/integration/vnComponent/vnTable.commands.js index 5b81e4ef8..9be7979ec 100644 --- a/test/cypress/integration/vnComponent/vnTable.commands.js +++ b/test/cypress/integration/vnComponent/vnTable.commands.js @@ -56,7 +56,7 @@ Cypress.Commands.add('findRowIndexByColValue', (colField, value, cb) => { const text = cell?.textContent?.trim(); if (text === value) { foundIndex = index; - return true; // corta el loop + return true; } }); @@ -66,7 +66,6 @@ Cypress.Commands.add('findRowIndexByColValue', (colField, value, cb) => { ); } - // Ejecuta tu callback con el índice cb(foundIndex); }); });