This commit is contained in:
parent
18d077d0b2
commit
3769f32a00
|
@ -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');
|
||||||
});
|
});
|
||||||
|
|
|
@ -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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue