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"]', 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"]', relevancy: 'vn-item-basic-data vn-input-number[ng-model="$ctrl.item.relevancy"]',
origin: 'vn-autocomplete[ng-model="$ctrl.item.originFk"]', 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"]', longName: 'vn-textfield[ng-model="$ctrl.item.longName"]',
isActiveCheckbox: 'vn-check[label="Active"]', isActiveCheckbox: 'vn-check[label="Active"]',
priceInKgCheckbox: 'vn-check[label="Price in kg"]', 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.clearInput(selectors.itemBasicData.relevancy);
await page.write(selectors.itemBasicData.relevancy, '1'); await page.write(selectors.itemBasicData.relevancy, '1');
await page.autocompleteSearch(selectors.itemBasicData.origin, 'Spain'); 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.clearInput(selectors.itemBasicData.longName);
await page.write(selectors.itemBasicData.longName, 'RS Rose of Purity'); await page.write(selectors.itemBasicData.longName, 'RS Rose of Purity');
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox); await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
await page.waitToClick(selectors.itemBasicData.priceInKgCheckbox); await page.waitToClick(selectors.itemBasicData.priceInKgCheckbox);
await page.waitToClick(selectors.itemBasicData.isFragile);
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton); await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
const message = await page.waitForSnackbar(); const message = await page.waitForSnackbar();
@ -93,11 +95,11 @@ describe('Item Edit basic data path', () => {
expect(result).toEqual('Spain'); 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 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() => { 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'); 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() => { it('should confirm isActive checkbox is unchecked', async() => {
const result = await page const result = await page
.checkboxState(selectors.itemBasicData.isActiveCheckbox); .checkboxState(selectors.itemBasicData.isActiveCheckbox);

View File

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

View File

@ -84,14 +84,21 @@
ng-model="$ctrl.item.originFk" ng-model="$ctrl.item.originFk"
initial-data="$ctrl.item.origin"> initial-data="$ctrl.item.origin">
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textfield <vn-textfield
vn-one vn-one
label="Reference" label="Reference"
ng-model="$ctrl.item.comment" ng-model="$ctrl.item.comment"
rule> rule>
</vn-textfield> </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-input-number
vn-one vn-one
min="0" min="0"
@ -124,13 +131,12 @@
ng-model="$ctrl.item.compression" ng-model="$ctrl.item.compression"
rule> rule>
</vn-input-number> </vn-input-number>
<vn-input-number <vn-textarea
vn-one vn-one
min="0" label="Description"
label="Relevancy" ng-model="$ctrl.item.description"
ng-model="$ctrl.item.relevancy"
rule> rule>
</vn-input-number> </vn-textarea>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-check <vn-check
@ -139,16 +145,16 @@
ng-model="$ctrl.item.isActive"> ng-model="$ctrl.item.isActive">
</vn-check> </vn-check>
<vn-check <vn-check
vn-one
label="Price in kg"
ng-model="$ctrl.item.hasKgPrice">
</vn-check>
<vn-textarea
vn-one vn-one
label="Description" label="Price in kg"
ng-model="$ctrl.item.description" ng-model="$ctrl.item.hasKgPrice">
rule> </vn-check>
</vn-textarea> <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-horizontal>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>

View File

@ -8,3 +8,5 @@ Expense: Gasto
Price in kg: Precio en kg Price in kg: Precio en kg
New intrastat: Nuevo intrastat New intrastat: Nuevo intrastat
Identifier: Identificador 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": { "agencyMode": {
"type": "belongsTo", "type": "belongsTo",
"model": "AgencyMode", "model": "AgencyMode",
"foreignKey": "agencyModeFk", "foreignKey": "agencyModeFk"
"required": true
}, },
"packages": { "packages": {
"type": "hasMany", "type": "hasMany",

View File

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

View File

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

View File

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