item basic-data añadir isFragile #380
|
@ -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"]',
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -63,12 +63,6 @@
|
|||
</vn-icon-button>
|
||||
</append>
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete vn-one
|
||||
url="Expenses"
|
||||
label="Expense"
|
||||
ng-model="$ctrl.item.expenseFk"
|
||||
initial-data="$ctrl.item.expense">
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete vn-one
|
||||
url="Origins"
|
||||
label="Origin"
|
||||
|
@ -77,14 +71,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"
|
||||
|
@ -117,13 +118,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
|
||||
|
@ -132,16 +132,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>
|
||||
|
|
|
@ -7,4 +7,6 @@ Is active: Activo
|
|||
Expense: Gasto
|
||||
Price in kg: Precio en kg
|
||||
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, ...)
|
|
@ -92,8 +92,7 @@
|
|||
"agencyMode": {
|
||||
"type": "belongsTo",
|
||||
"model": "AgencyMode",
|
||||
"foreignKey": "agencyModeFk",
|
||||
"required": true
|
||||
"foreignKey": "agencyModeFk"
|
||||
},
|
||||
"packages": {
|
||||
"type": "hasMany",
|
||||
|
|
Loading…
Reference in New Issue