Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2019-09-19 09:24:27 +02:00
commit a85e653f34
6 changed files with 18 additions and 3 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

@ -1,7 +1,8 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Item edit tax path', () => {
// #1702 Autocomplete no siempre refresca al cancelar formulario
xdescribe('Item edit tax path', () => {
const nightmare = createNightmare();
beforeAll(() => {

View File

@ -88,6 +88,11 @@
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>
</vn-card>

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

View File

@ -7,8 +7,7 @@
<vn-watcher
vn-id="watcher"
data="$ctrl.taxes"
form="form"
save="patch">
form="form">
</vn-watcher>
<form name="form" ng-submit="$ctrl.submit()" compact>
<vn-card pad-large>