e2e small refactor
This commit is contained in:
parent
69fbda397d
commit
52a325798d
|
@ -48,9 +48,10 @@ export default {
|
||||||
fiscalData: {
|
fiscalData: {
|
||||||
fiscalDataButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-empty > vn-left-menu > vn-card > div > vn-vertical > vn-actions > vn-horizontal > ul > vn-menu-item:nth-child(2) > li > a',
|
fiscalDataButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-empty > vn-left-menu > vn-card > div > vn-vertical > vn-actions > vn-horizontal > ul > vn-menu-item:nth-child(2) > li > a',
|
||||||
addressInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-textfield:nth-child(1) > div > input',
|
addressInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-textfield:nth-child(1) > div > input',
|
||||||
hastToInvoiceCheckboxLabel: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label',
|
hasToInvoiceCheckboxLabel: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label',
|
||||||
hastToInvoiceCheckboxInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label > input',
|
hasToInvoiceCheckboxInput: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-one:nth-child(1) > vn-check > label > input',
|
||||||
invoiceByMailCheckbox: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-vertical > vn-horizontal:nth-child(2) > vn-check:nth-child(2) > label > span.mdl-checkbox__ripple-container.mdl-js-ripple-effect.mdl-ripple--center',
|
printToInvoiceCheckboxLabel: '',
|
||||||
|
printInvoiceCheckboxInput: '',
|
||||||
saveButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-button-bar > vn-submit > input'
|
saveButton: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-horizontal > vn-auto > vn-vertical > vn-client-fiscal-data > form > vn-button-bar > vn-submit > input'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -75,7 +75,7 @@ describe('Edit fiscalData path', () => {
|
||||||
|
|
||||||
it(`should uncheck the hasToInvoice checkbox`, done => {
|
it(`should uncheck the hasToInvoice checkbox`, done => {
|
||||||
nightmare
|
nightmare
|
||||||
.waitToClick(selectors.fiscalData.hastToInvoiceCheckboxLabel)
|
.waitToClick(selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
||||||
.waitToClick(selectors.fiscalData.saveButton)
|
.waitToClick(selectors.fiscalData.saveButton)
|
||||||
.wait(selectors.globalItems.snackbarIsActive)
|
.wait(selectors.globalItems.snackbarIsActive)
|
||||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||||
|
@ -92,10 +92,10 @@ describe('Edit fiscalData path', () => {
|
||||||
.waitToClick(selectors.basicData.basicDataButton)
|
.waitToClick(selectors.basicData.basicDataButton)
|
||||||
.wait(selectors.basicData.nameInput)
|
.wait(selectors.basicData.nameInput)
|
||||||
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
.waitToClick(selectors.fiscalData.fiscalDataButton)
|
||||||
.wait(selectors.fiscalData.hastToInvoiceCheckboxLabel)
|
.wait(selectors.fiscalData.hasToInvoiceCheckboxLabel)
|
||||||
.evaluate(selector => {
|
.evaluate(selector => {
|
||||||
return document.querySelector(selector).checked;
|
return document.querySelector(selector).checked;
|
||||||
}, selectors.fiscalData.hastToInvoiceCheckboxInput)
|
}, selectors.fiscalData.hasToInvoiceCheckboxInput)
|
||||||
.then(value => {
|
.then(value => {
|
||||||
expect(value).toBeFalsy();
|
expect(value).toBeFalsy();
|
||||||
done();
|
done();
|
||||||
|
|
Loading…
Reference in New Issue