salix-front/test/cypress/integration/ticket/negative/TicketLackList.spec.js

41 lines
1.4 KiB
JavaScript

/// <reference types="cypress" />
describe('Ticket Lack list', () => {
beforeEach(() => {
cy.login('developer');
});
describe('Filters', () => {});
describe('Table actions', () => {
it('should display only one row in the lack list', () => {
// Espera a que la solicitud interceptada se complete
cy.intercept('GET', /Tickets\/itemLack\?.*$/, {
statusCode: 200,
body: [
{
itemFk: 5,
longName: 'Ranged weapon pistol 9mm',
warehouseFk: 1,
producer: null,
size: 15,
category: null,
warehouse: 'Warehouse One',
lack: -50,
inkFk: 'SLV',
timed: '2025-01-25T22:59:00.000Z',
minTimed: '23:59',
originFk: 'Holand',
},
],
}).as('getLack'); // and assign an alias
cy.visit('/#/ticket/negative');
cy.wait('@getLack', { timeout: 10000 });
// Verifica que solo se muestre una fila en la lista
cy.get('.q-virtual-scroll__content > :nth-child(1) > .sticky').click();
cy.location('href').should('contain', '#/ticket/negative/5');
});
});
});