Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import uuid from 'uuid';
import {
ACQUISITION_METHOD_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../support/constants';
import permissions from '../../support/dictionary/permissions';
import InventoryInstance from '../../support/fragments/inventory/inventoryInstance';
import InventoryInstances from '../../support/fragments/inventory/inventoryInstances';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import NewOrder from '../../support/fragments/orders/newOrder';
import OrderLines from '../../support/fragments/orders/orderLines';
import Orders from '../../support/fragments/orders/orders';
Expand All @@ -11,10 +19,6 @@ import ReceivingEditForm from '../../support/fragments/receiving/receivingEditFo
import AcquisitionUnits from '../../support/fragments/settings/acquisitionUnits/acquisitionUnits';
import TopMenu from '../../support/fragments/topMenu';
import Users from '../../support/fragments/users/users';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import InventoryInstances from '../../support/fragments/inventory/inventoryInstances';
import InventoryInstance from '../../support/fragments/inventory/inventoryInstance';
import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants';
import InteractorsTools from '../../support/utils/interactorsTools';
import getRandomPostfix from '../../support/utils/stringTools';

Expand Down Expand Up @@ -99,7 +103,7 @@ describe('Acquisition units', () => {
],
acquisitionMethod: acquisitionMethodResponse.body.acquisitionMethods[0].id,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: materialType.id,
materialSupplier: organization.id,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants';
import {
ACQUISITION_METHOD_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../support/constants';
import Permissions from '../../support/dictionary/permissions';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import NewOrder from '../../support/fragments/orders/newOrder';
Expand Down Expand Up @@ -73,7 +77,7 @@ describe('Acquisition Units', () => {
locations: [{ locationId: location.id, quantity: 1, quantityPhysical: 1 }],
acquisitionMethod: params.body.acquisitionMethods[0].id,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: mtypes.body.id,
materialSupplier: responseOrganizations,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
ACQUISITION_METHOD_NAMES_IN_PROFILE,
LOCATION_NAMES,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../support/constants';
import Permissions from '../../support/dictionary/permissions';
import Claiming from '../../support/fragments/claiming/claiming';
Expand Down Expand Up @@ -93,7 +94,7 @@ describe('Claiming', () => {
],
acquisitionMethod: testData.acquisitionMethod,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: testData.materialType.id,
materialSupplier: testData.organization.id,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import uuid from 'uuid';
import {
ACQUISITION_METHOD_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../support/constants';
import Permissions from '../../support/dictionary/permissions';
import Claiming from '../../support/fragments/claiming/claiming';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import NewOrder from '../../support/fragments/orders/newOrder';
import OrderLines from '../../support/fragments/orders/orderLines';
import Orders from '../../support/fragments/orders/orders';
import Pieces from '../../support/fragments/orders/pieces/pieces';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import NewOrganization from '../../support/fragments/organizations/newOrganization';
import Organizations from '../../support/fragments/organizations/organizations';
import Receiving from '../../support/fragments/receiving/receiving';
import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation';
import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints';
import TopMenu from '../../support/fragments/topMenu';
import Users from '../../support/fragments/users/users';
import Claiming from '../../support/fragments/claiming/claiming';
import Receiving from '../../support/fragments/receiving/receiving';
import getRandomPostfix from '../../support/utils/stringTools';
import { ORDER_STATUSES, ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../support/constants';

describe('Claiming', () => {
const testData = {
Expand Down Expand Up @@ -81,7 +85,7 @@ describe('Claiming', () => {
],
acquisitionMethod: testData.acquisitionMethod,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: testData.materialType.id,
materialSupplier: testData.organization.id,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import uuid from 'uuid';
import {
ACQUISITION_METHOD_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../support/constants';
import Permissions from '../../support/dictionary/permissions';
import Claiming from '../../support/fragments/claiming/claiming';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import NewOrder from '../../support/fragments/orders/newOrder';
import OrderLines from '../../support/fragments/orders/orderLines';
import Orders from '../../support/fragments/orders/orders';
import Pieces from '../../support/fragments/orders/pieces/pieces';
import BasicOrderLine from '../../support/fragments/orders/basicOrderLine';
import NewOrganization from '../../support/fragments/organizations/newOrganization';
import Organizations from '../../support/fragments/organizations/organizations';
import Receiving from '../../support/fragments/receiving/receiving';
import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation';
import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints';
import TopMenu from '../../support/fragments/topMenu';
import Users from '../../support/fragments/users/users';
import Claiming from '../../support/fragments/claiming/claiming';
import Receiving from '../../support/fragments/receiving/receiving';
import getRandomPostfix from '../../support/utils/stringTools';
import { ORDER_STATUSES, ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../support/constants';

describe('Claiming', () => {
const testData = {
Expand Down Expand Up @@ -81,7 +85,7 @@ describe('Claiming', () => {
],
acquisitionMethod: testData.acquisitionMethod,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: testData.materialType.id,
materialSupplier: testData.organization.id,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
APPLICATION_NAMES,
LOCATION_NAMES,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
import Permissions from '../../../../support/dictionary/permissions';
Expand Down Expand Up @@ -62,7 +63,7 @@ describe('Inventory', () => {
quantityPhysical: 1,
},
physical: {
createInventory: 'Instance, Holding',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING,
materialSupplier: vendorId,
},
locations: [
Expand Down Expand Up @@ -124,7 +125,7 @@ describe('Inventory', () => {
quantityPhysical: 1,
},
physical: {
createInventory: 'Instance, Holding',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING,
materialSupplier: vendorId,
},
locations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
APPLICATION_NAMES,
LOCATION_NAMES,
VENDOR_NAMES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
import Permissions from '../../../../support/dictionary/permissions';
Expand Down Expand Up @@ -71,7 +72,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.centralOrderLine.acquisitionMethodId,
listUnitPrice: testData.centralOrderLine.price,
poLineEstimatedPrice: testData.centralOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.centralOrder = order;
Expand Down Expand Up @@ -111,7 +112,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.memberOrderLine.acquisitionMethodId,
listUnitPrice: testData.memberOrderLine.price,
poLineEstimatedPrice: testData.memberOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.memberOrder = order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
APPLICATION_NAMES,
HOLDINGS_SOURCE_NAMES,
LOCATION_NAMES,
POL_CREATE_INVENTORY_SETTINGS,
VENDOR_NAMES,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
Expand Down Expand Up @@ -73,7 +74,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.centralOrderLine.acquisitionMethodId,
listUnitPrice: testData.centralOrderLine.price,
poLineEstimatedPrice: testData.centralOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.centralOrder = order;
Expand Down Expand Up @@ -130,7 +131,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.memberOrderLine.acquisitionMethodId,
listUnitPrice: testData.memberOrderLine.price,
poLineEstimatedPrice: testData.memberOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.memberOrder = order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
HOLDINGS_SOURCE_NAMES,
ITEM_STATUS_NAMES,
LOCATION_NAMES,
POL_CREATE_INVENTORY_SETTINGS,
VENDOR_NAMES,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
Expand Down Expand Up @@ -107,7 +108,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.centralOrderLine.acquisitionMethodId,
listUnitPrice: testData.centralOrderLine.price,
poLineEstimatedPrice: testData.centralOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.centralOrder = order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
APPLICATION_NAMES,
DEFAULT_JOB_PROFILE_NAMES,
LOCATION_NAMES,
POL_CREATE_INVENTORY_SETTINGS,
VENDOR_NAMES,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
Expand Down Expand Up @@ -85,7 +86,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.centralOrderLine.acquisitionMethodId,
listUnitPrice: testData.centralOrderLine.price,
poLineEstimatedPrice: testData.centralOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.centralOrder = order;
Expand Down Expand Up @@ -125,7 +126,7 @@ describe('Inventory', () => {
acquisitionMethod: testData.memberOrderLine.acquisitionMethodId,
listUnitPrice: testData.memberOrderLine.price,
poLineEstimatedPrice: testData.memberOrderLine.price,
createInventory: 'Instance',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE,
}),
).then((order) => {
testData.memberOrder = order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
APPLICATION_NAMES,
INVOICE_STATUSES,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../../support/constants';
import Affiliations, { tenantNames } from '../../../support/dictionary/affiliations';
import Permissions from '../../../support/dictionary/permissions';
Expand Down Expand Up @@ -120,7 +121,8 @@ describe('Invoices', () => {
],
acquisitionMethod: params.body.acquisitionMethods[0].id,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory:
POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: mtypes.body.id,
materialSupplier: responseOrganizations,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import Permissions from '../../../support/dictionary/permissions';
import {
ACQUISITION_METHOD_NAMES_IN_PROFILE,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../../support/constants';
import Affiliations, { tenantNames } from '../../../support/dictionary/affiliations';
import Users from '../../../support/fragments/users/users';
import TopMenu from '../../../support/fragments/topMenu';
import ConsortiumManager from '../../../support/fragments/settings/consortium-manager/consortium-manager';
import getRandomPostfix from '../../../support/utils/stringTools';
import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints';
import Permissions from '../../../support/dictionary/permissions';
import { NewOrder, Orders } from '../../../support/fragments/orders';
import { NewOrganization, Organizations } from '../../../support/fragments/organizations';
import OrderLines from '../../../support/fragments/orders/orderLines';
import NewLocation from '../../../support/fragments/settings/tenant/locations/newLocation';
import { ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../../support/constants';
import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine';
import OrderLines from '../../../support/fragments/orders/orderLines';
import { NewOrganization, Organizations } from '../../../support/fragments/organizations';
import ConsortiumManager from '../../../support/fragments/settings/consortium-manager/consortium-manager';
import MaterialTypes from '../../../support/fragments/settings/inventory/materialTypes';
import NewLocation from '../../../support/fragments/settings/tenant/locations/newLocation';
import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints';
import TopMenu from '../../../support/fragments/topMenu';
import Users from '../../../support/fragments/users/users';
import getRandomPostfix from '../../../support/utils/stringTools';

describe('Orders', () => {
describe('Consortium (Orders)', () => {
Expand Down Expand Up @@ -121,7 +124,8 @@ describe('Orders', () => {
],
acquisitionMethod: params.body.acquisitionMethods[0].id,
physical: {
createInventory: 'Instance, Holding, Item',
createInventory:
POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: mtypes.body.id,
materialSupplier: responseOrganizations,
volumes: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
APPLICATION_NAMES,
LOCATION_NAMES,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
} from '../../../support/constants';
import Affiliations, { tenantNames } from '../../../support/dictionary/affiliations';
import Permissions from '../../../support/dictionary/permissions';
Expand Down Expand Up @@ -57,7 +58,7 @@ describe('Orders', () => {
acquisitionMethod: auResp.body.acquisitionMethods[0].id,
locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }],
physical: {
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: mtypeResp.id,
volumes: [],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
MATERIAL_TYPE_NAMES,
ORDER_FORMAT_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
RECORD_STATUSES,
VENDOR_NAMES,
} from '../../../support/constants';
Expand Down Expand Up @@ -96,7 +97,7 @@ describe('Data Import', () => {
quantityPhysical: '980$g',
currency: 'USD',
materialSupplier: VENDOR_NAMES.GOBI,
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: MATERIAL_TYPE_NAMES.BOOK,
contributor: '100$a',
contributorType: 'Personal name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
MATERIAL_TYPE_NAMES,
ORDER_FORMAT_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
RECORD_STATUSES,
VENDOR_NAMES,
} from '../../../support/constants';
Expand Down Expand Up @@ -70,7 +71,7 @@ describe('Data Import', () => {
quantityPhysical: '980$g',
currency: 'USD',
materialSupplier: VENDOR_NAMES.GOBI,
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: MATERIAL_TYPE_NAMES.BOOK,
contributor: '100$a',
contributorType: 'Personal name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
MATERIAL_TYPE_NAMES,
ORDER_FORMAT_NAMES_IN_PROFILE,
ORDER_STATUSES,
POL_CREATE_INVENTORY_SETTINGS,
RECORD_STATUSES,
VENDOR_NAMES,
} from '../../../support/constants';
Expand Down Expand Up @@ -65,7 +66,7 @@ describe('Data Import', () => {
quantityPhysical: '980$g',
currency: 'USD',
materialSupplier: VENDOR_NAMES.GOBI,
createInventory: 'Instance, Holding, Item',
createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM,
materialType: MATERIAL_TYPE_NAMES.BOOK,
contributor: '100$a',
contributorType: 'Personal name',
Expand Down
Loading
Loading