Bug #635 item.data
This commit is contained in:
parent
a78ffbdaa5
commit
a681f6f854
|
@ -14,7 +14,14 @@
|
||||||
<vn-title>Basic data</vn-title>
|
<vn-title>Basic data</vn-title>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield vn-one label="Name" field="$ctrl.item.name" vn-focus></vn-textfield>
|
<vn-textfield vn-one label="Name" field="$ctrl.item.name" vn-focus></vn-textfield>
|
||||||
<vn-autocomplete vn-one
|
<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"
|
url="/item/api/ItemTypes"
|
||||||
label="Type"
|
label="Type"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
|
@ -22,8 +29,6 @@
|
||||||
field="$ctrl.item.typeFk"
|
field="$ctrl.item.typeFk"
|
||||||
initial-data="$ctrl.item.itemType">
|
initial-data="$ctrl.item.itemType">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal>
|
|
||||||
<vn-autocomplete vn-one
|
<vn-autocomplete vn-one
|
||||||
url="/item/api/Intrastats"
|
url="/item/api/Intrastats"
|
||||||
label="Intrastat"
|
label="Intrastat"
|
||||||
|
@ -37,9 +42,22 @@
|
||||||
<div>{{::description}}</div>
|
<div>{{::description}}</div>
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-textfield vn-one label="Relevancy" field="$ctrl.item.relevancy" type="number"></vn-textfield>
|
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<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
|
<vn-autocomplete vn-one
|
||||||
url="/item/api/Origins"
|
url="/item/api/Origins"
|
||||||
label="Origin"
|
label="Origin"
|
||||||
|
@ -48,24 +66,11 @@
|
||||||
field="$ctrl.item.originFk"
|
field="$ctrl.item.originFk"
|
||||||
initial-data="$ctrl.item.origin">
|
initial-data="$ctrl.item.origin">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-textfield
|
<vn-check
|
||||||
vn-one
|
vn-one
|
||||||
label="Reference"
|
label="Is active"
|
||||||
field="$ctrl.item.description">
|
field="$ctrl.item.isActive">
|
||||||
</vn-textfield>
|
</vn-check>
|
||||||
</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>
|
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
|
|
|
@ -183,13 +183,14 @@ export default {
|
||||||
typeSelectOptionThree: `vn-autocomplete[field="$ctrl.item.typeFk"] vn-drop-down ul > li:nth-child(3)`,
|
typeSelectOptionThree: `vn-autocomplete[field="$ctrl.item.typeFk"] vn-drop-down ul > li:nth-child(3)`,
|
||||||
intrastatSelect: `vn-autocomplete[field="$ctrl.item.intrastatFk"] input`,
|
intrastatSelect: `vn-autocomplete[field="$ctrl.item.intrastatFk"] input`,
|
||||||
intrastatSelectOptionOne: `vn-autocomplete[field="$ctrl.item.intrastatFk"] vn-drop-down ul > li:nth-child(1)`,
|
intrastatSelectOptionOne: `vn-autocomplete[field="$ctrl.item.intrastatFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
nameInput: `vn-horizontal:nth-child(2) > ${components.vnTextfield}`,
|
nameInput: `vn-textfield[label="Name"] input`,
|
||||||
relevancyInput: `vn-horizontal:nth-child(3) > ${components.vnTextfield}`,
|
relevancyInput: `vn-textfield[label="Relevancy"] input`,
|
||||||
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
||||||
originSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
originSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||||
expenceSelect: `vn-autocomplete[field="$ctrl.item.expenceFk"] input`,
|
expenceSelect: `vn-autocomplete[field="$ctrl.item.expenceFk"] input`,
|
||||||
expenceSelectOptionThree: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(3)`,
|
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}`
|
submitBasicDataButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
itemTags: {
|
itemTags: {
|
||||||
|
|
|
@ -60,6 +60,7 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
|
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
|
||||||
.clearInput(selectors.itemBasicData.longNameInput)
|
.clearInput(selectors.itemBasicData.longNameInput)
|
||||||
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
||||||
|
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
|
||||||
.click(selectors.itemBasicData.submitBasicDataButton)
|
.click(selectors.itemBasicData.submitBasicDataButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
@ -126,5 +127,15 @@ describe('Item', () => {
|
||||||
expect(result).toEqual('RS Rose of Purity');
|
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