Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 1988-autocomplete_prefetch
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2020-09-17 20:16:29 +02:00
commit c5dc84cbc2
9 changed files with 50 additions and 27 deletions

View File

@ -275,7 +275,8 @@ export default {
name: 'vn-item-basic-data vn-textfield[ng-model="$ctrl.item.name"]',
relevancy: 'vn-item-basic-data vn-input-number[ng-model="$ctrl.item.relevancy"]',
origin: 'vn-autocomplete[ng-model="$ctrl.item.originFk"]',
expense: 'vn-autocomplete[ng-model="$ctrl.item.expenseFk"]',
compression: 'vn-item-basic-data vn-input-number[ng-model="$ctrl.item.compression"]',
isFragile: 'vn-check[label="isFragile"]',
longName: 'vn-textfield[ng-model="$ctrl.item.longName"]',
isActiveCheckbox: 'vn-check[label="Active"]',
priceInKgCheckbox: 'vn-check[label="Price in kg"]',

View File

@ -28,11 +28,13 @@ describe('Item Edit basic data path', () => {
await page.clearInput(selectors.itemBasicData.relevancy);
await page.write(selectors.itemBasicData.relevancy, '1');
await page.autocompleteSearch(selectors.itemBasicData.origin, 'Spain');
await page.autocompleteSearch(selectors.itemBasicData.expense, 'Alquiler VNH');
await page.clearInput(selectors.itemBasicData.compression);
await page.write(selectors.itemBasicData.compression, '2');
await page.clearInput(selectors.itemBasicData.longName);
await page.write(selectors.itemBasicData.longName, 'RS Rose of Purity');
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
await page.waitToClick(selectors.itemBasicData.priceInKgCheckbox);
await page.waitToClick(selectors.itemBasicData.isFragile);
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
const message = await page.waitForSnackbar();
@ -93,11 +95,11 @@ describe('Item Edit basic data path', () => {
expect(result).toEqual('Spain');
});
it(`should confirm the item expence was edited`, async() => {
it(`should confirm the item compression was edited`, async() => {
const result = await page
.waitToGetProperty(selectors.itemBasicData.expense, 'value');
.waitToGetProperty(selectors.itemBasicData.compression, 'value');
expect(result).toEqual('Alquiler VNH');
expect(result).toEqual('2');
});
it(`should confirm the item long name was edited`, async() => {
@ -107,6 +109,13 @@ describe('Item Edit basic data path', () => {
expect(result).toEqual('RS Rose of Purity');
});
it('should confirm isFragile checkbox is unchecked', async() => {
const result = await page
.checkboxState(selectors.itemBasicData.isFragile);
expect(result).toBe('unchecked');
});
it('should confirm isActive checkbox is unchecked', async() => {
const result = await page
.checkboxState(selectors.itemBasicData.isActiveCheckbox);

View File

@ -113,6 +113,9 @@
"value10": {
"type": "String"
},
"compression": {
"type": "Number"
},
"hasKgPrice": {
"type": "Boolean",
"description": "Price per Kg"
@ -125,6 +128,9 @@
},
"minPrice": {
"type": "number"
},
"isFragile": {
"type": "Boolean"
}
},
"relations": {

View File

@ -84,14 +84,21 @@
ng-model="$ctrl.item.originFk"
initial-data="$ctrl.item.origin">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Reference"
ng-model="$ctrl.item.comment"
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-input-number
vn-one
min="0"
label="Relevancy"
ng-model="$ctrl.item.relevancy"
rule>
</vn-input-number>
<vn-input-number
vn-one
min="0"
@ -124,13 +131,12 @@
ng-model="$ctrl.item.compression"
rule>
</vn-input-number>
<vn-input-number
<vn-textarea
vn-one
min="0"
label="Relevancy"
ng-model="$ctrl.item.relevancy"
label="Description"
ng-model="$ctrl.item.description"
rule>
</vn-input-number>
</vn-textarea>
</vn-horizontal>
<vn-horizontal>
<vn-check
@ -139,16 +145,16 @@
ng-model="$ctrl.item.isActive">
</vn-check>
<vn-check
vn-one
label="Price in kg"
ng-model="$ctrl.item.hasKgPrice">
</vn-check>
<vn-textarea
vn-one
label="Description"
ng-model="$ctrl.item.description"
rule>
</vn-textarea>
label="Price in kg"
ng-model="$ctrl.item.hasKgPrice">
</vn-check>
<vn-check
vn-one
label="Fragile"
ng-model="$ctrl.item.isFragile"
info="Is shown at website, app that this item cannot travel (wreath, palms, ...)">
</vn-check>
</vn-horizontal>
</vn-card>
<vn-button-bar>

View File

@ -8,3 +8,5 @@ Expense: Gasto
Price in kg: Precio en kg
New intrastat: Nuevo intrastat
Identifier: Identificador
Fragile: Frágil
Is shown at website, app that this item cannot travel (wreath, palms, ...): Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)

View File

@ -92,8 +92,7 @@
"agencyMode": {
"type": "belongsTo",
"model": "AgencyMode",
"foreignKey": "agencyModeFk",
"required": true
"foreignKey": "agencyModeFk"
},
"packages": {
"type": "hasMany",

View File

@ -23,7 +23,7 @@ supplier:
client:
toCompleteByClient: A cumplimentar por el deudor
name: Nombre del deudor/es
fiscalId: CIF/NIF
fiscalId: NIF
street: Dirección del deudor
location: CP - Población - Provincia
country: País del deudor

View File

@ -20,7 +20,7 @@ supplier:
client:
toCompleteByClient: Á compléter pour le débiteur
name: Nom du débiteur(s)
fiscalId: CIF/NIF
fiscalId: NIF
street: Adresse du(des) débiteur(s)
location: CP - Commune - Départament
country: País du(des) débiteur(s)

View File

@ -23,7 +23,7 @@ supplier:
client:
toCompleteByClient: A preencher pelo devedor
name: Nome do devedor
fiscalId: CIF/NIF
fiscalId: NIF
street: Dirección del deudor
location: Cod. Postal - Município - Distrito
country: País do devedor