#1691 item.basicData - Añadir campo hasKgPrice

This commit is contained in:
Bernat 2019-09-18 11:11:47 +02:00
parent d66d2f16c0
commit 7af4f3626d
4 changed files with 15 additions and 0 deletions

View File

@ -237,6 +237,7 @@ export default {
expenceAutocomplete: 'vn-autocomplete[field="$ctrl.item.expenceFk"]',
longNameInput: 'vn-textfield[field="$ctrl.item.longName"] input',
isActiveCheckbox: 'vn-check[label="Active"] md-checkbox',
priceInKgCheckbox: 'vn-check[label="Price in kg"] md-checkbox',
submitBasicDataButton: `${components.vnSubmit}`
},
itemTags: {

View File

@ -31,6 +31,7 @@ describe('Item Edit basic data path', () => {
.clearInput(selectors.itemBasicData.longNameInput)
.write(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
.waitToClick(selectors.itemBasicData.priceInKgCheckbox)
.waitToClick(selectors.itemBasicData.submitBasicDataButton)
.waitForLastSnackbar();
@ -93,4 +94,11 @@ describe('Item Edit basic data path', () => {
expect(result).toBe('unchecked');
});
it('should confirm the priceInKg checkbox is checked', async() => {
const result = await nightmare
.checkboxState(selectors.itemBasicData.priceInKgCheckbox);
expect(result).toBe('checked');
});
});

View File

@ -87,6 +87,11 @@
vn-one
label="Active"
field="$ctrl.item.isActive">
</vn-check>
<vn-check
vn-one
label="Price in kg"
field="$ctrl.item.hasKgPrice">
</vn-check>
<vn-textarea vn-one label="description" field="$ctrl.item.description"></vn-textarea>
</vn-horizontal>

View File

@ -5,3 +5,4 @@ Full name calculates based on tags 1-3. Is not recommended to change it manually
No se recomienda cambiarlo manualmente
Is active: Activo
Expence: Gasto
Price in kg: Precio en kg