#907 Extensiones nightmare
This commit is contained in:
parent
535d98f485
commit
f67dce0a91
|
@ -315,6 +315,20 @@ let actions = {
|
||||||
})
|
})
|
||||||
.then(done)
|
.then(done)
|
||||||
.catch(done);
|
.catch(done);
|
||||||
|
},
|
||||||
|
|
||||||
|
autocompleteSearch: function(autocompleteSelector, searchValue, done) {
|
||||||
|
this.wait(autocompleteSelector)
|
||||||
|
.waitToClick(`${autocompleteSelector} input`)
|
||||||
|
.type(`${autocompleteSelector} vn-drop-down input`, searchValue)
|
||||||
|
.waitToClick(`${autocompleteSelector} li.active`)
|
||||||
|
.wait((autocompleteSelector, searchValue) => {
|
||||||
|
return document.querySelector(`${autocompleteSelector} input`).value.toLowerCase().includes(searchValue.toLowerCase());
|
||||||
|
}, autocompleteSelector, searchValue)
|
||||||
|
.then(done)
|
||||||
|
.catch(() => {
|
||||||
|
done(new Error(`.autocompleteSearch() for ${autocompleteSelector}, timed out`));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@ export default {
|
||||||
socialName: `${components.vnTextfield}[name="socialName"]`,
|
socialName: `${components.vnTextfield}[name="socialName"]`,
|
||||||
userName: `${components.vnTextfield}[name="userName"]`,
|
userName: `${components.vnTextfield}[name="userName"]`,
|
||||||
email: `${components.vnTextfield}[name="email"]`,
|
email: `${components.vnTextfield}[name="email"]`,
|
||||||
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
|
salesPersonAutocomplete: `vn-autocomplete[field="$ctrl.client.salesPersonFk"]`,
|
||||||
salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
createButton: `${components.vnSubmit}`,
|
createButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `vn-button[href="#!/client/index"]`
|
cancelButton: `vn-button[href="#!/client/index"]`
|
||||||
},
|
},
|
||||||
|
@ -41,11 +40,8 @@ export default {
|
||||||
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
||||||
faxInput: `${components.vnTextfield}[name="fax"]`,
|
faxInput: `${components.vnTextfield}[name="fax"]`,
|
||||||
emailInput: `${components.vnTextfield}[name="email"]`,
|
emailInput: `${components.vnTextfield}[name="email"]`,
|
||||||
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
|
salesPersonAutocomplete: `vn-autocomplete[field="$ctrl.client.salesPersonFk"]`,
|
||||||
salesPersonOptionOne: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
|
channelAutocomplete: `vn-autocomplete[field="$ctrl.client.contactChannelFk"]`,
|
||||||
channelInput: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] input`,
|
|
||||||
channelMetropolisOption: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] vn-drop-down ul > li:nth-child(3)`,
|
|
||||||
channelRumorsOption: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] vn-drop-down ul > li:nth-child(4)`,
|
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
clientFiscalData: {
|
clientFiscalData: {
|
||||||
|
@ -57,10 +53,8 @@ export default {
|
||||||
addressInput: `${components.vnTextfield}[name="street"]`,
|
addressInput: `${components.vnTextfield}[name="street"]`,
|
||||||
cityInput: `${components.vnTextfield}[name="city"]`,
|
cityInput: `${components.vnTextfield}[name="city"]`,
|
||||||
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
||||||
provinceInput: `vn-autocomplete[field="$ctrl.client.provinceFk"] input`,
|
provinceAutocomplete: `vn-autocomplete[field="$ctrl.client.provinceFk"]`,
|
||||||
provinceFifthOption: `vn-autocomplete[field="$ctrl.client.provinceFk"] vn-drop-down ul > li:nth-child(5)`,
|
countryAutocomplete: `vn-autocomplete[field="$ctrl.client.countryFk"]`,
|
||||||
countryInput: `vn-autocomplete[field="$ctrl.client.countryFk"] input`,
|
|
||||||
countryThirdOption: `vn-autocomplete[field="$ctrl.client.countryFk"] vn-drop-down ul > li:nth-child(3)`,
|
|
||||||
activeCheckboxLabel: `vn-check[label="Active"] > label`,
|
activeCheckboxLabel: `vn-check[label="Active"] > label`,
|
||||||
activeCheckboxInput: `vn-check[label="Active"] input`,
|
activeCheckboxInput: `vn-check[label="Active"] input`,
|
||||||
frozenCheckboxLabel: `vn-check[label="Frozen"] > label`,
|
frozenCheckboxLabel: `vn-check[label="Frozen"] > label`,
|
||||||
|
@ -77,15 +71,13 @@ export default {
|
||||||
},
|
},
|
||||||
clientPayMethod: {
|
clientPayMethod: {
|
||||||
payMethodButton: `vn-left-menu a[ui-sref="client.card.billingData"]`,
|
payMethodButton: `vn-left-menu a[ui-sref="client.card.billingData"]`,
|
||||||
payMethodInput: `vn-autocomplete[field="$ctrl.client.payMethodFk"] input`,
|
payMethodAutocomplete: `vn-autocomplete[field="$ctrl.client.payMethodFk"]`,
|
||||||
payMethodIBANOption: `vn-autocomplete[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(5)`,
|
|
||||||
payMethodOptionOne: `vn-autocomplete[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
IBANInput: `${components.vnTextfield}[name="iban"]`,
|
IBANInput: `${components.vnTextfield}[name="iban"]`,
|
||||||
dueDayInput: `${components.vnTextfield}[name="dueDay"]`,
|
dueDayInput: `${components.vnTextfield}[name="dueDay"]`,
|
||||||
receivedCoreLCRCheckbox: `vn-check[label='Received LCR'] > label > input`,
|
receivedCoreLCRCheckbox: `vn-check[label='Received LCR'] > label > input`,
|
||||||
receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] > label > input`,
|
receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] > label > input`,
|
||||||
receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] > label > input`,
|
receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] > label > input`,
|
||||||
swiftBicInput: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] input',
|
swiftBicAutocomplete: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"]',
|
||||||
firstSwiftBicOption: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] vn-drop-down ul > li:nth-child(1)`,
|
firstSwiftBicOption: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
clearswiftBicButton: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] > div > div > div > vn-icon > i`,
|
clearswiftBicButton: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] > div > div > div > vn-icon > i`,
|
||||||
newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button',
|
newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button',
|
||||||
|
@ -102,10 +94,8 @@ export default {
|
||||||
streetAddressInput: `${components.vnTextfield}[name="street"]`,
|
streetAddressInput: `${components.vnTextfield}[name="street"]`,
|
||||||
postcodeInput: `${components.vnTextfield}[name="postalCode"]`,
|
postcodeInput: `${components.vnTextfield}[name="postalCode"]`,
|
||||||
cityInput: `${components.vnTextfield}[name="city"]`,
|
cityInput: `${components.vnTextfield}[name="city"]`,
|
||||||
provinceInput: `vn-autocomplete[field="$ctrl.address.provinceFk"] input`,
|
provinceAutocomplete: `vn-autocomplete[field="$ctrl.address.provinceFk"]`,
|
||||||
provinceSecondOption: `vn-autocomplete[field="$ctrl.address.provinceFk"] vn-drop-down ul > li:nth-child(2)`,
|
agencyAutocomplete: `vn-autocomplete[field="$ctrl.address.agencyModeFk"]`,
|
||||||
agencyInput: `vn-autocomplete[field="$ctrl.address.agencyModeFk"] input`,
|
|
||||||
agenctySecondOption: `vn-autocomplete[field="$ctrl.address.agencyModeFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
||||||
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
||||||
defaultAddress: 'vn-client-address-index vn-horizontal:nth-child(2) div[name="street"]',
|
defaultAddress: 'vn-client-address-index vn-horizontal:nth-child(2) div[name="street"]',
|
||||||
|
@ -114,15 +104,10 @@ export default {
|
||||||
secondEditButton: `vn-client-address-index vn-horizontal:nth-child(3) vn-icon-button[icon='edit']`,
|
secondEditButton: `vn-client-address-index vn-horizontal:nth-child(3) vn-icon-button[icon='edit']`,
|
||||||
activeCheckbox: `vn-check[label='Enabled'] > label > input`,
|
activeCheckbox: `vn-check[label='Enabled'] > label > input`,
|
||||||
equalizationTaxCheckboxLabel: `vn-client-address-edit vn-check[label='Is equalizated'] > label > input`,
|
equalizationTaxCheckboxLabel: `vn-client-address-edit vn-check[label='Is equalizated'] > label > input`,
|
||||||
firstObservationTypeSelect: `vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"] input`,
|
firstObservationTypeAutocomplete: `vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"]`,
|
||||||
firstObservationTypeSelectOptionOne: `vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
firstObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(1) [model="observation.description"] input`,
|
firstObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(1) [model="observation.description"] input`,
|
||||||
secondObservationTypeSelect: `vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"] input`,
|
secondObservationTypeAutocomplete: `vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"]`,
|
||||||
secondObservationTypeSelectOptionTwo: `vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
secondObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(2) [model="observation.description"] input`,
|
secondObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(2) [model="observation.description"] input`,
|
||||||
thirdObservationTypeSelect: `vn-client-address-edit [name=observations] :nth-child(3) [field="observation.observationTypeFk"] input`,
|
|
||||||
thirdObservationTypeSelectOptionThree: `vn-client-address-edit [name=observations] :nth-child(3) [field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(3)`,
|
|
||||||
thirdObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(3) [model="observation.description"] input`,
|
|
||||||
addObservationButton: `vn-client-address-edit vn-icon-button[icon="add_circle"]`,
|
addObservationButton: `vn-client-address-edit vn-icon-button[icon="add_circle"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `button[ui-sref="client.card.address.index"]`
|
cancelButton: `button[ui-sref="client.card.address.index"]`
|
||||||
|
@ -152,8 +137,7 @@ export default {
|
||||||
addGreugeFloatButton: `${components.vnFloatButton}`,
|
addGreugeFloatButton: `${components.vnFloatButton}`,
|
||||||
amountInput: `${components.vnTextfield}[name="amount"]`,
|
amountInput: `${components.vnTextfield}[name="amount"]`,
|
||||||
descriptionInput: `${components.vnTextfield}[name="description"]`,
|
descriptionInput: `${components.vnTextfield}[name="description"]`,
|
||||||
typeInput: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] input`,
|
typeAutocomplete: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"]`,
|
||||||
typeSecondOption: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`,
|
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstGreugeText: 'vn-client-greuge-index vn-card > div vn-table vn-tbody > vn-tr'
|
firstGreugeText: 'vn-client-greuge-index vn-card > div vn-table vn-tbody > vn-tr'
|
||||||
},
|
},
|
||||||
|
@ -193,12 +177,9 @@ export default {
|
||||||
},
|
},
|
||||||
itemCreateView: {
|
itemCreateView: {
|
||||||
name: `${components.vnTextfield}[name="name"]`,
|
name: `${components.vnTextfield}[name="name"]`,
|
||||||
typeSelect: `vn-autocomplete[field="$ctrl.item.typeFk"] input`,
|
typeAutocomplete: `vn-autocomplete[field="$ctrl.item.typeFk"]`,
|
||||||
typeSelectOptionThree: `vn-autocomplete[field="$ctrl.item.typeFk"] vn-drop-down ul > li:nth-child(3)`,
|
intrastatAutocomplete: `vn-autocomplete[field="$ctrl.item.intrastatFk"]`,
|
||||||
intrastatSelect: `vn-autocomplete[field="$ctrl.item.intrastatFk"] input`,
|
originAutocomplete: `vn-autocomplete[field="$ctrl.item.originFk"]`,
|
||||||
intrastatSelectOptionOne: `vn-autocomplete[field="$ctrl.item.intrastatFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
|
||||||
originSelectOptionOne: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
createButton: `${components.vnSubmit}`,
|
createButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `button[ui-sref="item.index"]`
|
cancelButton: `button[ui-sref="item.index"]`
|
||||||
},
|
},
|
||||||
|
@ -206,24 +187,19 @@ export default {
|
||||||
moreMenu: `vn-item-descriptor > vn-card > div vn-icon-menu > div > vn-icon`,
|
moreMenu: `vn-item-descriptor > vn-card > div vn-icon-menu > div > vn-icon`,
|
||||||
moreMenuRegularizeButton: `vn-item-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(1)`,
|
moreMenuRegularizeButton: `vn-item-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(1)`,
|
||||||
regularizeQuantityInput: `vn-item-descriptor > vn-dialog > div > form > div.body > tpl-body > div > vn-textfield > div > div > div.infix > input`,
|
regularizeQuantityInput: `vn-item-descriptor > vn-dialog > div > form > div.body > tpl-body > div > vn-textfield > div > div > div.infix > input`,
|
||||||
regularizeWarehouseSelect: `#warehouse > div > div > input`,
|
regularizeWarehouseAutocomplete: `#warehouse`,
|
||||||
regularizeWarehouseSelectSecondOption: `#warehouse > vn-drop-down > vn-popover > div > div.content > div > div.list > ul > li:nth-child(2)`,
|
|
||||||
regularizeSaveButton: `vn-item-descriptor > vn-dialog > div > form > div.buttons > tpl-buttons > button`
|
regularizeSaveButton: `vn-item-descriptor > vn-dialog > div > form > div.buttons > tpl-buttons > button`
|
||||||
},
|
},
|
||||||
itemBasicData: {
|
itemBasicData: {
|
||||||
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
||||||
basicDataButton: `vn-left-menu a[ui-sref="item.card.data"]`,
|
basicDataButton: `vn-left-menu a[ui-sref="item.card.data"]`,
|
||||||
typeSelect: `vn-autocomplete[field="$ctrl.item.typeFk"] input`,
|
typeAutocomplete: `vn-autocomplete[field="$ctrl.item.typeFk"]`,
|
||||||
typeSelectOptionThree: `vn-autocomplete[field="$ctrl.item.typeFk"] vn-drop-down ul > li:nth-child(3)`,
|
intrastatAutocomplete: `vn-autocomplete[field="$ctrl.item.intrastatFk"]`,
|
||||||
intrastatSelect: `vn-autocomplete[field="$ctrl.item.intrastatFk"] input`,
|
|
||||||
intrastatSelectOptionOne: `vn-autocomplete[field="$ctrl.item.intrastatFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
nameInput: `vn-textfield[label="Name"] input`,
|
nameInput: `vn-textfield[label="Name"] input`,
|
||||||
relevancyInput: `vn-textfield[label="Relevancy"] input`,
|
relevancyInput: `vn-textfield[label="Relevancy"] input`,
|
||||||
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
originAutocomplete: `vn-autocomplete[field="$ctrl.item.originFk"]`,
|
||||||
originSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
expenceAutocomplete: `vn-autocomplete[field="$ctrl.item.expenceFk"]`,
|
||||||
expenceSelect: `vn-autocomplete[field="$ctrl.item.expenceFk"] input`,
|
longNameInput: `vn-textfield[field="$ctrl.item.longName"] input`,
|
||||||
expenceSelectOptionThree: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(3)`,
|
|
||||||
longNameInput: `vn-textfield[label="Full name"] input`,
|
|
||||||
isActiveCheckbox: `vn-check[label='Active'] > label > input`,
|
isActiveCheckbox: `vn-check[label='Active'] > label > input`,
|
||||||
submitBasicDataButton: `${components.vnSubmit}`
|
submitBasicDataButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
|
@ -231,27 +207,22 @@ export default {
|
||||||
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
||||||
tagsButton: `vn-left-menu a[ui-sref="item.card.tags"]`,
|
tagsButton: `vn-left-menu a[ui-sref="item.card.tags"]`,
|
||||||
firstRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(2) vn-icon-button[icon="delete"]`,
|
firstRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(2) vn-icon-button[icon="delete"]`,
|
||||||
firstTagSelect: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
firstTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
firstTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
firstValueInput: `vn-item-tags vn-horizontal:nth-child(2) > vn-textfield[label="Value"] input`,
|
firstValueInput: `vn-item-tags vn-horizontal:nth-child(2) > vn-textfield[label="Value"] input`,
|
||||||
firstRelevancyInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Relevancy"] input`,
|
firstRelevancyInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Relevancy"] input`,
|
||||||
secondTagSelect: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
secondTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
secondTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
secondValueInput: `vn-item-tags vn-horizontal:nth-child(3) > vn-textfield[label="Value"] input`,
|
secondValueInput: `vn-item-tags vn-horizontal:nth-child(3) > vn-textfield[label="Value"] input`,
|
||||||
secondRelevancyInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Relevancy"] input`,
|
secondRelevancyInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Relevancy"] input`,
|
||||||
thirdTagSelect: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
thirdTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
thirdTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
thirdValueInput: `vn-item-tags vn-horizontal:nth-child(4) > vn-textfield[label="Value"] input`,
|
thirdValueInput: `vn-item-tags vn-horizontal:nth-child(4) > vn-textfield[label="Value"] input`,
|
||||||
thirdRelevancyInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Relevancy"] input`,
|
thirdRelevancyInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Relevancy"] input`,
|
||||||
fourthTagSelect: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
fourthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
fourthTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
fourthValueInput: `vn-item-tags vn-horizontal:nth-child(5) > vn-textfield[label="Value"] input`,
|
fourthValueInput: `vn-item-tags vn-horizontal:nth-child(5) > vn-textfield[label="Value"] input`,
|
||||||
fourthRelevancyInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Relevancy"] input`,
|
fourthRelevancyInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Relevancy"] input`,
|
||||||
fifthTagSelect: `vn-item-tags vn-horizontal:nth-child(6) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
fifthTagSelect: `vn-item-tags vn-horizontal:nth-child(6) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
||||||
fifthValueInput: `vn-item-tags vn-horizontal:nth-child(6) > vn-textfield[label="Value"] input`,
|
fifthValueInput: `vn-item-tags vn-horizontal:nth-child(6) > vn-textfield[label="Value"] input`,
|
||||||
fifthRelevancyInput: `vn-horizontal:nth-child(6) > vn-textfield[label="Relevancy"] input`,
|
fifthRelevancyInput: `vn-horizontal:nth-child(6) > vn-textfield[label="Relevancy"] input`,
|
||||||
seventhTagSelectOptionFive: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(5)`,
|
seventhTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
seventhTagSelect: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"] input`,
|
|
||||||
seventhValueInput: `vn-item-tags vn-horizontal:nth-child(8) > vn-textfield[label="Value"] input`,
|
seventhValueInput: `vn-item-tags vn-horizontal:nth-child(8) > vn-textfield[label="Value"] input`,
|
||||||
seventhRelevancyInput: `vn-horizontal:nth-child(8) > vn-textfield[label="Relevancy"] input`,
|
seventhRelevancyInput: `vn-horizontal:nth-child(8) > vn-textfield[label="Relevancy"] input`,
|
||||||
addItemTagButton: `vn-icon-button[icon="add_circle"]`,
|
addItemTagButton: `vn-icon-button[icon="add_circle"]`,
|
||||||
|
@ -259,12 +230,9 @@ export default {
|
||||||
},
|
},
|
||||||
itemTax: {
|
itemTax: {
|
||||||
taxButton: `vn-left-menu a[ui-sref="item.card.tax"]`,
|
taxButton: `vn-left-menu a[ui-sref="item.card.tax"]`,
|
||||||
firstClassSelect: `vn-horizontal:nth-child(2) > vn-autocomplete[field="tax.taxClassFk"] input`,
|
firstClassAutocomplete: `vn-horizontal:nth-child(2) > vn-autocomplete[field="tax.taxClassFk"]`,
|
||||||
firstClassSelectOptionTwo: `vn-horizontal:nth-child(2) > vn-autocomplete vn-drop-down ul > li:nth-child(2)`,
|
secondClassAutocomplete: `vn-horizontal:nth-child(3) > vn-autocomplete[field="tax.taxClassFk"]`,
|
||||||
secondClassSelect: `vn-horizontal:nth-child(3) > vn-autocomplete[field="tax.taxClassFk"] input`,
|
thirdClassAutocomplete: `vn-horizontal:nth-child(4) > vn-autocomplete[field="tax.taxClassFk"]`,
|
||||||
secondClassSelectOptionOne: `vn-horizontal:nth-child(3) > vn-autocomplete vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
thirdClassSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="tax.taxClassFk"] input`,
|
|
||||||
thirdClassSelectOptionTwo: `vn-horizontal:nth-child(4) > vn-autocomplete vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
submitTaxButton: `${components.vnSubmit}`
|
submitTaxButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
itemBarcodes: {
|
itemBarcodes: {
|
||||||
|
@ -277,26 +245,20 @@ export default {
|
||||||
itemNiches: {
|
itemNiches: {
|
||||||
nicheButton: `vn-left-menu a[ui-sref="item.card.niche"]`,
|
nicheButton: `vn-left-menu a[ui-sref="item.card.niche"]`,
|
||||||
addNicheButton: `vn-icon[icon="add_circle"]`,
|
addNicheButton: `vn-icon[icon="add_circle"]`,
|
||||||
firstWarehouseSelect: `vn-autocomplete[field="niche.warehouseFk"] input`,
|
firstWarehouseAutocomplete: `vn-autocomplete[field="niche.warehouseFk"] input`,
|
||||||
firstWarehouseSelectSecondOption: `vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Code"] input`,
|
firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Code"] input`,
|
||||||
secondWarehouseSelect: `vn-horizontal:nth-child(3) > vn-autocomplete[field="niche.warehouseFk"] input`,
|
secondWarehouseSelect: `vn-horizontal:nth-child(3) > vn-autocomplete[field="niche.warehouseFk"] input`,
|
||||||
secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Code"] input`,
|
secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Code"] input`,
|
||||||
secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-none > vn-icon[icon="delete"]`,
|
secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-none > vn-icon[icon="delete"]`,
|
||||||
thirdWarehouseSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] input`,
|
thirdWarehouseAutocomplete: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"]`,
|
||||||
thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`,
|
|
||||||
thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] input`,
|
thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] input`,
|
||||||
submitNichesButton: `${components.vnSubmit}`
|
submitNichesButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
itemBotanical: {
|
itemBotanical: {
|
||||||
botanicalButton: `vn-left-menu a[ui-sref="item.card.botanical"]`,
|
botanicalButton: `vn-left-menu a[ui-sref="item.card.botanical"]`,
|
||||||
botanicalInput: `vn-horizontal:nth-child(2) > ${components.vnTextfield}`,
|
botanicalInput: `vn-horizontal:nth-child(2) > ${components.vnTextfield}`,
|
||||||
genusSelect: `vn-autocomplete[field="$ctrl.botanical.genusFk"] input`,
|
genusAutocomplete: `vn-autocomplete[field="$ctrl.botanical.genusFk"]`,
|
||||||
genusSelectOptionOne: `vn-autocomplete[field="$ctrl.botanical.genusFk"] vn-drop-down ul > li:nth-child(1)`,
|
speciesAutocomplete: `vn-autocomplete[field="$ctrl.botanical.specieFk"]`,
|
||||||
genusSelectOptionTwo: `vn-autocomplete[field="$ctrl.botanical.genusFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
speciesSelect: `vn-autocomplete[field="$ctrl.botanical.specieFk"] input`,
|
|
||||||
speciesSelectOptionOne: `vn-autocomplete[field="$ctrl.botanical.specieFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
speciesSelectOptionTwo: `vn-autocomplete[field="$ctrl.botanical.specieFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
submitBotanicalButton: `${components.vnSubmit}`
|
submitBotanicalButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
itemSummary: {
|
itemSummary: {
|
||||||
|
@ -311,8 +273,7 @@ export default {
|
||||||
thirdTicketId: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(3) > vn-td:nth-child(2) > span',
|
thirdTicketId: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(3) > vn-td:nth-child(2) > span',
|
||||||
firstBalance: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td.balance',
|
firstBalance: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td.balance',
|
||||||
fifthBalance: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr.ng-scope.isToday.isIn > vn-td.balance > span',
|
fifthBalance: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr.ng-scope.isToday.isIn > vn-td.balance > span',
|
||||||
warehouseSelect: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"] > div > div > input',
|
warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]',
|
||||||
warehouseSelectFourthOption: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-horizontal > vn-autocomplete > vn-drop-down > vn-popover > div > div.content > div > div.list > ul > li:nth-child(4)'
|
|
||||||
},
|
},
|
||||||
ticketSummary: {
|
ticketSummary: {
|
||||||
sale: 'vn-ticket-summary > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-one > table > tbody > tr',
|
sale: 'vn-ticket-summary > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-one > table > tbody > tr',
|
||||||
|
@ -345,8 +306,7 @@ export default {
|
||||||
notesButton: `vn-left-menu a[ui-sref="ticket.card.observation"]`,
|
notesButton: `vn-left-menu a[ui-sref="ticket.card.observation"]`,
|
||||||
firstNoteRemoveButton: `vn-icon[icon="delete"]`,
|
firstNoteRemoveButton: `vn-icon[icon="delete"]`,
|
||||||
addNoteButton: `vn-icon[icon="add_circle"]`,
|
addNoteButton: `vn-icon[icon="add_circle"]`,
|
||||||
firstNoteSelect: `vn-autocomplete[field="observation.observationTypeFk"] input`,
|
firstNoteTypeAutocomplete: `vn-autocomplete[field="observation.observationTypeFk"]`,
|
||||||
firstNoteSelectSecondOption: `vn-autocomplete[field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
firstDescriptionInput: `vn-textfield[label="Description"] input`,
|
firstDescriptionInput: `vn-textfield[label="Description"] input`,
|
||||||
submitNotesButton: `${components.vnSubmit}`
|
submitNotesButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
|
@ -358,8 +318,7 @@ export default {
|
||||||
},
|
},
|
||||||
ticketPackages: {
|
ticketPackages: {
|
||||||
packagesButton: `vn-left-menu a[ui-sref="ticket.card.package.index"]`,
|
packagesButton: `vn-left-menu a[ui-sref="ticket.card.package.index"]`,
|
||||||
firstPackageSelect: `vn-autocomplete[label="Package"] > div > div > input`,
|
firstPackageAutocomplete: `vn-autocomplete[label="Package"]`,
|
||||||
firstPackageSelectOptionTwo: `vn-autocomplete[label="Package"] vn-drop-down ul > li:nth-child(2)`,
|
|
||||||
firstQuantityInput: `vn-textfield[label="Quantity"] input`,
|
firstQuantityInput: `vn-textfield[label="Quantity"] input`,
|
||||||
firstRemovePackageButton: `vn-icon[vn-tooltip="Remove package"]`,
|
firstRemovePackageButton: `vn-icon[vn-tooltip="Remove package"]`,
|
||||||
addPackageButton: `vn-icon-button[vn-tooltip="Add package"]`,
|
addPackageButton: `vn-icon-button[vn-tooltip="Add package"]`,
|
||||||
|
@ -472,9 +431,7 @@ export default {
|
||||||
},
|
},
|
||||||
claimBasicData: {
|
claimBasicData: {
|
||||||
basicDataButton: `vn-left-menu a[ui-sref="claim.card.basicData"]`,
|
basicDataButton: `vn-left-menu a[ui-sref="claim.card.basicData"]`,
|
||||||
claimStateSelect: `vn-autocomplete[field="$ctrl.claim.claimStateFk"] input`,
|
claimStateAutocomplete: 'vn-claim-basic-data vn-autocomplete[field="$ctrl.claim.claimStateFk"]',
|
||||||
claimStateSelectThirdOption: `vn-autocomplete[field="$ctrl.claim.claimStateFk"] vn-drop-down ul > li:nth-child(3)`,
|
|
||||||
claimStateSelectFourthOption: `vn-autocomplete[field="$ctrl.claim.claimStateFk"] vn-drop-down ul > li:nth-child(4)`,
|
|
||||||
isPaidWithManaCheckbox: `vn-check[field="$ctrl.claim.isChargedToMana"] > label > input`,
|
isPaidWithManaCheckbox: `vn-check[field="$ctrl.claim.isChargedToMana"] > label > input`,
|
||||||
responsabilityInputRange: `vn-input-range`,
|
responsabilityInputRange: `vn-input-range`,
|
||||||
observationInput: `vn-textarea[label="Observation"] textarea`,
|
observationInput: `vn-textarea[label="Observation"] textarea`,
|
||||||
|
|
|
@ -13,8 +13,7 @@ describe('Claim edit basic data path', () => {
|
||||||
|
|
||||||
it(`should edit claim state, is paid with mana and observation fields`, async() => {
|
it(`should edit claim state, is paid with mana and observation fields`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.claimBasicData.claimStateSelect)
|
.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Gestionado')
|
||||||
.waitToClick(selectors.claimBasicData.claimStateSelectThirdOption)
|
|
||||||
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
|
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
|
||||||
.clearInput(selectors.claimBasicData.observationInput)
|
.clearInput(selectors.claimBasicData.observationInput)
|
||||||
.type(selectors.claimBasicData.observationInput, 'edited observation')
|
.type(selectors.claimBasicData.observationInput, 'edited observation')
|
||||||
|
@ -30,7 +29,7 @@ describe('Claim edit basic data path', () => {
|
||||||
.wait(selectors.claimDetails.addItemButton)
|
.wait(selectors.claimDetails.addItemButton)
|
||||||
.click(selectors.claimBasicData.basicDataButton)
|
.click(selectors.claimBasicData.basicDataButton)
|
||||||
.wait(selectors.claimBasicData.claimStateSelect)
|
.wait(selectors.claimBasicData.claimStateSelect)
|
||||||
.waitToGetProperty(selectors.claimBasicData.claimStateSelect, 'value');
|
.waitToGetProperty(`${selectors.claimBasicData.claimStateAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Gestionado');
|
expect(result).toEqual('Gestionado');
|
||||||
});
|
});
|
||||||
|
@ -53,8 +52,7 @@ describe('Claim edit basic data path', () => {
|
||||||
|
|
||||||
it(`should edit the claim to leave it untainted`, async() => {
|
it(`should edit the claim to leave it untainted`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.claimBasicData.claimStateSelect)
|
.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Pendiente')
|
||||||
.waitToClick(selectors.claimBasicData.claimStateSelectFourthOption)
|
|
||||||
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
|
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
|
||||||
.clearInput(selectors.claimBasicData.observationInput)
|
.clearInput(selectors.claimBasicData.observationInput)
|
||||||
.type(selectors.claimBasicData.observationInput, 'Observation one')
|
.type(selectors.claimBasicData.observationInput, 'Observation one')
|
||||||
|
|
|
@ -42,8 +42,7 @@ describe('Client create path', () => {
|
||||||
.type(selectors.createClientView.taxNumber, '74451390E')
|
.type(selectors.createClientView.taxNumber, '74451390E')
|
||||||
.type(selectors.createClientView.userName, 'CaptainMarvel')
|
.type(selectors.createClientView.userName, 'CaptainMarvel')
|
||||||
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
|
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
|
||||||
.waitToClick(selectors.createClientView.salesPersonInput)
|
.autocompleteSearch(selectors.createClientView.salesPersonAutocomplete, 'Accessory')
|
||||||
.waitToClick(selectors.createClientView.salesBruceBannerOption)
|
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('Client Edit basicData path', () => {
|
||||||
.wait(selectors.clientBasicData.nameInput)
|
.wait(selectors.clientBasicData.nameInput)
|
||||||
.evaluate(selector => {
|
.evaluate(selector => {
|
||||||
return document.querySelector(selector).disabled;
|
return document.querySelector(selector).disabled;
|
||||||
}, selectors.clientBasicData.salesPersonInput);
|
}, `${selectors.clientBasicData.salesPersonAutocomplete} input`);
|
||||||
|
|
||||||
expect(result).toBeTruthy();
|
expect(result).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
@ -33,8 +33,7 @@ describe('Client Edit basicData path', () => {
|
||||||
.type(selectors.clientBasicData.mobileInput, '123456789')
|
.type(selectors.clientBasicData.mobileInput, '123456789')
|
||||||
.clearInput(selectors.clientBasicData.emailInput)
|
.clearInput(selectors.clientBasicData.emailInput)
|
||||||
.type(selectors.clientBasicData.emailInput, 'PWallace@verdnatura.es')
|
.type(selectors.clientBasicData.emailInput, 'PWallace@verdnatura.es')
|
||||||
.waitToClick(selectors.clientBasicData.channelInput)
|
.autocompleteSearch(selectors.clientBasicData.channelAutocomplete, 'Rumors on the streets')
|
||||||
.waitToClick(selectors.clientBasicData.channelRumorsOption)
|
|
||||||
.click(selectors.clientBasicData.saveButton)
|
.click(selectors.clientBasicData.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@ describe('Client Edit basicData path', () => {
|
||||||
|
|
||||||
it('should confirm the channel have been selected', async() => {
|
it('should confirm the channel have been selected', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientBasicData.channelInput, 'value');
|
.waitToGetProperty(`${selectors.clientBasicData.channelAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Rumors on the streets');
|
expect(result).toEqual('Rumors on the streets');
|
||||||
});
|
});
|
||||||
|
@ -101,7 +100,7 @@ describe('Client Edit basicData path', () => {
|
||||||
.wait(selectors.clientBasicData.nameInput)
|
.wait(selectors.clientBasicData.nameInput)
|
||||||
.evaluate(selector => {
|
.evaluate(selector => {
|
||||||
return document.querySelector(selector).disabled;
|
return document.querySelector(selector).disabled;
|
||||||
}, selectors.clientBasicData.salesPersonInput);
|
}, `${selectors.clientBasicData.salesPersonAutocomplete} input`);
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
@ -118,10 +117,8 @@ describe('Client Edit basicData path', () => {
|
||||||
.type(selectors.clientBasicData.mobileInput, '987654321')
|
.type(selectors.clientBasicData.mobileInput, '987654321')
|
||||||
.clearInput(selectors.clientBasicData.emailInput)
|
.clearInput(selectors.clientBasicData.emailInput)
|
||||||
.type(selectors.clientBasicData.emailInput, 'Storm@verdnatura.es')
|
.type(selectors.clientBasicData.emailInput, 'Storm@verdnatura.es')
|
||||||
.waitToClick(selectors.clientBasicData.salesPersonInput)
|
.autocompleteSearch(selectors.clientBasicData.salesPersonAutocomplete, 'Accessory')
|
||||||
.waitToClick(selectors.clientBasicData.salesPersonOptionOne)
|
.autocompleteSearch(selectors.clientBasicData.channelAutocomplete, 'Metropolis newspaper')
|
||||||
.waitToClick(selectors.clientBasicData.channelInput)
|
|
||||||
.waitToClick(selectors.clientBasicData.channelMetropolisOption)
|
|
||||||
.click(selectors.clientBasicData.saveButton)
|
.click(selectors.clientBasicData.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -168,14 +165,14 @@ describe('Client Edit basicData path', () => {
|
||||||
|
|
||||||
it('should confirm the sales person have been selected', async() => {
|
it('should confirm the sales person have been selected', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientBasicData.salesPersonInput, 'value');
|
.waitToGetProperty(`${selectors.clientBasicData.salesPersonAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('accessory accessory');
|
expect(result).toEqual('accessory accessory');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now confirm the channel have been selected', async() => {
|
it('should now confirm the channel have been selected', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientBasicData.channelInput, 'value');
|
.waitToGetProperty(`${selectors.clientBasicData.channelAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Metropolis newspaper');
|
expect(result).toEqual('Metropolis newspaper');
|
||||||
});
|
});
|
||||||
|
|
|
@ -76,10 +76,8 @@ describe('Client Edit fiscalData path', () => {
|
||||||
.type(selectors.clientFiscalData.postcodeInput, '12345')
|
.type(selectors.clientFiscalData.postcodeInput, '12345')
|
||||||
.clearInput(selectors.clientFiscalData.cityInput)
|
.clearInput(selectors.clientFiscalData.cityInput)
|
||||||
.type(selectors.clientFiscalData.cityInput, 'N/A')
|
.type(selectors.clientFiscalData.cityInput, 'N/A')
|
||||||
.waitToClick(selectors.clientFiscalData.countryInput)
|
.autocompleteSearch(selectors.clientFiscalData.countryAutocomplete, 'Francia')
|
||||||
.waitToClick(selectors.clientFiscalData.countryThirdOption)
|
.autocompleteSearch(selectors.clientFiscalData.provinceAutocomplete, 'Province two')
|
||||||
.waitToClick(selectors.clientFiscalData.provinceInput)
|
|
||||||
.waitToClick(selectors.clientFiscalData.provinceFifthOption)
|
|
||||||
.waitToClick(selectors.clientFiscalData.activeCheckboxLabel)
|
.waitToClick(selectors.clientFiscalData.activeCheckboxLabel)
|
||||||
.waitToClick(selectors.clientFiscalData.frozenCheckboxLabel)
|
.waitToClick(selectors.clientFiscalData.frozenCheckboxLabel)
|
||||||
.waitToClick(selectors.clientFiscalData.hasToInvoiceCheckboxLabel)
|
.waitToClick(selectors.clientFiscalData.hasToInvoiceCheckboxLabel)
|
||||||
|
@ -215,14 +213,14 @@ describe('Client Edit fiscalData path', () => {
|
||||||
|
|
||||||
it(`should confirm the country have been selected`, async() => {
|
it(`should confirm the country have been selected`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientFiscalData.countryInput, 'value');
|
.waitToGetProperty(`${selectors.clientFiscalData.countryAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Francia');
|
expect(result).toEqual('Francia');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the province have been selected`, async() => {
|
it(`should confirm the province have been selected`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientFiscalData.provinceInput, 'value');
|
.waitToGetProperty(`${selectors.clientFiscalData.provinceAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Province two');
|
expect(result).toEqual('Province two');
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,12 +13,8 @@ describe('Client Edit pay method path', () => {
|
||||||
|
|
||||||
it(`should attempt to edit the Pay method without an IBAN but fail`, async() => {
|
it(`should attempt to edit the Pay method without an IBAN but fail`, async() => {
|
||||||
const snackbarMessage = await nightmare
|
const snackbarMessage = await nightmare
|
||||||
.waitToClick(selectors.clientPayMethod.payMethodInput)
|
.autocompleteSearch(selectors.clientPayMethod.payMethodAutocomplete, 'PayMethod with IBAN')
|
||||||
.waitToClick(selectors.clientPayMethod.payMethodIBANOption)
|
.autocompleteSearch(selectors.clientPayMethod.swiftBicAutocomplete, 'BBKKESMMMMM')
|
||||||
.waitForTextInInput(selectors.clientPayMethod.payMethodInput, 'PayMethod with IBAN')
|
|
||||||
.waitToClick(selectors.clientPayMethod.swiftBicInput)
|
|
||||||
.waitToClick(selectors.clientPayMethod.firstSwiftBicOption)
|
|
||||||
.waitForTextInInput(selectors.clientPayMethod.swiftBicInput, 'BBKKESMMMMM')
|
|
||||||
.clearInput(selectors.clientPayMethod.dueDayInput)
|
.clearInput(selectors.clientPayMethod.dueDayInput)
|
||||||
.type(selectors.clientPayMethod.dueDayInput, '60')
|
.type(selectors.clientPayMethod.dueDayInput, '60')
|
||||||
.waitForTextInInput(selectors.clientPayMethod.dueDayInput, '60')
|
.waitForTextInInput(selectors.clientPayMethod.dueDayInput, '60')
|
||||||
|
@ -49,14 +45,14 @@ describe('Client Edit pay method path', () => {
|
||||||
.type(selectors.clientPayMethod.newBankEntityName, 'Gotham City Banks')
|
.type(selectors.clientPayMethod.newBankEntityName, 'Gotham City Banks')
|
||||||
.type(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT')
|
.type(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT')
|
||||||
.click(selectors.clientPayMethod.acceptBankEntityButton)
|
.click(selectors.clientPayMethod.acceptBankEntityButton)
|
||||||
.waitToGetProperty(selectors.clientPayMethod.swiftBicInput, 'value');
|
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(newcode).toEqual('GTHMCT Gotham City Banks');
|
expect(newcode).toEqual('GTHMCT Gotham City Banks');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the IBAN pay method is sucessfully saved`, async() => {
|
it(`should confirm the IBAN pay method is sucessfully saved`, async() => {
|
||||||
const payMethod = await nightmare
|
const payMethod = await nightmare
|
||||||
.waitToGetProperty(selectors.clientPayMethod.payMethodInput, 'value');
|
.waitToGetProperty(`${selectors.clientPayMethod.payMethodAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(payMethod).toEqual('PayMethod with IBAN');
|
expect(payMethod).toEqual('PayMethod with IBAN');
|
||||||
});
|
});
|
||||||
|
@ -77,7 +73,7 @@ describe('Client Edit pay method path', () => {
|
||||||
|
|
||||||
it('should confirm the swift / BIC code was saved', async() => {
|
it('should confirm the swift / BIC code was saved', async() => {
|
||||||
const code = await nightmare
|
const code = await nightmare
|
||||||
.waitToGetProperty(selectors.clientPayMethod.swiftBicInput, 'value');
|
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(code).toEqual('GTHMCT Gotham City Banks');
|
expect(code).toEqual('GTHMCT Gotham City Banks');
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,10 +43,8 @@ describe('Client Add address path', () => {
|
||||||
.waitToClick(selectors.clientAddresses.defaultCheckboxInput)
|
.waitToClick(selectors.clientAddresses.defaultCheckboxInput)
|
||||||
.clearInput(selectors.clientAddresses.streetAddressInput)
|
.clearInput(selectors.clientAddresses.streetAddressInput)
|
||||||
.type(selectors.clientAddresses.postcodeInput, '10022')
|
.type(selectors.clientAddresses.postcodeInput, '10022')
|
||||||
.waitToClick(selectors.clientAddresses.provinceInput)
|
.autocompleteSearch(selectors.clientAddresses.provinceAutocomplete, 'Province four')
|
||||||
.waitToClick(selectors.clientAddresses.provinceSecondOption)
|
.autocompleteSearch(selectors.clientAddresses.agencyAutocomplete, 'Entanglement')
|
||||||
.waitToClick(selectors.clientAddresses.agencyInput)
|
|
||||||
.waitToClick(selectors.clientAddresses.agenctySecondOption)
|
|
||||||
.type(selectors.clientAddresses.phoneInput, '999887744')
|
.type(selectors.clientAddresses.phoneInput, '999887744')
|
||||||
.type(selectors.clientAddresses.mobileInput, '999887744')
|
.type(selectors.clientAddresses.mobileInput, '999887744')
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
|
|
|
@ -35,8 +35,7 @@ describe('Client add address notes path', () => {
|
||||||
it('should not save an observation type without description', async() => {
|
it('should not save an observation type without description', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput(selectors.clientAddresses.firstObservationDescriptionInput)
|
.clearInput(selectors.clientAddresses.firstObservationDescriptionInput)
|
||||||
.waitToClick(selectors.clientAddresses.firstObservationTypeSelect)
|
.autocompleteSearch(selectors.clientAddresses.firstObservationTypeAutocomplete, 'comercial')
|
||||||
.waitToClick(selectors.clientAddresses.firstObservationTypeSelectOptionOne)
|
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -47,8 +46,7 @@ describe('Client add address notes path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
||||||
.waitToClick(selectors.clientAddresses.addObservationButton)
|
.waitToClick(selectors.clientAddresses.addObservationButton)
|
||||||
.waitToClick(selectors.clientAddresses.secondObservationTypeSelect)
|
.autocompleteSearch(selectors.clientAddresses.secondObservationTypeAutocomplete, 'observation one')
|
||||||
.waitToClick(selectors.clientAddresses.secondObservationTypeSelectOptionTwo)
|
|
||||||
.type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
|
.type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
|
@ -22,8 +22,7 @@ describe('Client Add greuge path', () => {
|
||||||
|
|
||||||
it(`should receive an error if all fields are empty but date and type on submit`, async() => {
|
it(`should receive an error if all fields are empty but date and type on submit`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.clientGreuge.typeInput)
|
.autocompleteSearch(selectors.clientGreuge.typeAutocomplete, 'Diff')
|
||||||
.waitToClick(selectors.clientGreuge.typeSecondOption)
|
|
||||||
.click(selectors.clientGreuge.saveButton)
|
.click(selectors.clientGreuge.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
|
|
@ -16,24 +16,20 @@ describe('Item Edit basic data path', () => {
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
.clearInput(selectors.itemBasicData.nameInput)
|
.clearInput(selectors.itemBasicData.nameInput)
|
||||||
.type(selectors.itemBasicData.nameInput, 'Rose of Purity')
|
.type(selectors.itemBasicData.nameInput, 'Rose of Purity')
|
||||||
.waitToClick(selectors.itemBasicData.typeSelect)
|
.autocompleteSearch(selectors.itemBasicData.typeAutocomplete, 'Crisantemo')
|
||||||
.waitToClick(selectors.itemBasicData.typeSelectOptionThree)
|
.autocompleteSearch(selectors.itemBasicData.intrastatAutocomplete, 'Coral y materiales similares')
|
||||||
.waitToClick(selectors.itemBasicData.intrastatSelect)
|
|
||||||
.waitToClick(selectors.itemBasicData.intrastatSelectOptionOne)
|
|
||||||
.clearInput(selectors.itemBasicData.relevancyInput)
|
.clearInput(selectors.itemBasicData.relevancyInput)
|
||||||
.type(selectors.itemBasicData.relevancyInput, '1')
|
.type(selectors.itemBasicData.relevancyInput, '1')
|
||||||
.waitToClick(selectors.itemBasicData.originSelect)
|
.autocompleteSearch(selectors.itemBasicData.originAutocomplete, 'Spain')
|
||||||
.waitToClick(selectors.itemBasicData.originSelectOptionTwo)
|
.autocompleteSearch(selectors.itemBasicData.expenceAutocomplete, 'Alquiler VNH')
|
||||||
.waitToClick(selectors.itemBasicData.expenceSelect)
|
|
||||||
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
|
|
||||||
.clearInput(selectors.itemBasicData.longNameInput)
|
.clearInput(selectors.itemBasicData.longNameInput)
|
||||||
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
||||||
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
|
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
|
||||||
.click(selectors.itemBasicData.submitBasicDataButton)
|
.waitToClick(selectors.itemBasicData.submitBasicDataButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
}, 15000);
|
||||||
|
|
||||||
it(`should confirm the item name was edited`, async() => {
|
it(`should confirm the item name was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
|
@ -47,14 +43,14 @@ describe('Item Edit basic data path', () => {
|
||||||
|
|
||||||
it(`should confirm the item type was edited`, async() => {
|
it(`should confirm the item type was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.typeSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.typeAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Crisantemo');
|
expect(result).toEqual('Crisantemo');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item intrastad was edited`, async() => {
|
it(`should confirm the item intrastad was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.intrastatSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.intrastatAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('5080000 Coral y materiales similares');
|
expect(result).toEqual('5080000 Coral y materiales similares');
|
||||||
});
|
});
|
||||||
|
@ -68,16 +64,16 @@ describe('Item Edit basic data path', () => {
|
||||||
|
|
||||||
it(`should confirm the item origin was edited`, async() => {
|
it(`should confirm the item origin was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.originSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.originAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Spain');
|
expect(result).toEqual('Spain');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item expence was edited`, async() => {
|
it(`should confirm the item expence was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.expenceSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.expenceAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Adquisición mercancia Extracomunitaria');
|
expect(result).toEqual('Alquiler VNH');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the item long name was edited`, async() => {
|
it(`should confirm the item long name was edited`, async() => {
|
||||||
|
|
|
@ -13,12 +13,9 @@ describe('Item edit tax path', () => {
|
||||||
|
|
||||||
it(`should add the item tax to all countries`, async() => {
|
it(`should add the item tax to all countries`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemTax.firstClassSelect)
|
.autocompleteSearch(selectors.itemTax.firstClassAutocomplete, 'Reduced VAT')
|
||||||
.waitToClick(selectors.itemTax.firstClassSelectOptionTwo)
|
.autocompleteSearch(selectors.itemTax.secondClassAutocomplete, 'General VAT')
|
||||||
.waitToClick(selectors.itemTax.secondClassSelect)
|
.autocompleteSearch(selectors.itemTax.thirdClassAutocomplete, 'Reduced VAT')
|
||||||
.waitToClick(selectors.itemTax.secondClassSelectOptionOne)
|
|
||||||
.waitToClick(selectors.itemTax.thirdClassSelect)
|
|
||||||
.waitToClick(selectors.itemTax.thirdClassSelectOptionTwo)
|
|
||||||
.click(selectors.itemTax.submitTaxButton)
|
.click(selectors.itemTax.submitTaxButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -31,22 +28,21 @@ describe('Item edit tax path', () => {
|
||||||
.wait(selectors.itemTags.firstTagDisabled)
|
.wait(selectors.itemTags.firstTagDisabled)
|
||||||
.click(selectors.itemTax.taxButton)
|
.click(selectors.itemTax.taxButton)
|
||||||
.waitToClick(selectors.itemTax.taxButton)
|
.waitToClick(selectors.itemTax.taxButton)
|
||||||
.waitForTextInInput(selectors.itemTax.firstClassSelect, 'reduced')
|
.waitToGetProperty(`${selectors.itemTax.firstClassAutocomplete} input`, 'value');
|
||||||
.waitToGetProperty(selectors.itemTax.firstClassSelect, 'value');
|
|
||||||
|
|
||||||
expect(firstVatType).toEqual('Reduced VAT');
|
expect(firstVatType).toEqual('Reduced VAT');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the second item tax class was edited`, async() => {
|
it(`should confirm the second item tax class was edited`, async() => {
|
||||||
const secondVatType = await nightmare
|
const secondVatType = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTax.secondClassSelect, 'value');
|
.waitToGetProperty(`${selectors.itemTax.secondClassAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(secondVatType).toEqual('General VAT');
|
expect(secondVatType).toEqual('General VAT');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the third item tax class was edited`, async() => {
|
it(`should confirm the third item tax class was edited`, async() => {
|
||||||
const thirdVatType = await nightmare
|
const thirdVatType = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTax.thirdClassSelect, 'value');
|
.waitToGetProperty(`${selectors.itemTax.thirdClassAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(thirdVatType).toEqual('Reduced VAT');
|
expect(thirdVatType).toEqual('Reduced VAT');
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,8 +15,7 @@ describe('Item create tags path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemTags.firstRemoveTagButton)
|
.waitToClick(selectors.itemTags.firstRemoveTagButton)
|
||||||
.waitToClick(selectors.itemTags.addItemTagButton)
|
.waitToClick(selectors.itemTags.addItemTagButton)
|
||||||
.waitToClick(selectors.itemTags.seventhTagSelect)
|
.autocompleteSearch(selectors.itemTags.seventhTagAutocomplete, 'Ancho de la base')
|
||||||
.waitToClick(selectors.itemTags.seventhTagSelectOptionFive)
|
|
||||||
.type(selectors.itemTags.seventhValueInput, '50')
|
.type(selectors.itemTags.seventhValueInput, '50')
|
||||||
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
||||||
.type(selectors.itemTags.seventhRelevancyInput, '1')
|
.type(selectors.itemTags.seventhRelevancyInput, '1')
|
||||||
|
@ -32,7 +31,7 @@ describe('Item create tags path', () => {
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
.click(selectors.itemTags.tagsButton)
|
.click(selectors.itemTags.tagsButton)
|
||||||
.wait('vn-item-tags')
|
.wait('vn-item-tags')
|
||||||
.waitToGetProperty(selectors.itemTags.firstTagSelect, 'value');
|
.waitToGetProperty(`${selectors.itemTags.firstTagAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ancho de la base');
|
expect(result).toEqual('Ancho de la base');
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ describe('Item create tags path', () => {
|
||||||
|
|
||||||
it(`should confirm the second row data is the expected one`, async() => {
|
it(`should confirm the second row data is the expected one`, async() => {
|
||||||
let tag = await nightmare
|
let tag = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.secondTagSelect, 'value');
|
.waitToGetProperty(`${selectors.itemTags.secondTagAutocomplete} input`, 'value');
|
||||||
|
|
||||||
let value = await nightmare
|
let value = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.secondValueInput, 'value');
|
.waitToGetProperty(selectors.itemTags.secondValueInput, 'value');
|
||||||
|
@ -64,7 +63,7 @@ describe('Item create tags path', () => {
|
||||||
|
|
||||||
it(`should confirm the third row data is the expected one`, async() => {
|
it(`should confirm the third row data is the expected one`, async() => {
|
||||||
let tag = await nightmare
|
let tag = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.thirdTagSelect, 'value');
|
.waitToGetProperty(`${selectors.itemTags.thirdTagAutocomplete} input`, 'value');
|
||||||
|
|
||||||
let value = await nightmare
|
let value = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.thirdValueInput, 'value');
|
.waitToGetProperty(selectors.itemTags.thirdValueInput, 'value');
|
||||||
|
@ -79,7 +78,7 @@ describe('Item create tags path', () => {
|
||||||
|
|
||||||
it(`should confirm the fourth row data is the expected one`, async() => {
|
it(`should confirm the fourth row data is the expected one`, async() => {
|
||||||
let tag = await nightmare
|
let tag = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.fourthTagSelect, 'value');
|
.waitToGetProperty(`${selectors.itemTags.fourthTagAutocomplete} input`, 'value');
|
||||||
|
|
||||||
let value = await nightmare
|
let value = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.fourthValueInput, 'value');
|
.waitToGetProperty(selectors.itemTags.fourthValueInput, 'value');
|
||||||
|
|
|
@ -15,8 +15,7 @@ describe('Item create niche path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemNiches.addNicheButton)
|
.waitToClick(selectors.itemNiches.addNicheButton)
|
||||||
.waitToClick(selectors.itemNiches.secondNicheRemoveButton)
|
.waitToClick(selectors.itemNiches.secondNicheRemoveButton)
|
||||||
.waitToClick(selectors.itemNiches.thirdWarehouseSelect)
|
.autocompleteSearch(selectors.itemNiches.thirdWarehouseAutocomplete, 'Warehouse Two')
|
||||||
.waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption)
|
|
||||||
.type(selectors.itemNiches.thirdCodeInput, 'A4')
|
.type(selectors.itemNiches.thirdCodeInput, 'A4')
|
||||||
.click(selectors.itemNiches.submitNichesButton)
|
.click(selectors.itemNiches.submitNichesButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
@ -29,8 +28,8 @@ describe('Item create niche path', () => {
|
||||||
.click(selectors.itemBasicData.basicDataButton)
|
.click(selectors.itemBasicData.basicDataButton)
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
.click(selectors.itemNiches.nicheButton)
|
.click(selectors.itemNiches.nicheButton)
|
||||||
.waitForTextInInput(selectors.itemNiches.firstWarehouseSelect, 'Warehouse One')
|
.waitForTextInInput(`${selectors.itemNiches.firstWarehouseAutocomplete}`, 'Warehouse One')
|
||||||
.waitToGetProperty(selectors.itemNiches.firstWarehouseSelect, 'value');
|
.waitToGetProperty(`${selectors.itemNiches.firstWarehouseAutocomplete}`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse One');
|
expect(result).toEqual('Warehouse One');
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
|
@ -53,7 +52,7 @@ describe('Item create niche path', () => {
|
||||||
|
|
||||||
it(`should confirm the third niche is the expected one`, async() => {
|
it(`should confirm the third niche is the expected one`, async() => {
|
||||||
let result = await nightmare
|
let result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemNiches.thirdWarehouseSelect, 'value');
|
.waitToGetProperty(`${selectors.itemNiches.thirdWarehouseAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse Two');
|
expect(result).toEqual('Warehouse Two');
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
|
|
|
@ -15,10 +15,8 @@ describe('Item Create botanical path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.itemBotanical.botanicalInput)
|
.wait(selectors.itemBotanical.botanicalInput)
|
||||||
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
||||||
.waitToClick(selectors.itemBotanical.genusSelect)
|
.autocompleteSearch(selectors.itemBotanical.genusAutocomplete, 'Abelia')
|
||||||
.waitToClick(selectors.itemBotanical.genusSelectOptionOne)
|
.autocompleteSearch(selectors.itemBotanical.speciesAutocomplete, 'dealbata')
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelect)
|
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelectOptionOne)
|
|
||||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -38,15 +36,15 @@ describe('Item Create botanical path', () => {
|
||||||
|
|
||||||
it(`should confirm the Genus for item Mjolnir was created`, async() => {
|
it(`should confirm the Genus for item Mjolnir was created`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInInput(selectors.itemBotanical.genusSelect, 'Abelia')
|
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abelia')
|
||||||
.waitToGetProperty(selectors.itemBotanical.genusSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Abelia');
|
expect(result).toEqual('Abelia');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Species for item Mjolnir was created`, async() => {
|
it(`should confirm the Species for item Mjolnir was created`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBotanical.speciesSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('dealbata');
|
expect(result).toEqual('dealbata');
|
||||||
});
|
});
|
||||||
|
@ -55,10 +53,8 @@ describe('Item Create botanical path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput(selectors.itemBotanical.botanicalInput)
|
.clearInput(selectors.itemBotanical.botanicalInput)
|
||||||
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
||||||
.waitToClick(selectors.itemBotanical.genusSelect)
|
.autocompleteSearch(selectors.itemBotanical.genusAutocomplete, 'Abies')
|
||||||
.waitToClick(selectors.itemBotanical.genusSelectOptionTwo)
|
.autocompleteSearch(selectors.itemBotanical.speciesAutocomplete, 'decurrens')
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelect)
|
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelectOptionTwo)
|
|
||||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -78,15 +74,15 @@ describe('Item Create botanical path', () => {
|
||||||
|
|
||||||
it(`should confirm the Genus for item Mjolnir was edited`, async() => {
|
it(`should confirm the Genus for item Mjolnir was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInInput(selectors.itemBotanical.genusSelect, 'Abies')
|
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abies')
|
||||||
.waitToGetProperty(selectors.itemBotanical.genusSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Abies');
|
expect(result).toEqual('Abies');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Species for item Mjolnir was edited`, async() => {
|
it(`should confirm the Species for item Mjolnir was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBotanical.speciesSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('decurrens');
|
expect(result).toEqual('decurrens');
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,12 +50,9 @@ describe('Item Create/Clone path', () => {
|
||||||
it('should create the Infinity Gauntlet item', async() => {
|
it('should create the Infinity Gauntlet item', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.type(selectors.itemCreateView.name, 'Infinity Gauntlet')
|
.type(selectors.itemCreateView.name, 'Infinity Gauntlet')
|
||||||
.waitToClick(selectors.itemCreateView.typeSelect)
|
.autocompleteSearch(selectors.itemCreateView.typeAutocomplete, 'Crisantemo')
|
||||||
.waitToClick(selectors.itemCreateView.typeSelectOptionThree)
|
.autocompleteSearch(selectors.itemCreateView.intrastatAutocomplete, 'Coral y materiales similares')
|
||||||
.waitToClick(selectors.itemCreateView.intrastatSelect)
|
.autocompleteSearch(selectors.itemCreateView.originAutocomplete, 'Holand')
|
||||||
.waitToClick(selectors.itemCreateView.intrastatSelectOptionOne)
|
|
||||||
.waitToClick(selectors.itemCreateView.originSelect)
|
|
||||||
.waitToClick(selectors.itemCreateView.originSelectOptionOne)
|
|
||||||
.click(selectors.itemCreateView.createButton)
|
.click(selectors.itemCreateView.createButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -70,19 +67,19 @@ describe('Item Create/Clone path', () => {
|
||||||
|
|
||||||
|
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.typeSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.typeAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Crisantemo');
|
expect(result).toEqual('Crisantemo');
|
||||||
|
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.intrastatSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.intrastatAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('6021010 Plantas vivas: Esqueje/injerto, Vid');
|
expect(result).toEqual('5080000 Coral y materiales similares');
|
||||||
|
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemBasicData.originSelect, 'value');
|
.waitToGetProperty(`${selectors.itemBasicData.originAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Spain');
|
expect(result).toEqual('Holand');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,7 @@ describe('Item regularize path', () => {
|
||||||
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
|
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
|
||||||
.wait(selectors.itemDescriptor.regularizeQuantityInput)
|
.wait(selectors.itemDescriptor.regularizeQuantityInput)
|
||||||
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
||||||
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelect)
|
.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'Warehouse One')
|
||||||
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelectSecondOption)
|
|
||||||
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
|
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -128,8 +127,7 @@ describe('Item regularize path', () => {
|
||||||
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
|
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
|
||||||
.wait(selectors.itemDescriptor.regularizeQuantityInput)
|
.wait(selectors.itemDescriptor.regularizeQuantityInput)
|
||||||
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
|
||||||
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelect)
|
.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'Warehouse One')
|
||||||
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelectSecondOption)
|
|
||||||
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
|
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,7 @@ describe('Ticket Create notes path', () => {
|
||||||
let result = await nightmare
|
let result = await nightmare
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
|
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
|
||||||
.waitToClick(selectors.ticketNotes.addNoteButton)
|
.waitToClick(selectors.ticketNotes.addNoteButton)
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteSelect)
|
.autocompleteSearch(selectors.ticketNotes.firstNoteTypeAutocomplete, 'observation one')
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption)
|
|
||||||
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
||||||
.click(selectors.ticketNotes.submitNotesButton)
|
.click(selectors.ticketNotes.submitNotesButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
@ -25,13 +24,13 @@ describe('Ticket Create notes path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the note is the expected one`, async() => {
|
it(`should confirm the note is the expected one`, async() => {
|
||||||
let firstNoteSelect = await nightmare
|
let result = await nightmare
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.click(selectors.ticketPackages.packagesButton)
|
||||||
.wait(selectors.ticketPackages.firstPackageSelect)
|
.wait(selectors.ticketPackages.firstPackageAutocomplete)
|
||||||
.click(selectors.ticketNotes.notesButton)
|
.click(selectors.ticketNotes.notesButton)
|
||||||
.waitToGetProperty(selectors.ticketNotes.firstNoteSelect, 'value');
|
.waitToGetProperty(`${selectors.ticketNotes.firstNoteTypeAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(firstNoteSelect).toEqual('observation one');
|
expect(result).toEqual('observation one');
|
||||||
|
|
||||||
let firstDescription = await nightmare
|
let firstDescription = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
|
.waitToGetProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('Ticket Delete expeditions path', () => {
|
||||||
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
||||||
.waitToClick(selectors.ticketExpedition.acceptDeleteRowButton)
|
.waitToClick(selectors.ticketExpedition.acceptDeleteRowButton)
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.click(selectors.ticketPackages.packagesButton)
|
||||||
.wait(selectors.ticketPackages.firstPackageSelect)
|
.wait(selectors.ticketPackages.firstPackageAutocomplete)
|
||||||
.click(selectors.ticketExpedition.expeditionButton)
|
.click(selectors.ticketExpedition.expeditionButton)
|
||||||
.wait(selectors.ticketExpedition.expeditionRow)
|
.wait(selectors.ticketExpedition.expeditionRow)
|
||||||
.countElement(selectors.ticketExpedition.expeditionRow);
|
.countElement(selectors.ticketExpedition.expeditionRow);
|
||||||
|
|
|
@ -15,8 +15,7 @@ describe('Ticket Create packages path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
|
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
|
||||||
.waitToClick(selectors.ticketPackages.addPackageButton)
|
.waitToClick(selectors.ticketPackages.addPackageButton)
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelect)
|
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
|
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -55,9 +54,7 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
it(`should create a new package with correct data`, async() => {
|
it(`should create a new package with correct data`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelect)
|
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
|
|
||||||
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
|
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
@ -66,11 +63,11 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
it(`should confirm the first select is the expected one`, async() => {
|
it(`should confirm the first select is the expected one`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.click(selectors.ticketSales.saleButton)
|
.waitToClick(selectors.ticketSales.saleButton)
|
||||||
.wait(selectors.ticketSales.firstPackageSelect)
|
.wait(selectors.ticketSales.firstPackageAutocomplete)
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.waitToClick(selectors.ticketPackages.packagesButton)
|
||||||
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
|
.waitForTextInInput(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'Legendary Box')
|
||||||
.waitToGetProperty(selectors.ticketPackages.firstPackageSelect, 'value');
|
.waitToGetProperty(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('7 : Legendary Box');
|
expect(result).toEqual('7 : Legendary Box');
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('Ticket Edit sale path', () => {
|
||||||
it(`should click on the first claim id to navigate over there`, async() => {
|
it(`should click on the first claim id to navigate over there`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.ticketSales.secondSaleClaimId)
|
.waitToClick(selectors.ticketSales.secondSaleClaimId)
|
||||||
.wait(selectors.claimBasicData.claimStateSelect)
|
.wait(selectors.claimBasicData.claimStateAutocomplete)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/claim/2/basic-data');
|
expect(url.hash).toEqual('#!/claim/2/basic-data');
|
||||||
|
@ -211,7 +211,7 @@ describe('Ticket Edit sale path', () => {
|
||||||
.waitToClick(selectors.ticketSales.thirdSaleCheckbox)
|
.waitToClick(selectors.ticketSales.thirdSaleCheckbox)
|
||||||
.waitToClick(selectors.ticketSales.moreMenuButton)
|
.waitToClick(selectors.ticketSales.moreMenuButton)
|
||||||
.waitToClick(selectors.ticketSales.moreMenuCreateClaim)
|
.waitToClick(selectors.ticketSales.moreMenuCreateClaim)
|
||||||
.wait(selectors.claimBasicData.claimStateSelect)
|
.wait(selectors.claimBasicData.claimStateAutocomplete)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/claim/4/basic-data');
|
expect(url.hash).toEqual('#!/claim/4/basic-data');
|
||||||
|
|
|
@ -58,8 +58,7 @@ describe('Ticket diary path', () => {
|
||||||
|
|
||||||
it(`should change to the warehouse two and check there are sales marked as negative balance`, async() => {
|
it(`should change to the warehouse two and check there are sales marked as negative balance`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemDiary.warehouseSelect)
|
.autocompleteSearch(selectors.itemDiary.warehouseAutocomplete, 'Warehouse Two')
|
||||||
.waitToClick(selectors.itemDiary.warehouseSelectFourthOption)
|
|
||||||
.waitToGetProperty(selectors.itemDiary.firstBalance, 'className');
|
.waitToGetProperty(selectors.itemDiary.firstBalance, 'className');
|
||||||
|
|
||||||
expect(result).toContain('balance');
|
expect(result).toContain('balance');
|
||||||
|
|
Loading…
Reference in New Issue