#7638 - showAllCmrs #1642

Open
jtubau wants to merge 8 commits from 7638-showAllCmrs into dev
1 changed files with 67 additions and 0 deletions
Showing only changes of commit af612f9379 - Show all commits

View File

@ -5,6 +5,9 @@ describe('Cmr list', () => {
const selectors = {
ticket: getLinkSelector('ticketFk'),
client: getLinkSelector('clientFk'),
route: getLinkSelector('routeFk'),
agency: getLinkSelector('agencyModeFk'),
carrier: getLinkSelector('supplierFk'),
lastRowSelectCheckBox:
'.q-virtual-scroll__content > tr:last-child > :nth-child(1) > .q-checkbox',
downloadBtn: '#subToolbar > .q-btn',
@ -21,6 +24,10 @@ describe('Cmr list', () => {
const data = {
ticket: '1',
client: 'Bruce Wayne',
route: 'first route',
routeId: '1',
agency: 'inhouse pickup',
carrier: 'PLANTS SL',
};
beforeEach(() => {
@ -69,6 +76,26 @@ describe('Cmr list', () => {
});
});
describe('Route pop-ups', () => {
it('Should redirect to the route summary from the route descriptor pop-up', () => {
cy.get(selectors.route).should('be.visible').click();
cy.containContent(selectors.descriptorId, data.routeId);
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
cy.url().should('include', '/route/1/summary');
cy.containContent(selectors.summaryTitle, data.route);
});
it('Should redirect to the route summary from summary pop-up from the route descriptor pop-up', () => {
cy.get(selectors.route).should('be.visible').click();
cy.containContent(selectors.descriptorId, data.routeId);
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
cy.containContent(selectors.summaryTitle, data.route);
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
cy.url().should('include', '/route/1/summary');
cy.containContent(selectors.summaryTitle, data.route);
});
});
describe('Client pop-ups', () => {
it('Should redirect to the client summary from the client descriptor pop-up', () => {
cy.get(selectors.client).should('be.visible').click();
@ -88,4 +115,44 @@ describe('Cmr list', () => {
cy.containContent(selectors.summaryTitle, data.client);
});
});
describe('Agency pop-ups', () => {
it('Should redirect to the agency summary from the agency descriptor pop-up', () => {
cy.get(selectors.agency).should('be.visible').click();
cy.containContent(selectors.descriptorTitle, data.agency);
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
cy.url().should('include', '/agency/1/summary');
cy.containContent(selectors.summaryTitle, data.agency);
});
it('Should redirect to the agency summary from summary pop-up from the agency descriptor pop-up', () => {
cy.get(selectors.agency).should('be.visible').click();
cy.containContent(selectors.descriptorTitle, data.agency);
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
cy.containContent(selectors.summaryTitle, data.agency);
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
cy.url().should('include', '/agency/1/summary');
cy.containContent(selectors.summaryTitle, data.agency);
});
});
describe('Carrier pop-ups', () => {
it('Should redirect to the supplier summary from the supplier descriptor pop-up', () => {
cy.get(selectors.carrier).should('be.visible').click();
cy.containContent(selectors.descriptorTitle, data.carrier);
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
cy.url().should('include', '/supplier/1/summary');
cy.containContent(selectors.summaryTitle, data.carrier);
});
it('Should redirect to the supplier summary from summary pop-up from the supplier descriptor pop-up', () => {
cy.get(selectors.carrier).should('be.visible').click();
cy.containContent(selectors.descriptorTitle, data.carrier);
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
cy.containContent(selectors.summaryTitle, data.carrier);
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
cy.url().should('include', '/supplier/1/summary');
cy.containContent(selectors.summaryTitle, data.carrier);
});
});
});