diff --git a/test/cypress/integration/monitor/clientActions.spec.js b/test/cypress/integration/monitor/clientActions.spec.js index bcd640eb6..40bf871f8 100644 --- a/test/cypress/integration/monitor/clientActions.spec.js +++ b/test/cypress/integration/monitor/clientActions.spec.js @@ -1,8 +1,7 @@ const clientFk = `[data-cy="recentOrderActions"] [data-cy="column-filter-clientFk"]`; -const departmentFk = `[data-cy="recentOrderActions"] [data-cy="column-filter-departmentFk"]`; describe('Monitor Clients actions', () => { beforeEach(() => { - cy.login('developer'); + cy.login('salesPerson'); cy.visit('/#/monitor/clients-actions'); cy.waitForElement('.q-page'); cy.intercept('GET', '**/SalesMonitors/ordersFilter*').as('ordersFilter'); @@ -14,7 +13,8 @@ describe('Monitor Clients actions', () => { cy.dataCy('recentOrderActions').within(() => { cy.getRowCol('clientFk').find('span').should('have.class', 'link').click(); }); - cy.dataCy('CustomerDescriptor').should('exist'); + cy.dataCy('CustomerDescriptor').should('exist').and('be.visible'); + cy.dataCy('vnDescriptor').should('exist').and('be.visible'); cy.dataCy('recentOrderActions').within(() => { cy.getRowCol('departmentFk', 2) .find('span') @@ -22,6 +22,7 @@ describe('Monitor Clients actions', () => { .click(); }); cy.dataCy('DepartmentDescriptor').should('exist'); + cy.dataCy('vnDescriptor').should('exist').and('be.visible'); cy.dataCy('clientsOnWebsite') .find('.q-ml-md') @@ -31,23 +32,5 @@ 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}`).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}`).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}`).its('[data-cy="_select"]').type('Bruce Banner'); - cy.intercept('GET', '**/Clients*').as('filterClient'); - cy.wait('@filterClient').then(() => { - cy.clickOption(); - cy.countTableRows('eq', 3); - }); }); });