diff --git a/test/cypress/integration/monitor/clientActions.spec.js b/test/cypress/integration/monitor/clientActions.spec.js index 919758152..bcd640eb6 100644 --- a/test/cypress/integration/monitor/clientActions.spec.js +++ b/test/cypress/integration/monitor/clientActions.spec.js @@ -8,7 +8,7 @@ describe('Monitor Clients actions', () => { cy.intercept('GET', '**/SalesMonitors/ordersFilter*').as('ordersFilter'); cy.intercept('GET', '**/SalesMonitors/clientsFilter*').as('clientsFilter'); }); - it('Should load layout', () => { + it('Should filter by field', () => { cy.get('.q-page').should('be.visible'); cy.dataCy('recentOrderActions').within(() => { @@ -31,19 +31,19 @@ describe('Monitor Clients actions', () => { .should('have.text', 'Recent order actions'); cy.dataCy('From_inputDate').should('have.value', '01/01/2001'); cy.dataCy('To_inputDate').should('have.value', '01/01/2001'); - cy.get(`${clientFk} [data-cy="_select"]`).click(); + cy.get(`${clientFk}`).its('[data-cy="_select"]').click(); cy.clickOption(); cy.countTableRows('eq', 0); cy.get(`${clientFk} .q-field .q-field__control > :nth-child(2)`).click(); - cy.get(`${departmentFk} [data-cy="_select"]`).type('VIP').trigger('enter'); + cy.get(`${departmentFk}`).its('[data-cy="_select"]').type('VIP').trigger('enter'); cy.intercept('GET', '**/Departments*').as('filterDepartment'); cy.wait('@filterDepartment').then(() => { cy.clickOption(); cy.countTableRows('eq', 13); }); - cy.get(`${clientFk} [data-cy="_select"]`).type('Bruce Banner'); + cy.get(`${clientFk}`).its('[data-cy="_select"]').type('Bruce Banner'); cy.intercept('GET', '**/Clients*').as('filterClient'); cy.wait('@filterClient').then(() => { cy.clickOption(); diff --git a/test/cypress/integration/monitor/monitorTicket.spec.js b/test/cypress/integration/monitor/monitorTicket.spec.js index dfa1df630..bd7696887 100644 --- a/test/cypress/integration/monitor/monitorTicket.spec.js +++ b/test/cypress/integration/monitor/monitorTicket.spec.js @@ -29,86 +29,8 @@ describe('Monitor Tickets Table', () => { cy.clickOption(); }); }); - it('should filter by filter panel', () => { - const testCases = [ - { - name: 'Client id', - selector: 'Client id_input', - value: '1101', - urlParam: 'clientFk', - }, - { - name: 'Agency', - selector: 'Agency_select', - value: 'inhouse pickup', - urlParam: 'agencyModeFk', - isSelect: true, - }, - { - name: 'State', - selector: 'State_select', - value: 'Libre', - urlParam: 'state', - isSelect: true, - }, - { - name: 'Department', - selector: 'Department_select', - value: 'COMPRAS', - urlParam: 'departmentFk', - isSelect: true, - }, - ]; - testCases.forEach( - ({ - selector, - value, - urlParam, - intercept = interceptSalesFilter, - isSelect, - }) => { - if (intercept) intercept(); - if (isSelect) { - cy.dataCy(selector).click(); - cy.get('.q-item__label').contains(value).click(); - } else { - cy.dataCy(selector).type(value); - } - - cy.searchInFilterPanel(); - cy.url().should('include', urlParam); - - cy.cleanFilterPanel(); - }, - ); - // Null to true - cy.get('[data-cy="vnCheckboxMy team"]').click(); - cy.get('[data-cy="vnCheckboxWith problems"]').click(); - cy.get('[data-cy="vnCheckboxPending"]').click(); - cy.searchInFilterPanel(); - cy.url().should('include', 'myTeam'); - cy.url().should('include', 'problems'); - cy.url().should('include', 'pending'); - // True to false - cy.get('[data-cy="vnCheckboxMy team"]').click(); - cy.get('[data-cy="vnCheckboxWith problems"]').click(); - cy.get('[data-cy="vnCheckboxPending"]').click(); - cy.searchInFilterPanel(); - cy.url().should('include', 'myTeam'); - cy.url().should('include', 'problems'); - cy.url().should('include', 'pending'); - // False to Null - cy.get('[data-cy="vnCheckboxMy team"]').click(); - cy.get('[data-cy="vnCheckboxWith problems"]').click(); - cy.get('[data-cy="vnCheckboxPending"]').click(); - cy.searchInFilterPanel(); - cy.url().should('not.include', 'myTeam'); - cy.url().should('not.include', 'problems'); - cy.url().should('not.include', 'pending'); - }); - - it('Cols', () => { + it('should open the descriptorProxy and SummaryPopup', () => { cy.getRowCol('totalProblems'); cy.getRowCol('id').find('span').should('have.class', 'link').click();