fixed e2e
This commit is contained in:
parent
60e2d8132b
commit
da8610d814
|
@ -145,10 +145,14 @@ export default {
|
|||
itemBarcodes: {
|
||||
barcodeButton: `${components.vnMenuItem}[ui-sref="item.card.itemBarcode"]`,
|
||||
addBarcodeButton: `${components.vnIcon}[icon="add_circle"]`,
|
||||
thirdCodeInput: `vn-horizontal:nth-child(5) > ${components.vnTextfield}`,
|
||||
fourthCodeInput: `vn-horizontal:nth-child(6) > ${components.vnTextfield}`,
|
||||
thirdCodeInput: `vn-horizontal:nth-child(4) > ${components.vnTextfield}`,
|
||||
submitBarcodesButton: `${components.vnSubmit}`,
|
||||
firstCodeRemoveButton: `vn-horizontal:nth-child(3) > vn-one > ${components.vnIcon}[icon="remove_circle_outline"]`
|
||||
firstCodeRemoveButton: `vn-horizontal:nth-child(2) > vn-one > ${components.vnIcon}[icon="remove_circle_outline"]`
|
||||
},
|
||||
itemNiches: {
|
||||
nicheButton: `${components.vnMenuItem}[ui-sref="item.card.niche"]`,
|
||||
firstWarehouseSelect: `${components.vnAutocomplete}[field="niche.warehouseFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||
firstWarehouseSelectFirstOption: `${components.vnAutocomplete}[field="niche.warehouseFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(1)`,
|
||||
secondNicheRemoveButton: `vn-horizontal:nth-child(2) > vn-one > ${components.vnIcon}[icon="remove_circle_outline"]`
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -38,27 +38,28 @@ describe('create item barcodes path', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// it(`should click create a new code and delete a former one`, () => {
|
||||
// return nightmare
|
||||
// .waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
||||
// .type(selectors.itemBarcodes.fourthCodeInput, '5')
|
||||
// .waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
||||
// .waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
||||
// .waitForSnackbar()
|
||||
// .then(result => {
|
||||
// expect(result).toContain('Data saved!');
|
||||
// });
|
||||
// });
|
||||
it(`should click create a new code and delete a former one`, () => {
|
||||
return nightmare
|
||||
.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
||||
.waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
||||
.wait(selectors.itemBarcodes.thirdCodeInput)
|
||||
.type(selectors.itemBarcodes.thirdCodeInput, '5')
|
||||
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
||||
.waitForSnackbar()
|
||||
.then(result => {
|
||||
expect(result).toContain('Data saved!');
|
||||
});
|
||||
});
|
||||
|
||||
// it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, () => {
|
||||
// return nightmare
|
||||
// .click(selectors.itemBasicData.basicDataButton)
|
||||
// .wait(selectors.itemBasicData.nameInput)
|
||||
// .click(selectors.itemBarcodes.barcodeButton)
|
||||
// .wait(200)
|
||||
// .getInputValue(selectors.itemBarcodes.thirdCodeInput)
|
||||
// .then(result => {
|
||||
// expect(result).toEqual('5');
|
||||
// });
|
||||
// });
|
||||
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, () => {
|
||||
return nightmare
|
||||
.click(selectors.itemBasicData.basicDataButton)
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.click(selectors.itemBarcodes.barcodeButton)
|
||||
.wait(1000)
|
||||
.getInputValue(selectors.itemBarcodes.thirdCodeInput)
|
||||
.then(result => {
|
||||
expect(result).toEqual('5');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue