#907 Extensiones nightmare

This commit is contained in:
Carlos Jimenez 2019-01-07 09:33:07 +01:00
parent 535d98f485
commit f67dce0a91
22 changed files with 361 additions and 431 deletions

View File

@ -315,6 +315,20 @@ let actions = {
})
.then(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`));
});
}
};

View File

@ -28,8 +28,7 @@ export default {
socialName: `${components.vnTextfield}[name="socialName"]`,
userName: `${components.vnTextfield}[name="userName"]`,
email: `${components.vnTextfield}[name="email"]`,
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
salesPersonAutocomplete: `vn-autocomplete[field="$ctrl.client.salesPersonFk"]`,
createButton: `${components.vnSubmit}`,
cancelButton: `vn-button[href="#!/client/index"]`
},
@ -41,11 +40,8 @@ export default {
mobileInput: `${components.vnTextfield}[name="mobile"]`,
faxInput: `${components.vnTextfield}[name="fax"]`,
emailInput: `${components.vnTextfield}[name="email"]`,
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
salesPersonOptionOne: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
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)`,
salesPersonAutocomplete: `vn-autocomplete[field="$ctrl.client.salesPersonFk"]`,
channelAutocomplete: `vn-autocomplete[field="$ctrl.client.contactChannelFk"]`,
saveButton: `${components.vnSubmit}`
},
clientFiscalData: {
@ -57,10 +53,8 @@ export default {
addressInput: `${components.vnTextfield}[name="street"]`,
cityInput: `${components.vnTextfield}[name="city"]`,
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
provinceInput: `vn-autocomplete[field="$ctrl.client.provinceFk"] input`,
provinceFifthOption: `vn-autocomplete[field="$ctrl.client.provinceFk"] vn-drop-down ul > li:nth-child(5)`,
countryInput: `vn-autocomplete[field="$ctrl.client.countryFk"] input`,
countryThirdOption: `vn-autocomplete[field="$ctrl.client.countryFk"] vn-drop-down ul > li:nth-child(3)`,
provinceAutocomplete: `vn-autocomplete[field="$ctrl.client.provinceFk"]`,
countryAutocomplete: `vn-autocomplete[field="$ctrl.client.countryFk"]`,
activeCheckboxLabel: `vn-check[label="Active"] > label`,
activeCheckboxInput: `vn-check[label="Active"] input`,
frozenCheckboxLabel: `vn-check[label="Frozen"] > label`,
@ -77,15 +71,13 @@ export default {
},
clientPayMethod: {
payMethodButton: `vn-left-menu a[ui-sref="client.card.billingData"]`,
payMethodInput: `vn-autocomplete[field="$ctrl.client.payMethodFk"] input`,
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)`,
payMethodAutocomplete: `vn-autocomplete[field="$ctrl.client.payMethodFk"]`,
IBANInput: `${components.vnTextfield}[name="iban"]`,
dueDayInput: `${components.vnTextfield}[name="dueDay"]`,
receivedCoreLCRCheckbox: `vn-check[label='Received LCR'] > label > input`,
receivedCoreVNLCheckbox: `vn-check[label='Received core 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)`,
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',
@ -102,10 +94,8 @@ export default {
streetAddressInput: `${components.vnTextfield}[name="street"]`,
postcodeInput: `${components.vnTextfield}[name="postalCode"]`,
cityInput: `${components.vnTextfield}[name="city"]`,
provinceInput: `vn-autocomplete[field="$ctrl.address.provinceFk"] input`,
provinceSecondOption: `vn-autocomplete[field="$ctrl.address.provinceFk"] vn-drop-down ul > li:nth-child(2)`,
agencyInput: `vn-autocomplete[field="$ctrl.address.agencyModeFk"] input`,
agenctySecondOption: `vn-autocomplete[field="$ctrl.address.agencyModeFk"] vn-drop-down ul > li:nth-child(2)`,
provinceAutocomplete: `vn-autocomplete[field="$ctrl.address.provinceFk"]`,
agencyAutocomplete: `vn-autocomplete[field="$ctrl.address.agencyModeFk"]`,
phoneInput: `${components.vnTextfield}[name="phone"]`,
mobileInput: `${components.vnTextfield}[name="mobile"]`,
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']`,
activeCheckbox: `vn-check[label='Enabled'] > 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`,
firstObservationTypeSelectOptionOne: `vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(1)`,
firstObservationTypeAutocomplete: `vn-client-address-edit [name=observations] :nth-child(1) [field="observation.observationTypeFk"]`,
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`,
secondObservationTypeSelectOptionTwo: `vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`,
secondObservationTypeAutocomplete: `vn-client-address-edit [name=observations] :nth-child(2) [field="observation.observationTypeFk"]`,
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"]`,
saveButton: `${components.vnSubmit}`,
cancelButton: `button[ui-sref="client.card.address.index"]`
@ -152,8 +137,7 @@ export default {
addGreugeFloatButton: `${components.vnFloatButton}`,
amountInput: `${components.vnTextfield}[name="amount"]`,
descriptionInput: `${components.vnTextfield}[name="description"]`,
typeInput: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] input`,
typeSecondOption: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`,
typeAutocomplete: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"]`,
saveButton: `${components.vnSubmit}`,
firstGreugeText: 'vn-client-greuge-index vn-card > div vn-table vn-tbody > vn-tr'
},
@ -193,12 +177,9 @@ export default {
},
itemCreateView: {
name: `${components.vnTextfield}[name="name"]`,
typeSelect: `vn-autocomplete[field="$ctrl.item.typeFk"] input`,
typeSelectOptionThree: `vn-autocomplete[field="$ctrl.item.typeFk"] vn-drop-down ul > li:nth-child(3)`,
intrastatSelect: `vn-autocomplete[field="$ctrl.item.intrastatFk"] input`,
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)`,
typeAutocomplete: `vn-autocomplete[field="$ctrl.item.typeFk"]`,
intrastatAutocomplete: `vn-autocomplete[field="$ctrl.item.intrastatFk"]`,
originAutocomplete: `vn-autocomplete[field="$ctrl.item.originFk"]`,
createButton: `${components.vnSubmit}`,
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`,
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`,
regularizeWarehouseSelect: `#warehouse > div > div > input`,
regularizeWarehouseSelectSecondOption: `#warehouse > vn-drop-down > vn-popover > div > div.content > div > div.list > ul > li:nth-child(2)`,
regularizeWarehouseAutocomplete: `#warehouse`,
regularizeSaveButton: `vn-item-descriptor > vn-dialog > div > form > div.buttons > tpl-buttons > button`
},
itemBasicData: {
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
basicDataButton: `vn-left-menu a[ui-sref="item.card.data"]`,
typeSelect: `vn-autocomplete[field="$ctrl.item.typeFk"] input`,
typeSelectOptionThree: `vn-autocomplete[field="$ctrl.item.typeFk"] vn-drop-down ul > li:nth-child(3)`,
intrastatSelect: `vn-autocomplete[field="$ctrl.item.intrastatFk"] input`,
intrastatSelectOptionOne: `vn-autocomplete[field="$ctrl.item.intrastatFk"] vn-drop-down ul > li:nth-child(1)`,
typeAutocomplete: `vn-autocomplete[field="$ctrl.item.typeFk"]`,
intrastatAutocomplete: `vn-autocomplete[field="$ctrl.item.intrastatFk"]`,
nameInput: `vn-textfield[label="Name"] input`,
relevancyInput: `vn-textfield[label="Relevancy"] input`,
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
originSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
expenceSelect: `vn-autocomplete[field="$ctrl.item.expenceFk"] input`,
expenceSelectOptionThree: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(3)`,
longNameInput: `vn-textfield[label="Full name"] input`,
originAutocomplete: `vn-autocomplete[field="$ctrl.item.originFk"]`,
expenceAutocomplete: `vn-autocomplete[field="$ctrl.item.expenceFk"]`,
longNameInput: `vn-textfield[field="$ctrl.item.longName"] input`,
isActiveCheckbox: `vn-check[label='Active'] > label > input`,
submitBasicDataButton: `${components.vnSubmit}`
},
@ -231,27 +207,22 @@ export default {
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
tagsButton: `vn-left-menu a[ui-sref="item.card.tags"]`,
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`,
firstTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
firstTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"]`,
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`,
secondTagSelect: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"] input`,
secondTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
secondTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"]`,
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`,
thirdTagSelect: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"] input`,
thirdTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
thirdTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"]`,
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`,
fourthTagSelect: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"] input`,
fourthTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`,
fourthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"]`,
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`,
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`,
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)`,
seventhTagSelect: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"] input`,
seventhTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"]`,
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`,
addItemTagButton: `vn-icon-button[icon="add_circle"]`,
@ -259,12 +230,9 @@ export default {
},
itemTax: {
taxButton: `vn-left-menu a[ui-sref="item.card.tax"]`,
firstClassSelect: `vn-horizontal:nth-child(2) > vn-autocomplete[field="tax.taxClassFk"] input`,
firstClassSelectOptionTwo: `vn-horizontal:nth-child(2) > vn-autocomplete vn-drop-down ul > li:nth-child(2)`,
secondClassSelect: `vn-horizontal:nth-child(3) > vn-autocomplete[field="tax.taxClassFk"] input`,
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)`,
firstClassAutocomplete: `vn-horizontal:nth-child(2) > vn-autocomplete[field="tax.taxClassFk"]`,
secondClassAutocomplete: `vn-horizontal:nth-child(3) > vn-autocomplete[field="tax.taxClassFk"]`,
thirdClassAutocomplete: `vn-horizontal:nth-child(4) > vn-autocomplete[field="tax.taxClassFk"]`,
submitTaxButton: `${components.vnSubmit}`
},
itemBarcodes: {
@ -277,26 +245,20 @@ export default {
itemNiches: {
nicheButton: `vn-left-menu a[ui-sref="item.card.niche"]`,
addNicheButton: `vn-icon[icon="add_circle"]`,
firstWarehouseSelect: `vn-autocomplete[field="niche.warehouseFk"] input`,
firstWarehouseSelectSecondOption: `vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(2)`,
firstWarehouseAutocomplete: `vn-autocomplete[field="niche.warehouseFk"] input`,
firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Code"] input`,
secondWarehouseSelect: `vn-horizontal:nth-child(3) > vn-autocomplete[field="niche.warehouseFk"] input`,
secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Code"] input`,
secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-none > vn-icon[icon="delete"]`,
thirdWarehouseSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] input`,
thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`,
thirdWarehouseAutocomplete: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"]`,
thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] input`,
submitNichesButton: `${components.vnSubmit}`
},
itemBotanical: {
botanicalButton: `vn-left-menu a[ui-sref="item.card.botanical"]`,
botanicalInput: `vn-horizontal:nth-child(2) > ${components.vnTextfield}`,
genusSelect: `vn-autocomplete[field="$ctrl.botanical.genusFk"] input`,
genusSelectOptionOne: `vn-autocomplete[field="$ctrl.botanical.genusFk"] vn-drop-down ul > li:nth-child(1)`,
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)`,
genusAutocomplete: `vn-autocomplete[field="$ctrl.botanical.genusFk"]`,
speciesAutocomplete: `vn-autocomplete[field="$ctrl.botanical.specieFk"]`,
submitBotanicalButton: `${components.vnSubmit}`
},
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',
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',
warehouseSelect: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"] > div > div > input',
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)'
warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]',
},
ticketSummary: {
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"]`,
firstNoteRemoveButton: `vn-icon[icon="delete"]`,
addNoteButton: `vn-icon[icon="add_circle"]`,
firstNoteSelect: `vn-autocomplete[field="observation.observationTypeFk"] input`,
firstNoteSelectSecondOption: `vn-autocomplete[field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`,
firstNoteTypeAutocomplete: `vn-autocomplete[field="observation.observationTypeFk"]`,
firstDescriptionInput: `vn-textfield[label="Description"] input`,
submitNotesButton: `${components.vnSubmit}`
},
@ -358,8 +318,7 @@ export default {
},
ticketPackages: {
packagesButton: `vn-left-menu a[ui-sref="ticket.card.package.index"]`,
firstPackageSelect: `vn-autocomplete[label="Package"] > div > div > input`,
firstPackageSelectOptionTwo: `vn-autocomplete[label="Package"] vn-drop-down ul > li:nth-child(2)`,
firstPackageAutocomplete: `vn-autocomplete[label="Package"]`,
firstQuantityInput: `vn-textfield[label="Quantity"] input`,
firstRemovePackageButton: `vn-icon[vn-tooltip="Remove package"]`,
addPackageButton: `vn-icon-button[vn-tooltip="Add package"]`,
@ -472,9 +431,7 @@ export default {
},
claimBasicData: {
basicDataButton: `vn-left-menu a[ui-sref="claim.card.basicData"]`,
claimStateSelect: `vn-autocomplete[field="$ctrl.claim.claimStateFk"] input`,
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)`,
claimStateAutocomplete: 'vn-claim-basic-data vn-autocomplete[field="$ctrl.claim.claimStateFk"]',
isPaidWithManaCheckbox: `vn-check[field="$ctrl.claim.isChargedToMana"] > label > input`,
responsabilityInputRange: `vn-input-range`,
observationInput: `vn-textarea[label="Observation"] textarea`,

View File

@ -13,8 +13,7 @@ describe('Claim edit basic data path', () => {
it(`should edit claim state, is paid with mana and observation fields`, async() => {
const result = await nightmare
.waitToClick(selectors.claimBasicData.claimStateSelect)
.waitToClick(selectors.claimBasicData.claimStateSelectThirdOption)
.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Gestionado')
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
.clearInput(selectors.claimBasicData.observationInput)
.type(selectors.claimBasicData.observationInput, 'edited observation')
@ -30,7 +29,7 @@ describe('Claim edit basic data path', () => {
.wait(selectors.claimDetails.addItemButton)
.click(selectors.claimBasicData.basicDataButton)
.wait(selectors.claimBasicData.claimStateSelect)
.waitToGetProperty(selectors.claimBasicData.claimStateSelect, 'value');
.waitToGetProperty(`${selectors.claimBasicData.claimStateAutocomplete} input`, 'value');
expect(result).toEqual('Gestionado');
});
@ -53,8 +52,7 @@ describe('Claim edit basic data path', () => {
it(`should edit the claim to leave it untainted`, async() => {
const result = await nightmare
.waitToClick(selectors.claimBasicData.claimStateSelect)
.waitToClick(selectors.claimBasicData.claimStateSelectFourthOption)
.autocompleteSearch(selectors.claimBasicData.claimStateAutocomplete, 'Pendiente')
.waitToClick(selectors.claimBasicData.isPaidWithManaCheckbox)
.clearInput(selectors.claimBasicData.observationInput)
.type(selectors.claimBasicData.observationInput, 'Observation one')

View File

@ -42,8 +42,7 @@ describe('Client create path', () => {
.type(selectors.createClientView.taxNumber, '74451390E')
.type(selectors.createClientView.userName, 'CaptainMarvel')
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
.waitToClick(selectors.createClientView.salesPersonInput)
.waitToClick(selectors.createClientView.salesBruceBannerOption)
.autocompleteSearch(selectors.createClientView.salesPersonAutocomplete, 'Accessory')
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();

View File

@ -16,7 +16,7 @@ describe('Client Edit basicData path', () => {
.wait(selectors.clientBasicData.nameInput)
.evaluate(selector => {
return document.querySelector(selector).disabled;
}, selectors.clientBasicData.salesPersonInput);
}, `${selectors.clientBasicData.salesPersonAutocomplete} input`);
expect(result).toBeTruthy();
});
@ -33,8 +33,7 @@ describe('Client Edit basicData path', () => {
.type(selectors.clientBasicData.mobileInput, '123456789')
.clearInput(selectors.clientBasicData.emailInput)
.type(selectors.clientBasicData.emailInput, 'PWallace@verdnatura.es')
.waitToClick(selectors.clientBasicData.channelInput)
.waitToClick(selectors.clientBasicData.channelRumorsOption)
.autocompleteSearch(selectors.clientBasicData.channelAutocomplete, 'Rumors on the streets')
.click(selectors.clientBasicData.saveButton)
.waitForLastSnackbar();
@ -81,7 +80,7 @@ describe('Client Edit basicData path', () => {
it('should confirm the channel have been selected', async() => {
const result = await nightmare
.waitToGetProperty(selectors.clientBasicData.channelInput, 'value');
.waitToGetProperty(`${selectors.clientBasicData.channelAutocomplete} input`, 'value');
expect(result).toEqual('Rumors on the streets');
});
@ -101,7 +100,7 @@ describe('Client Edit basicData path', () => {
.wait(selectors.clientBasicData.nameInput)
.evaluate(selector => {
return document.querySelector(selector).disabled;
}, selectors.clientBasicData.salesPersonInput);
}, `${selectors.clientBasicData.salesPersonAutocomplete} input`);
expect(result).toBeFalsy();
});
@ -118,10 +117,8 @@ describe('Client Edit basicData path', () => {
.type(selectors.clientBasicData.mobileInput, '987654321')
.clearInput(selectors.clientBasicData.emailInput)
.type(selectors.clientBasicData.emailInput, 'Storm@verdnatura.es')
.waitToClick(selectors.clientBasicData.salesPersonInput)
.waitToClick(selectors.clientBasicData.salesPersonOptionOne)
.waitToClick(selectors.clientBasicData.channelInput)
.waitToClick(selectors.clientBasicData.channelMetropolisOption)
.autocompleteSearch(selectors.clientBasicData.salesPersonAutocomplete, 'Accessory')
.autocompleteSearch(selectors.clientBasicData.channelAutocomplete, 'Metropolis newspaper')
.click(selectors.clientBasicData.saveButton)
.waitForLastSnackbar();
@ -168,14 +165,14 @@ describe('Client Edit basicData path', () => {
it('should confirm the sales person have been selected', async() => {
const result = await nightmare
.waitToGetProperty(selectors.clientBasicData.salesPersonInput, 'value');
.waitToGetProperty(`${selectors.clientBasicData.salesPersonAutocomplete} input`, 'value');
expect(result).toEqual('accessory accessory');
});
it('should now confirm the channel have been selected', async() => {
const result = await nightmare
.waitToGetProperty(selectors.clientBasicData.channelInput, 'value');
.waitToGetProperty(`${selectors.clientBasicData.channelAutocomplete} input`, 'value');
expect(result).toEqual('Metropolis newspaper');
});

View File

@ -76,10 +76,8 @@ describe('Client Edit fiscalData path', () => {
.type(selectors.clientFiscalData.postcodeInput, '12345')
.clearInput(selectors.clientFiscalData.cityInput)
.type(selectors.clientFiscalData.cityInput, 'N/A')
.waitToClick(selectors.clientFiscalData.countryInput)
.waitToClick(selectors.clientFiscalData.countryThirdOption)
.waitToClick(selectors.clientFiscalData.provinceInput)
.waitToClick(selectors.clientFiscalData.provinceFifthOption)
.autocompleteSearch(selectors.clientFiscalData.countryAutocomplete, 'Francia')
.autocompleteSearch(selectors.clientFiscalData.provinceAutocomplete, 'Province two')
.waitToClick(selectors.clientFiscalData.activeCheckboxLabel)
.waitToClick(selectors.clientFiscalData.frozenCheckboxLabel)
.waitToClick(selectors.clientFiscalData.hasToInvoiceCheckboxLabel)
@ -215,14 +213,14 @@ describe('Client Edit fiscalData path', () => {
it(`should confirm the country have been selected`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.clientFiscalData.countryInput, 'value');
.waitToGetProperty(`${selectors.clientFiscalData.countryAutocomplete} input`, 'value');
expect(result).toEqual('Francia');
});
it(`should confirm the province have been selected`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.clientFiscalData.provinceInput, 'value');
.waitToGetProperty(`${selectors.clientFiscalData.provinceAutocomplete} input`, 'value');
expect(result).toEqual('Province two');
});

View File

@ -13,12 +13,8 @@ describe('Client Edit pay method path', () => {
it(`should attempt to edit the Pay method without an IBAN but fail`, async() => {
const snackbarMessage = await nightmare
.waitToClick(selectors.clientPayMethod.payMethodInput)
.waitToClick(selectors.clientPayMethod.payMethodIBANOption)
.waitForTextInInput(selectors.clientPayMethod.payMethodInput, 'PayMethod with IBAN')
.waitToClick(selectors.clientPayMethod.swiftBicInput)
.waitToClick(selectors.clientPayMethod.firstSwiftBicOption)
.waitForTextInInput(selectors.clientPayMethod.swiftBicInput, 'BBKKESMMMMM')
.autocompleteSearch(selectors.clientPayMethod.payMethodAutocomplete, 'PayMethod with IBAN')
.autocompleteSearch(selectors.clientPayMethod.swiftBicAutocomplete, 'BBKKESMMMMM')
.clearInput(selectors.clientPayMethod.dueDayInput)
.type(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.newBankEntityBIC, 'GTHMCT')
.click(selectors.clientPayMethod.acceptBankEntityButton)
.waitToGetProperty(selectors.clientPayMethod.swiftBicInput, 'value');
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value');
expect(newcode).toEqual('GTHMCT Gotham City Banks');
});
it(`should confirm the IBAN pay method is sucessfully saved`, async() => {
const payMethod = await nightmare
.waitToGetProperty(selectors.clientPayMethod.payMethodInput, 'value');
.waitToGetProperty(`${selectors.clientPayMethod.payMethodAutocomplete} input`, 'value');
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() => {
const code = await nightmare
.waitToGetProperty(selectors.clientPayMethod.swiftBicInput, 'value');
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value');
expect(code).toEqual('GTHMCT Gotham City Banks');
});

View File

@ -43,10 +43,8 @@ describe('Client Add address path', () => {
.waitToClick(selectors.clientAddresses.defaultCheckboxInput)
.clearInput(selectors.clientAddresses.streetAddressInput)
.type(selectors.clientAddresses.postcodeInput, '10022')
.waitToClick(selectors.clientAddresses.provinceInput)
.waitToClick(selectors.clientAddresses.provinceSecondOption)
.waitToClick(selectors.clientAddresses.agencyInput)
.waitToClick(selectors.clientAddresses.agenctySecondOption)
.autocompleteSearch(selectors.clientAddresses.provinceAutocomplete, 'Province four')
.autocompleteSearch(selectors.clientAddresses.agencyAutocomplete, 'Entanglement')
.type(selectors.clientAddresses.phoneInput, '999887744')
.type(selectors.clientAddresses.mobileInput, '999887744')
.waitToClick(selectors.clientFiscalData.saveButton)

View File

@ -35,8 +35,7 @@ describe('Client add address notes path', () => {
it('should not save an observation type without description', async() => {
const result = await nightmare
.clearInput(selectors.clientAddresses.firstObservationDescriptionInput)
.waitToClick(selectors.clientAddresses.firstObservationTypeSelect)
.waitToClick(selectors.clientAddresses.firstObservationTypeSelectOptionOne)
.autocompleteSearch(selectors.clientAddresses.firstObservationTypeAutocomplete, 'comercial')
.waitToClick(selectors.clientAddresses.saveButton)
.waitForLastSnackbar();
@ -47,8 +46,7 @@ describe('Client add address notes path', () => {
const result = await nightmare
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
.waitToClick(selectors.clientAddresses.addObservationButton)
.waitToClick(selectors.clientAddresses.secondObservationTypeSelect)
.waitToClick(selectors.clientAddresses.secondObservationTypeSelectOptionTwo)
.autocompleteSearch(selectors.clientAddresses.secondObservationTypeAutocomplete, 'observation one')
.type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
.waitToClick(selectors.clientAddresses.saveButton)
.waitForLastSnackbar();

View File

@ -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() => {
const result = await nightmare
.waitToClick(selectors.clientGreuge.typeInput)
.waitToClick(selectors.clientGreuge.typeSecondOption)
.autocompleteSearch(selectors.clientGreuge.typeAutocomplete, 'Diff')
.click(selectors.clientGreuge.saveButton)
.waitForLastSnackbar();

View File

@ -16,24 +16,20 @@ describe('Item Edit basic data path', () => {
.wait(selectors.itemBasicData.nameInput)
.clearInput(selectors.itemBasicData.nameInput)
.type(selectors.itemBasicData.nameInput, 'Rose of Purity')
.waitToClick(selectors.itemBasicData.typeSelect)
.waitToClick(selectors.itemBasicData.typeSelectOptionThree)
.waitToClick(selectors.itemBasicData.intrastatSelect)
.waitToClick(selectors.itemBasicData.intrastatSelectOptionOne)
.autocompleteSearch(selectors.itemBasicData.typeAutocomplete, 'Crisantemo')
.autocompleteSearch(selectors.itemBasicData.intrastatAutocomplete, 'Coral y materiales similares')
.clearInput(selectors.itemBasicData.relevancyInput)
.type(selectors.itemBasicData.relevancyInput, '1')
.waitToClick(selectors.itemBasicData.originSelect)
.waitToClick(selectors.itemBasicData.originSelectOptionTwo)
.waitToClick(selectors.itemBasicData.expenceSelect)
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
.autocompleteSearch(selectors.itemBasicData.originAutocomplete, 'Spain')
.autocompleteSearch(selectors.itemBasicData.expenceAutocomplete, 'Alquiler VNH')
.clearInput(selectors.itemBasicData.longNameInput)
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
.click(selectors.itemBasicData.submitBasicDataButton)
.waitToClick(selectors.itemBasicData.submitBasicDataButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
}, 15000);
it(`should confirm the item name was edited`, async() => {
const result = await nightmare
@ -47,14 +43,14 @@ describe('Item Edit basic data path', () => {
it(`should confirm the item type was edited`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemBasicData.typeSelect, 'value');
.waitToGetProperty(`${selectors.itemBasicData.typeAutocomplete} input`, 'value');
expect(result).toEqual('Crisantemo');
});
it(`should confirm the item intrastad was edited`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemBasicData.intrastatSelect, 'value');
.waitToGetProperty(`${selectors.itemBasicData.intrastatAutocomplete} input`, 'value');
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() => {
const result = await nightmare
.waitToGetProperty(selectors.itemBasicData.originSelect, 'value');
.waitToGetProperty(`${selectors.itemBasicData.originAutocomplete} input`, 'value');
expect(result).toEqual('Spain');
});
it(`should confirm the item expence was edited`, async() => {
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() => {

View File

@ -13,12 +13,9 @@ describe('Item edit tax path', () => {
it(`should add the item tax to all countries`, async() => {
const result = await nightmare
.waitToClick(selectors.itemTax.firstClassSelect)
.waitToClick(selectors.itemTax.firstClassSelectOptionTwo)
.waitToClick(selectors.itemTax.secondClassSelect)
.waitToClick(selectors.itemTax.secondClassSelectOptionOne)
.waitToClick(selectors.itemTax.thirdClassSelect)
.waitToClick(selectors.itemTax.thirdClassSelectOptionTwo)
.autocompleteSearch(selectors.itemTax.firstClassAutocomplete, 'Reduced VAT')
.autocompleteSearch(selectors.itemTax.secondClassAutocomplete, 'General VAT')
.autocompleteSearch(selectors.itemTax.thirdClassAutocomplete, 'Reduced VAT')
.click(selectors.itemTax.submitTaxButton)
.waitForLastSnackbar();
@ -31,22 +28,21 @@ describe('Item edit tax path', () => {
.wait(selectors.itemTags.firstTagDisabled)
.click(selectors.itemTax.taxButton)
.waitToClick(selectors.itemTax.taxButton)
.waitForTextInInput(selectors.itemTax.firstClassSelect, 'reduced')
.waitToGetProperty(selectors.itemTax.firstClassSelect, 'value');
.waitToGetProperty(`${selectors.itemTax.firstClassAutocomplete} input`, 'value');
expect(firstVatType).toEqual('Reduced VAT');
});
it(`should confirm the second item tax class was edited`, async() => {
const secondVatType = await nightmare
.waitToGetProperty(selectors.itemTax.secondClassSelect, 'value');
.waitToGetProperty(`${selectors.itemTax.secondClassAutocomplete} input`, 'value');
expect(secondVatType).toEqual('General VAT');
});
it(`should confirm the third item tax class was edited`, async() => {
const thirdVatType = await nightmare
.waitToGetProperty(selectors.itemTax.thirdClassSelect, 'value');
.waitToGetProperty(`${selectors.itemTax.thirdClassAutocomplete} input`, 'value');
expect(thirdVatType).toEqual('Reduced VAT');
});

View File

@ -15,8 +15,7 @@ describe('Item create tags path', () => {
const result = await nightmare
.waitToClick(selectors.itemTags.firstRemoveTagButton)
.waitToClick(selectors.itemTags.addItemTagButton)
.waitToClick(selectors.itemTags.seventhTagSelect)
.waitToClick(selectors.itemTags.seventhTagSelectOptionFive)
.autocompleteSearch(selectors.itemTags.seventhTagAutocomplete, 'Ancho de la base')
.type(selectors.itemTags.seventhValueInput, '50')
.clearInput(selectors.itemTags.seventhRelevancyInput)
.type(selectors.itemTags.seventhRelevancyInput, '1')
@ -32,7 +31,7 @@ describe('Item create tags path', () => {
.wait(selectors.itemBasicData.nameInput)
.click(selectors.itemTags.tagsButton)
.wait('vn-item-tags')
.waitToGetProperty(selectors.itemTags.firstTagSelect, 'value');
.waitToGetProperty(`${selectors.itemTags.firstTagAutocomplete} input`, 'value');
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() => {
let tag = await nightmare
.waitToGetProperty(selectors.itemTags.secondTagSelect, 'value');
.waitToGetProperty(`${selectors.itemTags.secondTagAutocomplete} input`, 'value');
let value = await nightmare
.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() => {
let tag = await nightmare
.waitToGetProperty(selectors.itemTags.thirdTagSelect, 'value');
.waitToGetProperty(`${selectors.itemTags.thirdTagAutocomplete} input`, 'value');
let value = await nightmare
.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() => {
let tag = await nightmare
.waitToGetProperty(selectors.itemTags.fourthTagSelect, 'value');
.waitToGetProperty(`${selectors.itemTags.fourthTagAutocomplete} input`, 'value');
let value = await nightmare
.waitToGetProperty(selectors.itemTags.fourthValueInput, 'value');

View File

@ -15,8 +15,7 @@ describe('Item create niche path', () => {
const result = await nightmare
.waitToClick(selectors.itemNiches.addNicheButton)
.waitToClick(selectors.itemNiches.secondNicheRemoveButton)
.waitToClick(selectors.itemNiches.thirdWarehouseSelect)
.waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption)
.autocompleteSearch(selectors.itemNiches.thirdWarehouseAutocomplete, 'Warehouse Two')
.type(selectors.itemNiches.thirdCodeInput, 'A4')
.click(selectors.itemNiches.submitNichesButton)
.waitForLastSnackbar();
@ -29,8 +28,8 @@ describe('Item create niche path', () => {
.click(selectors.itemBasicData.basicDataButton)
.wait(selectors.itemBasicData.nameInput)
.click(selectors.itemNiches.nicheButton)
.waitForTextInInput(selectors.itemNiches.firstWarehouseSelect, 'Warehouse One')
.waitToGetProperty(selectors.itemNiches.firstWarehouseSelect, 'value');
.waitForTextInInput(`${selectors.itemNiches.firstWarehouseAutocomplete}`, 'Warehouse One')
.waitToGetProperty(`${selectors.itemNiches.firstWarehouseAutocomplete}`, 'value');
expect(result).toEqual('Warehouse One');
result = await nightmare
@ -53,7 +52,7 @@ describe('Item create niche path', () => {
it(`should confirm the third niche is the expected one`, async() => {
let result = await nightmare
.waitToGetProperty(selectors.itemNiches.thirdWarehouseSelect, 'value');
.waitToGetProperty(`${selectors.itemNiches.thirdWarehouseAutocomplete} input`, 'value');
expect(result).toEqual('Warehouse Two');
result = await nightmare

View File

@ -15,10 +15,8 @@ describe('Item Create botanical path', () => {
const result = await nightmare
.wait(selectors.itemBotanical.botanicalInput)
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
.waitToClick(selectors.itemBotanical.genusSelect)
.waitToClick(selectors.itemBotanical.genusSelectOptionOne)
.waitToClick(selectors.itemBotanical.speciesSelect)
.waitToClick(selectors.itemBotanical.speciesSelectOptionOne)
.autocompleteSearch(selectors.itemBotanical.genusAutocomplete, 'Abelia')
.autocompleteSearch(selectors.itemBotanical.speciesAutocomplete, 'dealbata')
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
.waitForLastSnackbar();
@ -38,15 +36,15 @@ describe('Item Create botanical path', () => {
it(`should confirm the Genus for item Mjolnir was created`, async() => {
const result = await nightmare
.waitForTextInInput(selectors.itemBotanical.genusSelect, 'Abelia')
.waitToGetProperty(selectors.itemBotanical.genusSelect, 'value');
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abelia')
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
expect(result).toEqual('Abelia');
});
it(`should confirm the Species for item Mjolnir was created`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemBotanical.speciesSelect, 'value');
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
expect(result).toEqual('dealbata');
});
@ -55,10 +53,8 @@ describe('Item Create botanical path', () => {
const result = await nightmare
.clearInput(selectors.itemBotanical.botanicalInput)
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
.waitToClick(selectors.itemBotanical.genusSelect)
.waitToClick(selectors.itemBotanical.genusSelectOptionTwo)
.waitToClick(selectors.itemBotanical.speciesSelect)
.waitToClick(selectors.itemBotanical.speciesSelectOptionTwo)
.autocompleteSearch(selectors.itemBotanical.genusAutocomplete, 'Abies')
.autocompleteSearch(selectors.itemBotanical.speciesAutocomplete, 'decurrens')
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
.waitForLastSnackbar();
@ -78,15 +74,15 @@ describe('Item Create botanical path', () => {
it(`should confirm the Genus for item Mjolnir was edited`, async() => {
const result = await nightmare
.waitForTextInInput(selectors.itemBotanical.genusSelect, 'Abies')
.waitToGetProperty(selectors.itemBotanical.genusSelect, 'value');
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abies')
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
expect(result).toEqual('Abies');
});
it(`should confirm the Species for item Mjolnir was edited`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemBotanical.speciesSelect, 'value');
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
expect(result).toEqual('decurrens');
});

View File

@ -50,12 +50,9 @@ describe('Item Create/Clone path', () => {
it('should create the Infinity Gauntlet item', async() => {
const result = await nightmare
.type(selectors.itemCreateView.name, 'Infinity Gauntlet')
.waitToClick(selectors.itemCreateView.typeSelect)
.waitToClick(selectors.itemCreateView.typeSelectOptionThree)
.waitToClick(selectors.itemCreateView.intrastatSelect)
.waitToClick(selectors.itemCreateView.intrastatSelectOptionOne)
.waitToClick(selectors.itemCreateView.originSelect)
.waitToClick(selectors.itemCreateView.originSelectOptionOne)
.autocompleteSearch(selectors.itemCreateView.typeAutocomplete, 'Crisantemo')
.autocompleteSearch(selectors.itemCreateView.intrastatAutocomplete, 'Coral y materiales similares')
.autocompleteSearch(selectors.itemCreateView.originAutocomplete, 'Holand')
.click(selectors.itemCreateView.createButton)
.waitForLastSnackbar();
@ -70,19 +67,19 @@ describe('Item Create/Clone path', () => {
result = await nightmare
.waitToGetProperty(selectors.itemBasicData.typeSelect, 'value');
.waitToGetProperty(`${selectors.itemBasicData.typeAutocomplete} input`, 'value');
expect(result).toEqual('Crisantemo');
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
.waitToGetProperty(selectors.itemBasicData.originSelect, 'value');
.waitToGetProperty(`${selectors.itemBasicData.originAutocomplete} input`, 'value');
expect(result).toEqual('Spain');
expect(result).toEqual('Holand');
});
});

View File

@ -35,8 +35,7 @@ describe('Item regularize path', () => {
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
.wait(selectors.itemDescriptor.regularizeQuantityInput)
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelect)
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelectSecondOption)
.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'Warehouse One')
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
.waitForLastSnackbar();
@ -128,8 +127,7 @@ describe('Item regularize path', () => {
.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton)
.wait(selectors.itemDescriptor.regularizeQuantityInput)
.type(selectors.itemDescriptor.regularizeQuantityInput, 100)
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelect)
.waitToClick(selectors.itemDescriptor.regularizeWarehouseSelectSecondOption)
.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouseAutocomplete, 'Warehouse One')
.waitToClick(selectors.itemDescriptor.regularizeSaveButton)
.waitForLastSnackbar();

View File

@ -15,8 +15,7 @@ describe('Ticket Create notes path', () => {
let result = await nightmare
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
.waitToClick(selectors.ticketNotes.addNoteButton)
.waitToClick(selectors.ticketNotes.firstNoteSelect)
.waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption)
.autocompleteSearch(selectors.ticketNotes.firstNoteTypeAutocomplete, 'observation one')
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
.click(selectors.ticketNotes.submitNotesButton)
.waitForLastSnackbar();
@ -25,13 +24,13 @@ describe('Ticket Create notes path', () => {
});
it(`should confirm the note is the expected one`, async() => {
let firstNoteSelect = await nightmare
let result = await nightmare
.click(selectors.ticketPackages.packagesButton)
.wait(selectors.ticketPackages.firstPackageSelect)
.wait(selectors.ticketPackages.firstPackageAutocomplete)
.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
.waitToGetProperty(selectors.ticketNotes.firstDescriptionInput, 'value');

View File

@ -16,7 +16,7 @@ describe('Ticket Delete expeditions path', () => {
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
.waitToClick(selectors.ticketExpedition.acceptDeleteRowButton)
.click(selectors.ticketPackages.packagesButton)
.wait(selectors.ticketPackages.firstPackageSelect)
.wait(selectors.ticketPackages.firstPackageAutocomplete)
.click(selectors.ticketExpedition.expeditionButton)
.wait(selectors.ticketExpedition.expeditionRow)
.countElement(selectors.ticketExpedition.expeditionRow);

View File

@ -15,8 +15,7 @@ describe('Ticket Create packages path', () => {
const result = await nightmare
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
.waitToClick(selectors.ticketPackages.addPackageButton)
.waitToClick(selectors.ticketPackages.firstPackageSelect)
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
.click(selectors.ticketPackages.savePackagesButton)
.waitForLastSnackbar();
@ -55,9 +54,7 @@ describe('Ticket Create packages path', () => {
it(`should create a new package with correct data`, async() => {
const result = await nightmare
.waitToClick(selectors.ticketPackages.firstPackageSelect)
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
.click(selectors.ticketPackages.savePackagesButton)
.waitForLastSnackbar();
@ -66,11 +63,11 @@ describe('Ticket Create packages path', () => {
it(`should confirm the first select is the expected one`, async() => {
const result = await nightmare
.click(selectors.ticketSales.saleButton)
.wait(selectors.ticketSales.firstPackageSelect)
.click(selectors.ticketPackages.packagesButton)
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
.waitToGetProperty(selectors.ticketPackages.firstPackageSelect, 'value');
.waitToClick(selectors.ticketSales.saleButton)
.wait(selectors.ticketSales.firstPackageAutocomplete)
.waitToClick(selectors.ticketPackages.packagesButton)
.waitForTextInInput(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'Legendary Box')
.waitToGetProperty(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'value');
expect(result).toEqual('7 : Legendary Box');
});

View File

@ -14,7 +14,7 @@ describe('Ticket Edit sale path', () => {
it(`should click on the first claim id to navigate over there`, async() => {
const url = await nightmare
.waitToClick(selectors.ticketSales.secondSaleClaimId)
.wait(selectors.claimBasicData.claimStateSelect)
.wait(selectors.claimBasicData.claimStateAutocomplete)
.parsedUrl();
expect(url.hash).toEqual('#!/claim/2/basic-data');
@ -211,7 +211,7 @@ describe('Ticket Edit sale path', () => {
.waitToClick(selectors.ticketSales.thirdSaleCheckbox)
.waitToClick(selectors.ticketSales.moreMenuButton)
.waitToClick(selectors.ticketSales.moreMenuCreateClaim)
.wait(selectors.claimBasicData.claimStateSelect)
.wait(selectors.claimBasicData.claimStateAutocomplete)
.parsedUrl();
expect(url.hash).toEqual('#!/claim/4/basic-data');

View File

@ -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() => {
const result = await nightmare
.waitToClick(selectors.itemDiary.warehouseSelect)
.waitToClick(selectors.itemDiary.warehouseSelectFourthOption)
.autocompleteSearch(selectors.itemDiary.warehouseAutocomplete, 'Warehouse Two')
.waitToGetProperty(selectors.itemDiary.firstBalance, 'className');
expect(result).toContain('balance');