Merge branch 'dev' into fix-e2e-test-withoutNegatives
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
ccb0cfdf01
|
@ -49,6 +49,10 @@ module.exports = Self => {
|
||||||
const provisionalName = params.provisionalName;
|
const provisionalName = params.provisionalName;
|
||||||
delete params.provisionalName;
|
delete params.provisionalName;
|
||||||
|
|
||||||
|
const itemType = await models.ItemType.findById(params.typeFk, myOptions);
|
||||||
|
|
||||||
|
params.isLaid = itemType.isLaid;
|
||||||
|
|
||||||
const item = await models.Item.create(params, myOptions);
|
const item = await models.Item.create(params, myOptions);
|
||||||
|
|
||||||
const typeTags = await models.ItemTypeTag.find({
|
const typeTags = await models.ItemTypeTag.find({
|
||||||
|
|
|
@ -15,6 +15,11 @@ describe('item new()', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
let item = await models.Item.new(itemParams, options);
|
let item = await models.Item.new(itemParams, options);
|
||||||
|
|
||||||
|
let itemType = await models.ItemType.findById(item.typeFk, options);
|
||||||
|
|
||||||
|
item.isLaid = itemType.isLaid;
|
||||||
|
|
||||||
const temporalNameTag = await models.Tag.findOne({where: {name: 'Nombre temporal'}}, options);
|
const temporalNameTag = await models.Tag.findOne({where: {name: 'Nombre temporal'}}, options);
|
||||||
|
|
||||||
const temporalName = await models.ItemTag.findOne({
|
const temporalName = await models.ItemTag.findOne({
|
||||||
|
@ -26,9 +31,14 @@ describe('item new()', () => {
|
||||||
|
|
||||||
item = await models.Item.findById(item.id, null, options);
|
item = await models.Item.findById(item.id, null, options);
|
||||||
|
|
||||||
|
itemType = await models.ItemType.findById(item.typeFk, options);
|
||||||
|
|
||||||
|
item.isLaid = itemType.isLaid;
|
||||||
|
|
||||||
expect(item.intrastatFk).toEqual(5080000);
|
expect(item.intrastatFk).toEqual(5080000);
|
||||||
expect(item.originFk).toEqual(1);
|
expect(item.originFk).toEqual(1);
|
||||||
expect(item.typeFk).toEqual(2);
|
expect(item.typeFk).toEqual(2);
|
||||||
|
expect(item.isLaid).toBeFalse();
|
||||||
expect(item.name).toEqual('planta');
|
expect(item.name).toEqual('planta');
|
||||||
expect(temporalName.value).toEqual('planta');
|
expect(temporalName.value).toEqual('planta');
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
},
|
},
|
||||||
"isUnconventionalSize": {
|
"isUnconventionalSize": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isLaid": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -143,6 +143,9 @@
|
||||||
},
|
},
|
||||||
"packingShelve": {
|
"packingShelve": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isLaid": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
Loading…
Reference in New Issue