39 lines
1.5 KiB
JavaScript
39 lines
1.5 KiB
JavaScript
/// <reference types="cypress" />
|
|
describe('Client fiscal data', () => {
|
|
beforeEach(() => {
|
|
cy.viewport(1280, 720);
|
|
cy.login('developer');
|
|
cy.visit('#/customer/1107/fiscal-data');
|
|
cy.domContentLoad();
|
|
});
|
|
it('Should change required value when change customer', () => {
|
|
cy.get('.q-card').should('be.visible');
|
|
cy.dataCy('sageTaxTypeFk').filter('input').should('not.have.attr', 'required');
|
|
cy.get('#searchbar input').clear();
|
|
cy.get('#searchbar input').type('1{enter}');
|
|
cy.get('.q-item > .q-item__label').should('have.text', ' #1');
|
|
cy.dataCy('sageTaxTypeFk').filter('input').should('have.attr', 'required');
|
|
});
|
|
|
|
it('check as equalizated', () => {
|
|
cy.get(
|
|
':nth-child(1) > .q-checkbox > .q-checkbox__inner > .q-checkbox__bg',
|
|
).click();
|
|
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content').click();
|
|
|
|
cy.get('.q-card > :nth-child(1) > span').should(
|
|
'contain',
|
|
'You changed the equalization tax',
|
|
);
|
|
|
|
cy.get('.q-card > :nth-child(2) > span').should(
|
|
'have.text',
|
|
'Do you want to spread the change?',
|
|
);
|
|
cy.get('[data-cy="VnConfirm_confirm"] > .q-btn__content > .block').click();
|
|
cy.get(
|
|
'.bg-warning > .q-notification__wrapper > .q-notification__content > .q-notification__message',
|
|
).should('have.text', 'Equivalent tax spreaded');
|
|
});
|
|
});
|