test: refs #6943 fix tests
gitea/salix-front/pipeline/pr-test There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-test There was a failure building this commit
Details
This commit is contained in:
parent
fc80946817
commit
54b4791849
|
@ -81,7 +81,7 @@ function onAgentCreated({ id, fiscalName }, data) {
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('Consignee')"
|
:label="t('Consignee')"
|
||||||
required
|
:required="true"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.nickname"
|
v-model="data.nickname"
|
||||||
/>
|
/>
|
||||||
|
@ -90,7 +90,7 @@ function onAgentCreated({ id, fiscalName }, data) {
|
||||||
:label="t('Street address')"
|
:label="t('Street address')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.street"
|
v-model="data.street"
|
||||||
required
|
:required="true"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,12 @@ async function handleDialog(data) {
|
||||||
const toCustomerAddress = () => {
|
const toCustomerAddress = () => {
|
||||||
notes.value = [];
|
notes.value = [];
|
||||||
deletes.value = [];
|
deletes.value = [];
|
||||||
router.go();
|
router.push({
|
||||||
|
name: 'CustomerAddress',
|
||||||
|
params: {
|
||||||
|
id: route.params.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
function handleLocation(data, location) {
|
function handleLocation(data, location) {
|
||||||
const { town, code, provinceFk, countryFk } = location ?? {};
|
const { town, code, provinceFk, countryFk } = location ?? {};
|
||||||
|
|
|
@ -3,11 +3,46 @@ describe('Client consignee', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('#/customer/1110/address', {
|
cy.visit('#/customer/1107/address');
|
||||||
timeout: 5000,
|
cy.domContentLoad();
|
||||||
});
|
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-card').should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('check as equalizated', function () {
|
||||||
|
cy.get('.q-card__section > .address-card').then(($el) => {
|
||||||
|
let addressCards_before = $el.length;
|
||||||
|
|
||||||
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||||
|
const addressName = 'test';
|
||||||
|
cy.dataCy('Consignee_input').type(addressName);
|
||||||
|
cy.dataCy('Location_select').click();
|
||||||
|
cy.get('[role="listbox"] .q-item:nth-child(1)').click();
|
||||||
|
cy.dataCy('Street address_input').type('TEST ADDRESS');
|
||||||
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
||||||
|
cy.location('href').should('contain', '#/customer/1107/address');
|
||||||
|
cy.get('.q-card__section > .address-card').should(
|
||||||
|
'have.length',
|
||||||
|
addressCards_before + 1,
|
||||||
|
);
|
||||||
|
cy.get('.q-card__section > .address-card')
|
||||||
|
.eq(addressCards_before)
|
||||||
|
.should('be.visible')
|
||||||
|
.get('.text-weight-bold')
|
||||||
|
.eq(addressCards_before - 1)
|
||||||
|
.should('contain', addressName)
|
||||||
|
.click();
|
||||||
|
});
|
||||||
|
cy.get(
|
||||||
|
'.q-card > :nth-child(1) > :nth-child(2) > .q-checkbox > .q-checkbox__inner',
|
||||||
|
)
|
||||||
|
.should('have.class', 'q-checkbox__inner--falsy')
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content').click();
|
||||||
|
cy.get(
|
||||||
|
':nth-child(2) > :nth-child(2) > .flex > .q-mr-lg > .q-checkbox__inner',
|
||||||
|
).should('have.class', 'q-checkbox__inner--truthy');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,9 +3,8 @@ describe('Client fiscal data', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('#/customer/1107/fiscal-data', {
|
cy.visit('#/customer/1107/fiscal-data');
|
||||||
timeout: 5000,
|
cy.domContentLoad();
|
||||||
});
|
|
||||||
});
|
});
|
||||||
it('Should change required value when change customer', () => {
|
it('Should change required value when change customer', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-card').should('be.visible');
|
||||||
|
@ -15,4 +14,25 @@ describe('Client fiscal data', () => {
|
||||||
cy.get('.q-item > .q-item__label').should('have.text', ' #1');
|
cy.get('.q-item > .q-item__label').should('have.text', ' #1');
|
||||||
cy.dataCy('sageTaxTypeFk').filter('input').should('have.attr', 'required');
|
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');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue