diff --git a/client/item/src/data/index.html b/client/item/src/data/index.html index 7e939e811..408b799b1 100644 --- a/client/item/src/data/index.html +++ b/client/item/src/data/index.html @@ -14,7 +14,14 @@ Basic data - + + + + - - {{::description}} - + + + + + + + - - - - - - - - + label="Is active" + field="$ctrl.item.isActive"> + diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 01fe561b2..67af7d71b 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -183,13 +183,14 @@ export default { 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)`, - nameInput: `vn-horizontal:nth-child(2) > ${components.vnTextfield}`, - relevancyInput: `vn-horizontal:nth-child(3) > ${components.vnTextfield}`, + 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-horizontal:nth-child(5) > ${components.vnTextfield}`, + longNameInput: `vn-textfield[label="Full name"] input`, + isActiveCheckbox: `vn-check[label='Is active'] > label > input`, submitBasicDataButton: `${components.vnSubmit}` }, itemTags: { diff --git a/e2e/paths/item-module/02_edit_item_basic_data.spec.js b/e2e/paths/item-module/02_edit_item_basic_data.spec.js index f1cac69ae..b2e0bc27a 100644 --- a/e2e/paths/item-module/02_edit_item_basic_data.spec.js +++ b/e2e/paths/item-module/02_edit_item_basic_data.spec.js @@ -60,6 +60,7 @@ describe('Item', () => { .waitToClick(selectors.itemBasicData.expenceSelectOptionThree) .clearInput(selectors.itemBasicData.longNameInput) .type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity') + .waitToClick(selectors.itemBasicData.isActiveCheckbox) .click(selectors.itemBasicData.submitBasicDataButton) .waitForLastSnackbar() .then(result => { @@ -126,5 +127,15 @@ describe('Item', () => { expect(result).toEqual('RS Rose of Purity'); }); }); + + it('should confirm isActive checkbox is unchecked', () => { + return nightmare + .evaluate(selector => { + return document.querySelector(selector).checked; + }, selectors.itemBasicData.isActiveCheckbox) + .then(value => { + expect(value).toBeFalsy(); + }); + }); }); });