test: refs #9026 fix test
gitea/salix-front/pipeline/pr-beta This commit is unstable Details

This commit is contained in:
Javier Segarra 2025-05-23 11:24:13 +02:00
parent 18d077d0b2
commit 3769f32a00
2 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
const firstRow = 'tr.cursor-pointer > :nth-child(1)'; const firstRow = 'tr.cursor-pointer > :nth-child(1)';
const ticketId = 1000000; const ticketId = 1000000;
const itemId = 88; const itemId = '88';
const clickNotificationAction = () => { const clickNotificationAction = () => {
const notification = '.q-notification'; const notification = '.q-notification';
cy.waitForElement(notification); cy.waitForElement(notification);
@ -19,7 +19,7 @@ describe('Ticket Lack detail', { testIsolation: true }, () => {
cy.viewport(1980, 1020); cy.viewport(1980, 1020);
cy.login('developer'); cy.login('developer');
cy.intercept('GET', /\/api\/Tickets\/itemLack\/88.*$/).as('getItemLack'); cy.intercept('GET', /\/api\/Tickets\/itemLack\/88.*$/).as('getItemLack');
cy.visit('/#/ticket/negative/88'); cy.visit(`/#/ticket/negative/${itemId}`);
cy.window().then((win) => { cy.window().then((win) => {
cy.stub(win, 'open').as('open'); cy.stub(win, 'open').as('open');
}); });

View File

@ -56,7 +56,7 @@ Cypress.Commands.add('findRowIndexByColValue', (colField, value, cb) => {
const text = cell?.textContent?.trim(); const text = cell?.textContent?.trim();
if (text === value) { if (text === value) {
foundIndex = index; 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); cb(foundIndex);
}); });
}); });