47 lines
2.0 KiB
JavaScript
47 lines
2.0 KiB
JavaScript
/// <reference types="cypress" />
|
|
describe('TicketBasicData', () => {
|
|
beforeEach(() => {
|
|
cy.login('developer');
|
|
cy.viewport(1920, 1080);
|
|
cy.visit('/#/ticket/31/basic-data');
|
|
});
|
|
|
|
it('Should redirect to customer basic data', () => {
|
|
cy.get('.q-page').should('be.visible');
|
|
cy.get(':nth-child(2) > div > .text-primary').click();
|
|
cy.dataCy('Address_select').click();
|
|
cy.get('.q-btn-group ').find('.q-btn__content > .q-icon').click();
|
|
cy.get(
|
|
'[data-cy="CustomerBasicData-menu-item"] > .q-item__section--main',
|
|
).click();
|
|
cy.url().should('include', '/customer/1104/basic-data');
|
|
});
|
|
it.only('stepper', () => {
|
|
cy.get('.q-stepper__tab--active').should('have.class', 'q-stepper__tab--active');
|
|
|
|
cy.get('.q-stepper__nav > .q-btn--standard').click();
|
|
cy.get('.q-stepper__tab--done').should('have.class', 'q-stepper__tab--done');
|
|
cy.get('.q-stepper__tab--active').should('have.class', 'q-stepper__tab--active');
|
|
cy.get('tr:nth-child(1)>:nth-child(1)>span').should('have.class', 'link').click();
|
|
cy.dataCy('ItemDescriptor').should('exist');
|
|
|
|
cy.get('.q-drawer__content > :nth-child(1)').each(() => {
|
|
cy.get('span').should('contain.text', 'Price: €');
|
|
cy.get('span').should('contain.text', 'New price: €');
|
|
cy.get('span').should('contain.text', 'Difference: €');
|
|
});
|
|
cy.get(
|
|
':nth-child(3) > .q-radio > .q-radio__inner > .q-radio__bg > .q-radio__check',
|
|
).should('have.class', 'q-radio__check');
|
|
cy.get(
|
|
'.q-stepper__step-inner > .q-drawer-container > .q-drawer > .q-drawer__content',
|
|
).click();
|
|
cy.get(':nth-child(2) > :nth-child(1) > .text-weight-bold').click();
|
|
cy.get(':nth-child(3) > .q-radio > .q-radio__inner').should(
|
|
'have.class',
|
|
'q-radio__inner--truthy',
|
|
);
|
|
cy.get('.q-drawer__content > :nth-child(2)').click();
|
|
});
|
|
});
|