fixed e2e for the postalCode change in address-edit/create htmls
This commit is contained in:
parent
d2a2aa08d7
commit
261e05a752
|
@ -12,6 +12,7 @@ export default {
|
||||||
vnModuleContainer: 'vn-module-container > a',
|
vnModuleContainer: 'vn-module-container > a',
|
||||||
vnSearchBar: 'vn-searchbar > form > vn-horizontal',
|
vnSearchBar: 'vn-searchbar > form > vn-horizontal',
|
||||||
vnItemClient: 'vn-item-client',
|
vnItemClient: 'vn-item-client',
|
||||||
|
vnItemProduct: 'vn-item-product',
|
||||||
vnFloatButton: 'vn-float-button > button',
|
vnFloatButton: 'vn-float-button > button',
|
||||||
vnMenuItem: 'vn-menu-item > li > a',
|
vnMenuItem: 'vn-menu-item > li > a',
|
||||||
vnAutocomplete: 'vn-autocomplete',
|
vnAutocomplete: 'vn-autocomplete',
|
||||||
|
|
|
@ -89,7 +89,7 @@ export default {
|
||||||
defaultCheckboxInput: `${components.vnCheck}[label='Default'] > label > input`,
|
defaultCheckboxInput: `${components.vnCheck}[label='Default'] > label > input`,
|
||||||
consigneeInput: `${components.vnTextfield}[name="nickname"]`,
|
consigneeInput: `${components.vnTextfield}[name="nickname"]`,
|
||||||
streetAddressInput: `${components.vnTextfield}[name="street"]`,
|
streetAddressInput: `${components.vnTextfield}[name="street"]`,
|
||||||
postcodeInput: `${components.vnTextfield}[name="postcode"]`,
|
postcodeInput: `${components.vnTextfield}[name="postalCode"]`,
|
||||||
cityInput: `${components.vnTextfield}[name="city"]`,
|
cityInput: `${components.vnTextfield}[name="city"]`,
|
||||||
provinceInput: `${components.vnAutocomplete}[field="$ctrl.address.provinceFk"] > vn-vertical > ${components.vnTextfield}`,
|
provinceInput: `${components.vnAutocomplete}[field="$ctrl.address.provinceFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||||
provinceSecondOption: `${components.vnAutocomplete}[field="$ctrl.address.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(2)`,
|
provinceSecondOption: `${components.vnAutocomplete}[field="$ctrl.address.provinceFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(2)`,
|
||||||
|
@ -140,6 +140,13 @@ export default {
|
||||||
firstMandateText: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-mandate > vn-card > div > vn-vertical > vn-one > vn-horizontal'
|
firstMandateText: 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-mandate > vn-card > div > vn-vertical > vn-one > vn-horizontal'
|
||||||
},
|
},
|
||||||
itemsIndex: {
|
itemsIndex: {
|
||||||
createItemButton: `${components.vnFloatButton}`
|
createItemButton: `${components.vnFloatButton}`,
|
||||||
|
searchResult: `${components.vnItemProduct} > vn-horizontal`,
|
||||||
|
searchItemInput: `${components.vnTextfield}`,
|
||||||
|
searchButton: `${components.vnSearchBar} > vn-icon-button > button`
|
||||||
|
},
|
||||||
|
itemBarcodes: {
|
||||||
|
barcodeButton: `${components.vnMenuItem}[ui-sref="item.card.itemBarcode"]`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ const moduleAccessViewHashURL = '#!/';
|
||||||
|
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
||||||
|
|
||||||
fdescribe('create item barcodes path', () => {
|
describe('create item barcodes path', () => {
|
||||||
it('should log in', done => {
|
it('should log in', done => {
|
||||||
nightmare
|
nightmare
|
||||||
.login()
|
.login()
|
||||||
|
@ -40,4 +40,32 @@ fdescribe('create item barcodes path', () => {
|
||||||
})
|
})
|
||||||
.catch(catchErrors(done));
|
.catch(catchErrors(done));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should search for the item Gem of Time', done => {
|
||||||
|
nightmare
|
||||||
|
.wait(selectors.itemsIndex.searchResult)
|
||||||
|
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
|
||||||
|
.click(selectors.itemsIndex.searchButton)
|
||||||
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
|
.countSearchResults(selectors.itemsIndex.searchResult)
|
||||||
|
.then(result => {
|
||||||
|
expect(result).toEqual(1);
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(catchErrors(done));
|
||||||
|
});
|
||||||
|
|
||||||
|
// it(`should click on the search result to access to the item barcodes`, done => {
|
||||||
|
// nightmare
|
||||||
|
// .waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
|
||||||
|
// .waitToClick(selectors.itemsIndex.searchResult)
|
||||||
|
// .waitToClick(selectors.itemBarcodes.barcodeButton)
|
||||||
|
// .waitForURL('barcode')
|
||||||
|
// .url()
|
||||||
|
// .then(url => {
|
||||||
|
// expect(url).toContain('barcode');
|
||||||
|
// done();
|
||||||
|
// })
|
||||||
|
// .catch(catchErrors(done));
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue