added field longName to item summary and basic data #449

This commit is contained in:
Joan Sanchez 2018-07-27 12:15:25 +02:00
parent 23993ce717
commit bf5a48f126
6 changed files with 25 additions and 1 deletions

View File

@ -61,6 +61,11 @@
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-card>
<vn-button-bar>

View File

@ -1 +1,5 @@
Reference: Referencia
Reference: Referencia
Full name calculates based on tags 1-3. Is not recommended to change it manually: >-
El nombre completo se calcula
basado en los tags 1-3.
No se recomienda cambiarlo manualmente

View File

@ -5,6 +5,7 @@ Description: Descripción
Size: Tamaño
Type: Tipo
Name: Nombre
Full name: Nombre completo
Relevancy: Relevancia
Picture: Foto
Changed by: Cambiado por

View File

@ -29,6 +29,9 @@
<vn-label-value label="Name"
value="{{::$ctrl.summary.item.name}}">
</vn-label-value>
<vn-label-value label="Full name"
value="{{::$ctrl.summary.item.longName}}">
</vn-label-value>
<vn-label-value label="Type"
value="{{::$ctrl.summary.item.itemType.name}}">
</vn-label-value>

View File

@ -187,6 +187,7 @@ export default {
originSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
expenceSelect: `vn-autocomplete[field="$ctrl.item.expenceFk"] input`,
expenceSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(2)`,
longNameInput: `vn-horizontal:nth-child(5) > ${components.vnTextfield}`,
submitBasicDataButton: `${components.vnSubmit}`
},
itemTags: {

View File

@ -58,6 +58,8 @@ describe('Item', () => {
.waitToClick(selectors.itemBasicData.originSelectOptionTwo)
.waitToClick(selectors.itemBasicData.expenceSelect)
.waitToClick(selectors.itemBasicData.expenceSelectOptionTwo)
.clearInput(selectors.itemBasicData.longNameInput)
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
.click(selectors.itemBasicData.submitBasicDataButton)
.waitForSnackbar()
.then(result => {
@ -116,5 +118,13 @@ describe('Item', () => {
expect(result).toEqual('Adquisición mercancia Extracomunitaria');
});
});
it(`should confirm the item long name was edited`, () => {
return nightmare
.getInputValue(selectors.itemBasicData.longNameInput)
.then(result => {
expect(result).toEqual('RS Rose of Purity');
});
});
});
});