68 lines
2.4 KiB
JavaScript
68 lines
2.4 KiB
JavaScript
/// <reference types="cypress" />
|
|
describe('TicketComponents', () => {
|
|
beforeEach(() => {
|
|
cy.login('developer');
|
|
cy.viewport(1920, 1080);
|
|
cy.visit('/#/ticket/1/components');
|
|
});
|
|
it('Should load layout', () => {
|
|
cy.get('.q-page').should('be.visible');
|
|
/* ==== Generated with Cypress Studio ==== */
|
|
cy.get('.q-scrollarea__content > :nth-child(2) > :nth-child(2)').should(
|
|
'have.text',
|
|
'Base to commission: €799.20',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(2) > :nth-child(3)').should(
|
|
'have.text',
|
|
'Total without VAT: €807.20',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(3) > :nth-child(2)').should(
|
|
'have.text',
|
|
'valor de compra: €425.000',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(3) > :nth-child(4)').should(
|
|
'have.text',
|
|
'maná auto: €7.998',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(4) > :nth-child(2)').should(
|
|
'have.text',
|
|
'Price: €5.00',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(4) > :nth-child(3)').should(
|
|
'have.text',
|
|
'Bonus: €1.00',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(4) > :nth-child(5)').should(
|
|
'have.text',
|
|
'Packages: 6',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(4) > :nth-child(4)').should(
|
|
'have.text',
|
|
'Zone: Zone pickup A ',
|
|
);
|
|
cy.get('.q-scrollarea__content > :nth-child(5) > :nth-child(2)').should(
|
|
'have.text',
|
|
'Total price: €16.00',
|
|
);
|
|
cy.get(':nth-child(4) > .link').click();
|
|
|
|
cy.dataCy('ZoneDescriptor').should('exist');
|
|
cy.get(':nth-child(1) > [data-col-field="total"]').should(
|
|
'have.text',
|
|
'€250.000€247.000€4.970',
|
|
);
|
|
cy.get(':nth-child(1) > [data-col-field="import"]').should(
|
|
'have.text',
|
|
'€50.000€49.400€0.994',
|
|
);
|
|
cy.get(':nth-child(1) > [data-col-field="components"]').should(
|
|
'have.text',
|
|
'valor de compramargenmaná auto',
|
|
);
|
|
cy.get(':nth-child(1) > [data-col-field="serie"]').should(
|
|
'have.text',
|
|
'costeempresacartera_comercial',
|
|
);
|
|
});
|
|
});
|