Merge
This commit is contained in:
commit
c3401a3d9a
|
@ -3,7 +3,7 @@
|
|||
.icon-volume:before { content: '\e801'; } /* '' */
|
||||
.icon-barcode:before { content: '\e802'; } /* '' */
|
||||
.icon-bucket:before { content: '\e803'; } /* '' */
|
||||
.icon-accessory:before { content: '\e804'; } /* '' */
|
||||
.icon-accesory:before { content: '\e804'; } /* '' */
|
||||
.icon-dfiscales:before { content: '\e805'; } /* '' */
|
||||
.icon-doc:before { content: '\e806'; } /* '' */
|
||||
.icon-eye:before { content: '\e807'; } /* '' */
|
||||
|
@ -15,6 +15,8 @@
|
|||
.icon-frozen-1:before { content: '\e80d'; } /* '' */
|
||||
.icon-actions:before { content: '\e80e'; } /* '' */
|
||||
.icon-details:before { content: '\e80f'; } /* '' */
|
||||
.icon-delivery:before { content: '\e810'; } /* '' */
|
||||
.icon-solclaim:before { content: '\e811'; } /* '' */
|
||||
.icon-noweb:before { content: '\e812'; } /* '' */
|
||||
.icon-payment:before { content: '\e813'; } /* '' */
|
||||
.icon-recovery:before { content: '\e815'; } /* '' */
|
||||
|
@ -37,7 +39,7 @@
|
|||
.icon-entry:before { content: '\e829'; } /* '' */
|
||||
.icon-traceability:before { content: '\e82a'; } /* '' */
|
||||
.icon-transaction:before { content: '\e82b'; } /* '' */
|
||||
.icon-greenery:before { content: '\e82c'; } /* '' */
|
||||
.icon-verde:before { content: '\e82c'; } /* '' */
|
||||
.icon-regentry:before { content: '\e82d'; } /* '' */
|
||||
.icon-plant:before { content: '\e82e'; } /* '' */
|
||||
.icon-artificial:before { content: '\e82f'; } /* '' */
|
||||
|
|
Binary file not shown.
|
@ -9,91 +9,81 @@ describe('Client Edit fiscalData path', () => {
|
|||
.waitForLogin('employee');
|
||||
});
|
||||
|
||||
it('should click on the Clients button of the top bar menu', done => {
|
||||
return nightmare
|
||||
it('should click on the Clients button of the top bar menu', async () => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||
.waitToClick(selectors.globalItems.clientsButton)
|
||||
.wait(selectors.clientsIndex.createClientButton)
|
||||
.parsedUrl()
|
||||
.then(url => {
|
||||
.parsedUrl();
|
||||
|
||||
expect(url.hash).toEqual('#!/client/index');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should search for the user Bruce Banner', done => {
|
||||
return nightmare
|
||||
it('should search for the user Bruce Banner', async () => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchResult)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult)
|
||||
.then(result => {
|
||||
expect(result).toEqual(1);
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
// Confirms all addresses have EQtax false for future propagation test step 1
|
||||
it(`should click on the search result to access to the client's addresses`, () => {
|
||||
return nightmare
|
||||
it(`should click on the search result to access to the client's addresses`, async () => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
||||
.waitToClick(selectors.clientsIndex.searchResult)
|
||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||
.waitForURL('/address/index')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('/address/index');
|
||||
});
|
||||
});
|
||||
|
||||
// Confirms all addresses have EQtax false for future propagation test step 2
|
||||
it(`should click on the 1st edit icon to check EQtax isnt checked`, () => {
|
||||
return nightmare
|
||||
it(`should click on the 1st edit icon to check EQtax isnt checked`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.firstEditButton)
|
||||
.wait(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
});
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
// Confirms all addresses have EQtax false for future propagation test step 3
|
||||
it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, () => {
|
||||
return nightmare
|
||||
it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||
.waitToClick(selectors.clientAddresses.secondEditButton)
|
||||
.wait(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
});
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it(`should click on the fiscal data button`, () => {
|
||||
return nightmare
|
||||
it(`should click on the fiscal data button`, async () => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
||||
.waitForURL('fiscal-data')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('fiscal-data');
|
||||
});
|
||||
});
|
||||
|
||||
it('should not be able to edit the verified data checkbox', done => {
|
||||
return nightmare
|
||||
it('should not be able to edit the verified data checkbox', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).disabled;
|
||||
}, selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.verifiedDataCheckboxInput);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -103,46 +93,41 @@ describe('Client Edit fiscalData path', () => {
|
|||
.waitForLogin('administrative');
|
||||
});
|
||||
|
||||
it('should now click on the Clients button of the top bar menu', done => {
|
||||
return nightmare
|
||||
it('should now click on the Clients button of the top bar menu', async () => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||
.waitToClick(selectors.globalItems.clientsButton)
|
||||
.wait(selectors.clientsIndex.createClientButton)
|
||||
.parsedUrl()
|
||||
.then(url => {
|
||||
.parsedUrl();
|
||||
|
||||
expect(url.hash).toEqual('#!/client/index');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should now search for the user Bruce Banner', done => {
|
||||
return nightmare
|
||||
it('should now search for the user Bruce Banner', async () => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.clientsIndex.searchResult)
|
||||
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
|
||||
.click(selectors.clientsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||
.countElement(selectors.clientsIndex.searchResult)
|
||||
.then(result => {
|
||||
expect(result).toEqual(1);
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
.countElement(selectors.clientsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should access to the client fiscal data`, () => {
|
||||
return nightmare
|
||||
it(`should access to the client fiscal data`, async () => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
||||
.waitToClick(selectors.clientsIndex.searchResult)
|
||||
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
||||
.waitForURL('fiscal-data')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('fiscal-data');
|
||||
});
|
||||
});
|
||||
|
||||
it('should edit the clients fiscal data', done => {
|
||||
return nightmare
|
||||
it('should edit the clients fiscal data', async () => {
|
||||
const result = await nightmare
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||
.type(selectors.clientFiscalData.socialNameInput, 'SMASH!')
|
||||
|
@ -168,226 +153,190 @@ describe('Client Edit fiscalData path', () => {
|
|||
.waitToClick(selectors.clientFiscalData.equalizationTaxCheckboxLabel)
|
||||
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||
.click(selectors.clientFiscalData.saveButton)
|
||||
.waitForLastSnackbar()
|
||||
.then(result => {
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should propagate the Equalization tax', done => {
|
||||
return nightmare
|
||||
it('should propagate the Equalization tax', async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
||||
.waitForLastSnackbar()
|
||||
.then(result => {
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Equivalent tax spreaded');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
// confirm all addresses have now EQtax checked step 1
|
||||
it(`should click on the addresses button to access to the client's addresses`, () => {
|
||||
return nightmare
|
||||
it(`should click on the addresses button to access to the client's addresses`, async () => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||
.waitForURL('/address/index')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('/address/index');
|
||||
});
|
||||
});
|
||||
|
||||
// confirm all addresses have now EQtax checked step 2
|
||||
it(`should click on the 1st edit icon to confirm EQtax is checked`, () => {
|
||||
return nightmare
|
||||
it(`should click on the 1st edit icon to confirm EQtax is checked`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.firstEditButton)
|
||||
.wait(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
});
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
// confirm all addresses have now EQtax checked step 3
|
||||
it(`should go back to addresses then select the second one and confirm the EQtax is checked`, () => {
|
||||
return nightmare
|
||||
it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||
.waitToClick(selectors.clientAddresses.secondEditButton)
|
||||
.wait(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
});
|
||||
}, selectors.clientAddresses.equalizationTaxCheckboxLabel);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should navigate back to fiscal data to confirm its name have been edited', done => {
|
||||
return nightmare
|
||||
it('should navigate back to fiscal data to confirm its name have been edited', async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
||||
.wait(selectors.clientFiscalData.socialNameInput)
|
||||
.getInputValue(selectors.clientFiscalData.socialNameInput)
|
||||
.then(result => {
|
||||
.getInputValue(selectors.clientFiscalData.socialNameInput);
|
||||
|
||||
expect(result).toEqual('SMASH!');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should confirm the fiscal id have been edited', done => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.clientFiscalData.fiscalIdInput)
|
||||
.then(result => {
|
||||
it('should confirm the fiscal id have been edited', async () => {
|
||||
const result = await nightmare
|
||||
.getInputValue(selectors.clientFiscalData.fiscalIdInput);
|
||||
|
||||
expect(result).toEqual('94980061C');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should confirm the address have been edited', done => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.clientFiscalData.addressInput)
|
||||
.then(result => {
|
||||
it('should confirm the address have been edited', async () => {
|
||||
const result = await nightmare
|
||||
.getInputValue(selectors.clientFiscalData.addressInput);
|
||||
|
||||
expect(result).toEqual('Somewhere edited');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should confirm the postcode have been edited', done => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.clientFiscalData.postcodeInput)
|
||||
.then(result => {
|
||||
it('should confirm the postcode have been edited', async () => {
|
||||
const result = await nightmare
|
||||
.getInputValue(selectors.clientFiscalData.postcodeInput);
|
||||
|
||||
expect(result).toEqual('12345');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should confirm the city have been edited', done => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.clientFiscalData.cityInput)
|
||||
.then(result => {
|
||||
it('should confirm the city have been edited', async () => {
|
||||
const result = await nightmare
|
||||
.getInputValue(selectors.clientFiscalData.cityInput);
|
||||
|
||||
expect(result).toEqual('N/A');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it(`should confirm the country have been selected`, () => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.clientFiscalData.countryInput)
|
||||
.then(result => {
|
||||
it(`should confirm the country have been selected`, async () => {
|
||||
const result = await nightmare
|
||||
.getInputValue(selectors.clientFiscalData.countryInput);
|
||||
|
||||
expect(result).toEqual('Francia');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should confirm the province have been selected`, () => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.clientFiscalData.provinceInput)
|
||||
.then(result => {
|
||||
it(`should confirm the province have been selected`, async () => {
|
||||
const result = await nightmare
|
||||
.getInputValue(selectors.clientFiscalData.provinceInput);
|
||||
|
||||
expect(result).toEqual('Province two');
|
||||
});
|
||||
});
|
||||
|
||||
it('should confirm active checkbox is unchecked', done => {
|
||||
return nightmare
|
||||
it('should confirm active checkbox is unchecked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.activeCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.activeCheckboxLabel);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should confirm frozen checkbox is unchecked', done => {
|
||||
return nightmare
|
||||
it('should confirm frozen checkbox is unchecked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.frozenCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.frozenCheckboxLabel);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should confirm Has to invoice checkbox is unchecked', done => {
|
||||
return nightmare
|
||||
it('should confirm Has to invoice checkbox is unchecked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.hasToInvoiceCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.hasToInvoiceCheckboxLabel);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should confirm Vies checkbox is checked', done => {
|
||||
return nightmare
|
||||
it('should confirm Vies checkbox is checked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.viesCheckboxInput)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.viesCheckboxInput);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should confirm Invoice by mail checkbox is unchecked', done => {
|
||||
return nightmare
|
||||
it('should confirm Invoice by mail checkbox is unchecked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.invoiceByMailCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.invoiceByMailCheckboxLabel);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should confirm invoice by address checkbox is unchecked', done => {
|
||||
return nightmare
|
||||
it('should confirm invoice by address checkbox is unchecked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.invoiceByAddressCheckboxInput)
|
||||
.then(value => {
|
||||
expect(value).toBeFalsy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.invoiceByAddressCheckboxInput);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should confirm Equalization tax checkbox is checked', done => {
|
||||
return nightmare
|
||||
it('should confirm Equalization tax checkbox is checked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.equalizationTaxCheckboxLabel)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.equalizationTaxCheckboxLabel);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should confirm Verified data checkbox is checked', done => {
|
||||
return nightmare
|
||||
it('should confirm Verified data checkbox is checked', async () => {
|
||||
const result = await nightmare
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.verifiedDataCheckboxInput);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 1
|
||||
it(`should click on the addresses button to access to the client's addresses`, () => {
|
||||
return nightmare
|
||||
it(`should click on the addresses button to access to the client's addresses`, async () => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||
.waitForURL('/address/index')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('/address/index');
|
||||
});
|
||||
});
|
||||
|
||||
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2
|
||||
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, () => {
|
||||
return nightmare
|
||||
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.firstEditButton)
|
||||
.waitToClick(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||
.click(selectors.clientAddresses.saveButton)
|
||||
|
@ -398,17 +347,15 @@ describe('Client Edit fiscalData path', () => {
|
|||
});
|
||||
|
||||
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 3
|
||||
it('should navigate back to fiscal data to confirm invoice by address is now checked', done => {
|
||||
return nightmare
|
||||
it('should navigate back to fiscal data to confirm invoice by address is now checked', async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
||||
.wait(selectors.clientFiscalData.invoiceByAddressCheckboxInput)
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).checked;
|
||||
}, selectors.clientFiscalData.invoiceByAddressCheckboxInput)
|
||||
.then(value => {
|
||||
expect(value).toBeTruthy();
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
}, selectors.clientFiscalData.invoiceByAddressCheckboxInput);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
describe('Item', () => {
|
||||
describe('Summary path', () => {
|
||||
describe('Item summary path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
beforeAll(() => {
|
||||
|
@ -34,7 +33,7 @@ describe('Item', () => {
|
|||
const result = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
|
||||
.isVisible(selectors.itemSummary.basicData)
|
||||
.then((result) => {
|
||||
.then(result => {
|
||||
expect(result).toBeFalsy();
|
||||
return nightmare
|
||||
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
|
||||
|
@ -108,7 +107,7 @@ describe('Item', () => {
|
|||
const result = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Mind')
|
||||
.isVisible(selectors.itemSummary.basicData)
|
||||
.then((result) => {
|
||||
.then(result => {
|
||||
expect(result).toBeFalsy();
|
||||
return nightmare
|
||||
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
|
||||
|
@ -211,4 +210,3 @@ describe('Item', () => {
|
|||
expect(result).toContain('4');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
describe('Item', () => {
|
||||
describe('Edit tax path', () => {
|
||||
describe('Item edit tax path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
beforeAll(() => {
|
||||
|
@ -81,4 +80,3 @@ describe('Item', () => {
|
|||
expect(thirdVatType).toEqual('Reduced VAT');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
describe('Item', () => {
|
||||
describe('Create tags path', () => {
|
||||
describe('Item create tags path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
beforeAll(() => {
|
||||
|
@ -10,45 +9,39 @@ describe('Item', () => {
|
|||
.waitForLogin('buyer');
|
||||
});
|
||||
|
||||
it('should access to the items index by clicking the items button', done => {
|
||||
return nightmare
|
||||
it('should access to the items index by clicking the items button', async () => {
|
||||
const url = await nightmare
|
||||
.click(selectors.moduleAccessView.itemsSectionButton)
|
||||
.wait(selectors.itemsIndex.createItemButton)
|
||||
.parsedUrl()
|
||||
.then(url => {
|
||||
.parsedUrl();
|
||||
|
||||
expect(url.hash).toEqual('#!/item/index');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should search for the item Gem of Time', done => {
|
||||
return nightmare
|
||||
it('should search for the item Gem of Time', async () => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.itemsIndex.searchResult)
|
||||
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult)
|
||||
.then(result => {
|
||||
expect(result).toEqual(1);
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the item tags`, done => {
|
||||
return nightmare
|
||||
it(`should click on the search result to access to the item tags`, async () => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitToClick(selectors.itemTags.tagsButton)
|
||||
.waitForURL('tags')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('tags');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it(`should create a new tag and delete a former one`, done => {
|
||||
return nightmare
|
||||
it(`should create a new tag and delete a former one`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.itemTags.firstRemoveTagButton)
|
||||
.waitToClick(selectors.itemTags.addItemTagButton)
|
||||
.waitToClick(selectors.itemTags.seventhTagSelect)
|
||||
|
@ -57,29 +50,26 @@ describe('Item', () => {
|
|||
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
||||
.type(selectors.itemTags.seventhRelevancyInput, '1')
|
||||
.click(selectors.itemTags.submitItemTagsButton)
|
||||
.waitForLastSnackbar()
|
||||
.then(result => {
|
||||
expect(result).toEqual('Data saved!');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
.waitForLastSnackbar();
|
||||
|
||||
it(`should reload tags form to check that the changes are saved`, () => {
|
||||
return nightmare
|
||||
.click(selectors.itemBasicData.basicDataButton)
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.click(selectors.itemTags.tagsButton)
|
||||
.wait('vn-item-tags');
|
||||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
|
||||
it(`should confirm the first row data is the expected one`, async () => {
|
||||
let tag = await nightmare.getProperty(selectors.itemTags.firstTagSelect, 'value');
|
||||
let value = await nightmare.getProperty(selectors.itemTags.firstValueInput, 'value');
|
||||
let relevancy = await nightmare.getProperty(selectors.itemTags.firstRelevancyInput, 'value');
|
||||
let result = await nightmare
|
||||
.click(selectors.itemBasicData.basicDataButton)
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.click(selectors.itemTags.tagsButton)
|
||||
.wait('vn-item-tags')
|
||||
.getProperty(selectors.itemTags.firstTagSelect, 'value');
|
||||
|
||||
expect(tag).toEqual('Ancho de la base');
|
||||
expect(value).toEqual('50');
|
||||
expect(relevancy).toEqual('1');
|
||||
expect(result).toEqual('Ancho de la base');
|
||||
result = await nightmare.getProperty(selectors.itemTags.firstValueInput, 'value');
|
||||
|
||||
expect(result).toEqual('50');
|
||||
result = await nightmare.getProperty(selectors.itemTags.firstRelevancyInput, 'value');
|
||||
|
||||
expect(result).toEqual('1');
|
||||
});
|
||||
|
||||
it(`should confirm the second row data is the expected one`, async () => {
|
||||
|
@ -92,7 +82,7 @@ describe('Item', () => {
|
|||
expect(relevancy).toEqual('2');
|
||||
});
|
||||
|
||||
it(`should confirm the second row data is the expected one`, async() => {
|
||||
it(`should confirm the third row data is the expected one`, async () => {
|
||||
let tag = await nightmare.getProperty(selectors.itemTags.thirdTagSelect, 'value');
|
||||
let value = await nightmare.getProperty(selectors.itemTags.thirdValueInput, 'value');
|
||||
let relevancy = await nightmare.getProperty(selectors.itemTags.thirdRelevancyInput, 'value');
|
||||
|
@ -122,4 +112,3 @@ describe('Item', () => {
|
|||
expect(relevancy).toEqual('5');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
describe('Item', () => {
|
||||
describe('Create niche path', () => {
|
||||
describe('Item create niche path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
beforeAll(() => {
|
||||
|
@ -10,102 +9,85 @@ describe('Item', () => {
|
|||
.waitForLogin('buyer');
|
||||
});
|
||||
|
||||
it('should access to the items index by clicking the items button', done => {
|
||||
return nightmare
|
||||
it('should access to the items index by clicking the items button', async () => {
|
||||
const url = await nightmare
|
||||
.click(selectors.moduleAccessView.itemsSectionButton)
|
||||
.wait(selectors.itemsIndex.createItemButton)
|
||||
.parsedUrl()
|
||||
.then(url => {
|
||||
.parsedUrl();
|
||||
|
||||
expect(url.hash).toEqual('#!/item/index');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it('should search for the item Gem of Time', done => {
|
||||
return nightmare
|
||||
it('should search for the item Gem of Time', async () => {
|
||||
const resultCount = await nightmare
|
||||
.wait(selectors.itemsIndex.searchResult)
|
||||
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
|
||||
.click(selectors.itemsIndex.searchButton)
|
||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||
.countElement(selectors.itemsIndex.searchResult)
|
||||
.then(result => {
|
||||
expect(result).toEqual(1);
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
.countElement(selectors.itemsIndex.searchResult);
|
||||
|
||||
expect(resultCount).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should click on the search result to access to the item niches`, done => {
|
||||
return nightmare
|
||||
it(`should click on the search result to access to the item niches`, async () => {
|
||||
const url = await nightmare
|
||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
|
||||
.waitToClick(selectors.itemsIndex.searchResult)
|
||||
.waitToClick(selectors.itemNiches.nicheButton)
|
||||
.waitForURL('niche')
|
||||
.url()
|
||||
.then(url => {
|
||||
.url();
|
||||
|
||||
expect(url).toContain('niche');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it(`should click create a new niche and delete a former one`, done => {
|
||||
return nightmare
|
||||
it(`should click create a new niche and delete a former one`, async () => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.itemNiches.addNicheButton)
|
||||
.waitToClick(selectors.itemNiches.secondNicheRemoveButton)
|
||||
.waitToClick(selectors.itemNiches.thirdWarehouseSelect)
|
||||
.waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption)
|
||||
.type(selectors.itemNiches.thirdCodeInput, 'A4')
|
||||
.click(selectors.itemNiches.submitNichesButton)
|
||||
.waitForLastSnackbar()
|
||||
.then(result => {
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it(`should confirm the first niche is the expected one`, done => {
|
||||
return nightmare
|
||||
it(`should confirm the first niche is the expected one`, async () => {
|
||||
let result = await nightmare
|
||||
.click(selectors.itemBasicData.basicDataButton)
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.click(selectors.itemNiches.nicheButton)
|
||||
.waitForTextInInput(selectors.itemNiches.firstWarehouseSelect, 'Warehouse One')
|
||||
.getInputValue(selectors.itemNiches.firstWarehouseSelect)
|
||||
.then(result => {
|
||||
.getInputValue(selectors.itemNiches.firstWarehouseSelect);
|
||||
|
||||
expect(result).toEqual('Warehouse One');
|
||||
return nightmare
|
||||
result = await nightmare
|
||||
.getInputValue(selectors.itemNiches.firstCodeInput);
|
||||
})
|
||||
.then(result => {
|
||||
|
||||
expect(result).toEqual('A1');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it(`should confirm the second niche is the expected one`, done => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.itemNiches.secondWarehouseSelect)
|
||||
.then(result => {
|
||||
it(`should confirm the second niche is the expected one`, async () => {
|
||||
let result = await nightmare
|
||||
.getInputValue(selectors.itemNiches.secondWarehouseSelect);
|
||||
|
||||
expect(result).toEqual('Warehouse Three');
|
||||
return nightmare
|
||||
result = await nightmare
|
||||
.getInputValue(selectors.itemNiches.secondCodeInput);
|
||||
})
|
||||
.then(result => {
|
||||
|
||||
|
||||
expect(result).toEqual('A3');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
|
||||
it(`should confirm the third niche is the expected one`, done => {
|
||||
return nightmare
|
||||
.getInputValue(selectors.itemNiches.thirdWarehouseSelect)
|
||||
.then(result => {
|
||||
it(`should confirm the third niche is the expected one`, async () => {
|
||||
let result = await nightmare
|
||||
.getInputValue(selectors.itemNiches.thirdWarehouseSelect);
|
||||
|
||||
expect(result).toEqual('Warehouse Two');
|
||||
return nightmare
|
||||
result = await nightmare
|
||||
.getInputValue(selectors.itemNiches.thirdCodeInput);
|
||||
})
|
||||
.then(result => {
|
||||
|
||||
expect(result).toEqual('A4');
|
||||
done();
|
||||
}).catch(done.fail);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -325,19 +325,19 @@ INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
|||
|
||||
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`)
|
||||
VALUES
|
||||
( 69 , 'CCs', NULL, 30, NULL, 1),
|
||||
( 442 , 'VNL', 241, 30, 2 , 2),
|
||||
( 567 , 'VNH', NULL, 30, NULL, 3),
|
||||
( 791 , 'FTH', NULL, 30, NULL, 4),
|
||||
( 1381, 'ORN', NULL, 30, NULL, 5);
|
||||
( 69 , 'CCs', NULL, 30, NULL, 0),
|
||||
( 442 , 'VNL', 241, 30, 2 , 1),
|
||||
( 567 , 'VNH', NULL, 30, NULL, 4),
|
||||
( 791 , 'FTH', NULL, 30, NULL, 3),
|
||||
( 1381, 'ORN', NULL, 30, NULL, 7);
|
||||
|
||||
INSERT INTO `vn`.`invoiceOut`(`id`,`ref`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `pdf`)
|
||||
VALUES
|
||||
( 1, 'T1111111' , 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 2, 'V2222222' , 'V', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 3, 'E3333333' , 'E', 90.30 , CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 4, 'E4444444' , 'E', 290.30 , DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 5, 'E5555555' , 'E', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1);
|
||||
( 1, '1', 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 2, '1', 'V', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 3, '1', 'E', 90.30 , CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 4, '1', 'E', 290.30 , DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 5, '1', 'R', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`ticket`(`id`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `created`)
|
||||
VALUES
|
||||
|
|
Loading…
Reference in New Issue