Bug #635 item.data
This commit is contained in:
parent
a78ffbdaa5
commit
a681f6f854
|
@ -14,6 +14,13 @@
|
|||
<vn-title>Basic data</vn-title>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Name" field="$ctrl.item.name" vn-focus></vn-textfield>
|
||||
<vn-textfield
|
||||
vn-one label="Full name"
|
||||
field="$ctrl.item.longName"
|
||||
info="Full name calculates based on tags 1-3. Is not recommended to change it manually">
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
url="/item/api/ItemTypes"
|
||||
label="Type"
|
||||
|
@ -22,8 +29,6 @@
|
|||
field="$ctrl.item.typeFk"
|
||||
initial-data="$ctrl.item.itemType">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
url="/item/api/Intrastats"
|
||||
label="Intrastat"
|
||||
|
@ -37,9 +42,22 @@
|
|||
<div>{{::description}}</div>
|
||||
</tpl-item>
|
||||
</vn-autocomplete>
|
||||
<vn-textfield vn-one label="Relevancy" field="$ctrl.item.relevancy" type="number"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
label="Reference"
|
||||
field="$ctrl.item.description">
|
||||
</vn-textfield>
|
||||
<vn-autocomplete vn-one
|
||||
url="/item/api/Expences"
|
||||
label="Expence"
|
||||
field="$ctrl.item.expenceFk"
|
||||
initial-data="$ctrl.item.expence">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Relevancy" field="$ctrl.item.relevancy" type="number"></vn-textfield>
|
||||
<vn-autocomplete vn-one
|
||||
url="/item/api/Origins"
|
||||
label="Origin"
|
||||
|
@ -48,24 +66,11 @@
|
|||
field="$ctrl.item.originFk"
|
||||
initial-data="$ctrl.item.origin">
|
||||
</vn-autocomplete>
|
||||
<vn-textfield
|
||||
<vn-check
|
||||
vn-one
|
||||
label="Reference"
|
||||
field="$ctrl.item.description">
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
url="/item/api/Expences"
|
||||
label="Expence"
|
||||
field="$ctrl.item.expenceFk"
|
||||
initial-data="$ctrl.item.expence">
|
||||
</vn-autocomplete>
|
||||
<vn-textfield
|
||||
vn-one label="Full name"
|
||||
field="$ctrl.item.longName"
|
||||
info="Full name calculates based on tags 1-3. Is not recommended to change it manually">
|
||||
</vn-textfield>
|
||||
label="Is active"
|
||||
field="$ctrl.item.isActive">
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue