fixed e2e
This commit is contained in:
parent
60e2d8132b
commit
da8610d814
|
@ -145,10 +145,14 @@ export default {
|
||||||
itemBarcodes: {
|
itemBarcodes: {
|
||||||
barcodeButton: `${components.vnMenuItem}[ui-sref="item.card.itemBarcode"]`,
|
barcodeButton: `${components.vnMenuItem}[ui-sref="item.card.itemBarcode"]`,
|
||||||
addBarcodeButton: `${components.vnIcon}[icon="add_circle"]`,
|
addBarcodeButton: `${components.vnIcon}[icon="add_circle"]`,
|
||||||
thirdCodeInput: `vn-horizontal:nth-child(5) > ${components.vnTextfield}`,
|
thirdCodeInput: `vn-horizontal:nth-child(4) > ${components.vnTextfield}`,
|
||||||
fourthCodeInput: `vn-horizontal:nth-child(6) > ${components.vnTextfield}`,
|
|
||||||
submitBarcodesButton: `${components.vnSubmit}`,
|
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`, () => {
|
it(`should click create a new code and delete a former one`, () => {
|
||||||
// return nightmare
|
return nightmare
|
||||||
// .waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
||||||
// .type(selectors.itemBarcodes.fourthCodeInput, '5')
|
.waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
||||||
// .waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
.wait(selectors.itemBarcodes.thirdCodeInput)
|
||||||
// .waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
.type(selectors.itemBarcodes.thirdCodeInput, '5')
|
||||||
// .waitForSnackbar()
|
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
||||||
// .then(result => {
|
.waitForSnackbar()
|
||||||
// expect(result).toContain('Data saved!');
|
.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`, () => {
|
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, () => {
|
||||||
// return nightmare
|
return nightmare
|
||||||
// .click(selectors.itemBasicData.basicDataButton)
|
.click(selectors.itemBasicData.basicDataButton)
|
||||||
// .wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
// .click(selectors.itemBarcodes.barcodeButton)
|
.click(selectors.itemBarcodes.barcodeButton)
|
||||||
// .wait(200)
|
.wait(1000)
|
||||||
// .getInputValue(selectors.itemBarcodes.thirdCodeInput)
|
.getInputValue(selectors.itemBarcodes.thirdCodeInput)
|
||||||
// .then(result => {
|
.then(result => {
|
||||||
// expect(result).toEqual('5');
|
expect(result).toEqual('5');
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue