diff --git a/cypress/e2e/acquisition-units/user-not-in-au-can-assign-au-to-new-title-with-restrictions.cy.js b/cypress/e2e/acquisition-units/user-not-in-au-can-assign-au-to-new-title-with-restrictions.cy.js index 42d2c40bf8..61b9d9a90c 100644 --- a/cypress/e2e/acquisition-units/user-not-in-au-can-assign-au-to-new-title-with-restrictions.cy.js +++ b/cypress/e2e/acquisition-units/user-not-in-au-can-assign-au-to-new-title-with-restrictions.cy.js @@ -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'; @@ -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'; @@ -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: [], diff --git a/cypress/e2e/acquisition-units/user-not-in-au-can-create-title-without-au-assignment.cy.js b/cypress/e2e/acquisition-units/user-not-in-au-can-create-title-without-au-assignment.cy.js index 4fcb4aaa69..f796618b12 100644 --- a/cypress/e2e/acquisition-units/user-not-in-au-can-create-title-without-au-assignment.cy.js +++ b/cypress/e2e/acquisition-units/user-not-in-au-can-create-title-without-au-assignment.cy.js @@ -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'; @@ -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: [], diff --git a/cypress/e2e/claiming/claiming-jobs-for-consecutive-runs-displayed-in-export-manager.cy.js b/cypress/e2e/claiming/claiming-jobs-for-consecutive-runs-displayed-in-export-manager.cy.js index e7437255fd..3a44712365 100644 --- a/cypress/e2e/claiming/claiming-jobs-for-consecutive-runs-displayed-in-export-manager.cy.js +++ b/cypress/e2e/claiming/claiming-jobs-for-consecutive-runs-displayed-in-export-manager.cy.js @@ -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'; @@ -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: [], diff --git a/cypress/e2e/claiming/user-without-receiving-edit-capabilities-cannot-perform-claim-actions.cy.js b/cypress/e2e/claiming/user-without-receiving-edit-capabilities-cannot-perform-claim-actions.cy.js index 5070682f4d..b7c41dcc02 100644 --- a/cypress/e2e/claiming/user-without-receiving-edit-capabilities-cannot-perform-claim-actions.cy.js +++ b/cypress/e2e/claiming/user-without-receiving-edit-capabilities-cannot-perform-claim-actions.cy.js @@ -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 = { @@ -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: [], diff --git a/cypress/e2e/claiming/user-without-receiving-view-capabilities-cannot-view-pieces.cy.js b/cypress/e2e/claiming/user-without-receiving-view-capabilities-cannot-view-pieces.cy.js index 0ff57d701c..7c77392967 100644 --- a/cypress/e2e/claiming/user-without-receiving-view-capabilities-cannot-view-pieces.cy.js +++ b/cypress/e2e/claiming/user-without-receiving-view-capabilities-cannot-view-pieces.cy.js @@ -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 = { @@ -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: [], diff --git a/cypress/e2e/consortia/inventory/holdings/receiving-history-accordion-for-shared-holdings-with-linked-central-and-member.cy.js b/cypress/e2e/consortia/inventory/holdings/receiving-history-accordion-for-shared-holdings-with-linked-central-and-member.cy.js index a2bc6c5cdb..de48a08804 100644 --- a/cypress/e2e/consortia/inventory/holdings/receiving-history-accordion-for-shared-holdings-with-linked-central-and-member.cy.js +++ b/cypress/e2e/consortia/inventory/holdings/receiving-history-accordion-for-shared-holdings-with-linked-central-and-member.cy.js @@ -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'; @@ -62,7 +63,7 @@ describe('Inventory', () => { quantityPhysical: 1, }, physical: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, materialSupplier: vendorId, }, locations: [ @@ -124,7 +125,7 @@ describe('Inventory', () => { quantityPhysical: 1, }, physical: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, materialSupplier: vendorId, }, locations: [ diff --git a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-folio-instance-with-linked-central-and-member.cy.js b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-folio-instance-with-linked-central-and-member.cy.js index 99d08d74bc..c812479cf9 100644 --- a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-folio-instance-with-linked-central-and-member.cy.js +++ b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-folio-instance-with-linked-central-and-member.cy.js @@ -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'; @@ -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; @@ -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; diff --git a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-holdings-with-linked-central-and-member.cy.js b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-holdings-with-linked-central-and-member.cy.js index 47ebf7f24c..b3ce7276f7 100644 --- a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-holdings-with-linked-central-and-member.cy.js +++ b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-holdings-with-linked-central-and-member.cy.js @@ -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'; @@ -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; @@ -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; diff --git a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-item-with-linked-central-and-member.cy.js b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-item-with-linked-central-and-member.cy.js index 05079e237b..47688ad1b0 100644 --- a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-item-with-linked-central-and-member.cy.js +++ b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-item-with-linked-central-and-member.cy.js @@ -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'; @@ -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; diff --git a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-marc-instance-with-linked-central-and-member.cy.js b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-marc-instance-with-linked-central-and-member.cy.js index abf87a33ff..e1e4177ae3 100644 --- a/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-marc-instance-with-linked-central-and-member.cy.js +++ b/cypress/e2e/consortia/inventory/instance/acq-accordion-for-shared-marc-instance-with-linked-central-and-member.cy.js @@ -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'; @@ -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; @@ -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; diff --git a/cypress/e2e/consortia/invoices/pay-invoice-linked-with-pol-created-in-member-tenant.cy.js b/cypress/e2e/consortia/invoices/pay-invoice-linked-with-pol-created-in-member-tenant.cy.js index 8425b78bde..084de3b4bf 100644 --- a/cypress/e2e/consortia/invoices/pay-invoice-linked-with-pol-created-in-member-tenant.cy.js +++ b/cypress/e2e/consortia/invoices/pay-invoice-linked-with-pol-created-in-member-tenant.cy.js @@ -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'; @@ -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: [], diff --git a/cypress/e2e/consortia/orders/pol-details-pane-contains-affiliation-names-of-locations-from-member-tenants.cy.js b/cypress/e2e/consortia/orders/pol-details-pane-contains-affiliation-names-of-locations-from-member-tenants.cy.js index 6123ea272b..de971b489c 100644 --- a/cypress/e2e/consortia/orders/pol-details-pane-contains-affiliation-names-of-locations-from-member-tenants.cy.js +++ b/cypress/e2e/consortia/orders/pol-details-pane-contains-affiliation-names-of-locations-from-member-tenants.cy.js @@ -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)', () => { @@ -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: [], diff --git a/cypress/e2e/consortia/orders/receiving-for-shared-instance-in-member-tenant.cy.js b/cypress/e2e/consortia/orders/receiving-for-shared-instance-in-member-tenant.cy.js index ff89084e50..2d49ce24cb 100644 --- a/cypress/e2e/consortia/orders/receiving-for-shared-instance-in-member-tenant.cy.js +++ b/cypress/e2e/consortia/orders/receiving-for-shared-instance-in-member-tenant.cy.js @@ -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'; @@ -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: [], }, diff --git a/cypress/e2e/data-import/importing-marc-bib-files/import-of-orders-with-pending-status.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/import-of-orders-with-pending-status.cy.js index 6a418580a2..8b253df022 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/import-of-orders-with-pending-status.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/import-of-orders-with-pending-status.cy.js @@ -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'; @@ -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', diff --git a/cypress/e2e/data-import/log-details/importing-of-orders-with-pending-status.cy.js b/cypress/e2e/data-import/log-details/importing-of-orders-with-pending-status.cy.js index b78319d6f8..a52882d459 100644 --- a/cypress/e2e/data-import/log-details/importing-of-orders-with-pending-status.cy.js +++ b/cypress/e2e/data-import/log-details/importing-of-orders-with-pending-status.cy.js @@ -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'; @@ -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', diff --git a/cypress/e2e/data-import/log-details/json-error-screen-for-imported-orders.cy.js b/cypress/e2e/data-import/log-details/json-error-screen-for-imported-orders.cy.js index 5ffda2e116..77b167d412 100644 --- a/cypress/e2e/data-import/log-details/json-error-screen-for-imported-orders.cy.js +++ b/cypress/e2e/data-import/log-details/json-error-screen-for-imported-orders.cy.js @@ -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'; @@ -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', diff --git a/cypress/e2e/data-import/log-details/json-screen-for-successful-imported-orders.cy.js b/cypress/e2e/data-import/log-details/json-screen-for-successful-imported-orders.cy.js index 1c3cb392aa..349344d02c 100644 --- a/cypress/e2e/data-import/log-details/json-screen-for-successful-imported-orders.cy.js +++ b/cypress/e2e/data-import/log-details/json-screen-for-successful-imported-orders.cy.js @@ -5,6 +5,7 @@ import { MATERIAL_TYPE_NAMES, ORDER_FORMAT_NAMES_IN_PROFILE, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, VENDOR_NAMES, } from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; @@ -64,7 +65,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', diff --git a/cypress/e2e/data-import/log-details/log-details-for-created-imported-order-records.cy.js b/cypress/e2e/data-import/log-details/log-details-for-created-imported-order-records.cy.js index 46c4a27202..56e8dd84fa 100644 --- a/cypress/e2e/data-import/log-details/log-details-for-created-imported-order-records.cy.js +++ b/cypress/e2e/data-import/log-details/log-details-for-created-imported-order-records.cy.js @@ -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'; @@ -64,7 +65,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', diff --git a/cypress/e2e/data-import/log-details/log-details-for-no-action-order-records.cy.js b/cypress/e2e/data-import/log-details/log-details-for-no-action-order-records.cy.js index e235bdb42c..2bcc6eedb8 100644 --- a/cypress/e2e/data-import/log-details/log-details-for-no-action-order-records.cy.js +++ b/cypress/e2e/data-import/log-details/log-details-for-no-action-order-records.cy.js @@ -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'; @@ -71,7 +72,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', diff --git a/cypress/e2e/data-import/permissions/can-see-json-tab-for-imported-orders-with-data-import-can-upload-files-import-and-view-logs-permission.cy.js b/cypress/e2e/data-import/permissions/can-see-json-tab-for-imported-orders-with-data-import-can-upload-files-import-and-view-logs-permission.cy.js index 9cf914a6de..bf6e06000a 100644 --- a/cypress/e2e/data-import/permissions/can-see-json-tab-for-imported-orders-with-data-import-can-upload-files-import-and-view-logs-permission.cy.js +++ b/cypress/e2e/data-import/permissions/can-see-json-tab-for-imported-orders-with-data-import-can-upload-files-import-and-view-logs-permission.cy.js @@ -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'; @@ -64,7 +65,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', diff --git a/cypress/e2e/export-manager/export-orders-in-edifact-format/job-type-filter-has-valid-options-list.cy.js b/cypress/e2e/export-manager/export-orders-in-edifact-format/job-type-filter-has-valid-options-list.cy.js index 5fc149266f..265e5773fc 100644 --- a/cypress/e2e/export-manager/export-orders-in-edifact-format/job-type-filter-has-valid-options-list.cy.js +++ b/cypress/e2e/export-manager/export-orders-in-edifact-format/job-type-filter-has-valid-options-list.cy.js @@ -4,6 +4,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 BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-search-pane'; @@ -73,7 +74,7 @@ describe('Export Manager', () => { ], acquisitionMethod: acqMethod.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypes.body.id, volumes: [], }, diff --git a/cypress/e2e/export-manager/job-for-order-with-acquisition-unit.cy.js b/cypress/e2e/export-manager/job-for-order-with-acquisition-unit.cy.js index 74dd87ef24..03de84f990 100644 --- a/cypress/e2e/export-manager/job-for-order-with-acquisition-unit.cy.js +++ b/cypress/e2e/export-manager/job-for-order-with-acquisition-unit.cy.js @@ -3,6 +3,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 ExportManagerSearchPane from '../../support/fragments/exportManager/exportManagerSearchPane'; @@ -79,7 +80,7 @@ describe('Export Manager', () => { ], acquisitionMethod: acqMethod.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypes.body.id, volumes: [], }, diff --git a/cypress/e2e/finance/encumbrance-has-0-amount-when-related-order-was-closed-and-paid-invoice-was-cancelled.cy.js b/cypress/e2e/finance/encumbrance-has-0-amount-when-related-order-was-closed-and-paid-invoice-was-cancelled.cy.js index 926e576b38..709efac911 100644 --- a/cypress/e2e/finance/encumbrance-has-0-amount-when-related-order-was-closed-and-paid-invoice-was-cancelled.cy.js +++ b/cypress/e2e/finance/encumbrance-has-0-amount-when-related-order-was-closed-and-paid-invoice-was-cancelled.cy.js @@ -1,9 +1,19 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; @@ -12,15 +22,6 @@ import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Finance', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -103,7 +104,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/error-message-appears-when-approve-invoice-from-previous-budget.cy.js b/cypress/e2e/finance/error-message-appears-when-approve-invoice-from-previous-budget.cy.js index 4e92183cc7..0836737a66 100644 --- a/cypress/e2e/finance/error-message-appears-when-approve-invoice-from-previous-budget.cy.js +++ b/cypress/e2e/finance/error-message-appears-when-approve-invoice-from-previous-budget.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { Budgets, FiscalYears, LedgerRollovers } from '../../support/fragments/finance'; @@ -87,7 +88,7 @@ describe('Finance', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/displaying-settings-for-common-rollover.cy.js b/cypress/e2e/finance/fiscalYears/displaying-settings-for-common-rollover.cy.js index 5e2905b2ba..78e5f3cf55 100644 --- a/cypress/e2e/finance/fiscalYears/displaying-settings-for-common-rollover.cy.js +++ b/cypress/e2e/finance/fiscalYears/displaying-settings-for-common-rollover.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -100,7 +101,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/displaying-settings-for-test-rollover.cy.js b/cypress/e2e/finance/fiscalYears/displaying-settings-for-test-rollover.cy.js index 064ea2b1fd..4bd759410a 100644 --- a/cypress/e2e/finance/fiscalYears/displaying-settings-for-test-rollover.cy.js +++ b/cypress/e2e/finance/fiscalYears/displaying-settings-for-test-rollover.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -99,7 +100,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/budget-summary-and-encumbrances-updated.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/budget-summary-and-encumbrances-updated.cy.js index 9ec968dc7c..0960315bdd 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/budget-summary-and-encumbrances-updated.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/budget-summary-and-encumbrances-updated.cy.js @@ -3,8 +3,10 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../../support/constants'; import permissions from '../../../../support/dictionary/permissions'; +import { TransactionDetails } from '../../../../support/fragments/finance'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../../support/fragments/finance/fiscalYears/fiscalYears'; @@ -22,7 +24,6 @@ import TopMenuNavigation from '../../../../support/fragments/topMenuNavigation'; import Users from '../../../../support/fragments/users/users'; import DateTools from '../../../../support/utils/dateTools'; import getRandomPostfix from '../../../../support/utils/stringTools'; -import { TransactionDetails } from '../../../../support/fragments/finance'; describe('Fiscal Year Rollover', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -135,7 +136,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -157,7 +158,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/consecutive-rollovers-within-three-fiscal-years.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/consecutive-rollovers-within-three-fiscal-years.cy.js index ac9b2d762b..7bff9d0359 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/consecutive-rollovers-within-three-fiscal-years.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/consecutive-rollovers-within-three-fiscal-years.cy.js @@ -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 { TransactionDetails } from '../../../../support/fragments/finance'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; @@ -108,7 +112,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/encumbrances-are-rolled-over.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/encumbrances-are-rolled-over.cy.js index c71ed54ccb..a8336843be 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/encumbrances-are-rolled-over.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/encumbrances-are-rolled-over.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../../support/constants'; import permissions from '../../../../support/dictionary/permissions'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; @@ -110,7 +111,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -132,7 +133,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/execute-rollover-not-active-allocation.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/execute-rollover-not-active-allocation.cy.js index 8d235e4284..e8652b6aee 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/execute-rollover-not-active-allocation.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/execute-rollover-not-active-allocation.cy.js @@ -1,10 +1,18 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../../support/constants'; import permissions from '../../../../support/dictionary/permissions'; +import Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../../../support/fragments/invoices/invoices'; +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'; @@ -14,13 +22,6 @@ import TopMenu from '../../../../support/fragments/topMenu'; import Users from '../../../../support/fragments/users/users'; import DateTools from '../../../../support/utils/dateTools'; import getRandomPostfix from '../../../../support/utils/stringTools'; -import Budgets from '../../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../../support/constants'; -import BasicOrderLine from '../../../../support/fragments/orders/basicOrderLine'; describe('Finance', () => { describe('Fiscal Year Rollover', () => { @@ -110,7 +111,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -132,7 +133,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/make-more-than-one-preview-for-one-ledger.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/make-more-than-one-preview-for-one-ledger.cy.js index e404144c61..f077636194 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/make-more-than-one-preview-for-one-ledger.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/make-more-than-one-preview-for-one-ledger.cy.js @@ -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 Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; @@ -95,7 +99,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/planned-budget-status-is-updating-to-active-during-rollover.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/planned-budget-status-is-updating-to-active-during-rollover.cy.js index 029298ff3f..1436bd8671 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/planned-budget-status-is-updating-to-active-during-rollover.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/planned-budget-status-is-updating-to-active-during-rollover.cy.js @@ -3,8 +3,10 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../../support/constants'; import permissions from '../../../../support/dictionary/permissions'; +import { TransactionDetails } from '../../../../support/fragments/finance'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../../support/fragments/finance/fiscalYears/fiscalYears'; @@ -21,7 +23,6 @@ import ServicePoints from '../../../../support/fragments/settings/tenant/service import TopMenu from '../../../../support/fragments/topMenu'; import Users from '../../../../support/fragments/users/users'; import DateTools from '../../../../support/utils/dateTools'; -import { TransactionDetails } from '../../../../support/fragments/finance'; describe('Fiscal Year Rollover', () => { const testData = { @@ -147,7 +148,7 @@ describe('Fiscal Year Rollover', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-active-allocation.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-active-allocation.cy.js index c6d874afe2..7540fa4bff 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-active-allocation.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-active-allocation.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../../support/constants'; import permissions from '../../../../support/dictionary/permissions'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; @@ -110,7 +111,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -132,7 +133,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-not-active-allocation.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-not-active-allocation.cy.js index 06fafb199f..46defdec42 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-not-active-allocation.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-cash-balance-as-transfer-not-active-allocation.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../../support/constants'; import permissions from '../../../../support/dictionary/permissions'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; @@ -110,7 +111,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -132,7 +133,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-error-csv-validation.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-error-csv-validation.cy.js index f3d1a74afe..550ba27004 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-error-csv-validation.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-error-csv-validation.cy.js @@ -1,5 +1,9 @@ import uuid from 'uuid'; -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 Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../../../support/fragments/finance/fiscalYears/fiscalYears'; @@ -93,7 +97,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-settings-applying-to-encumbrances.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-settings-applying-to-encumbrances.cy.js index 2efd5c38c8..9fcf7cb047 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-settings-applying-to-encumbrances.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/rollover-settings-applying-to-encumbrances.cy.js @@ -1,21 +1,25 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../../support/constants'; import { Permissions } from '../../../../support/dictionary'; import { Budgets, FinanceHelper, FiscalYears, Funds, - Ledgers, LedgerDetails, LedgerRolloverInProgress, + Ledgers, Transactions, } from '../../../../support/fragments/finance'; +import { BasicOrderLine, NewOrder, OrderLines, Orders } from '../../../../support/fragments/orders'; import { NewOrganization, Organizations } from '../../../../support/fragments/organizations'; -import { NewOrder, BasicOrderLine, Orders, OrderLines } from '../../../../support/fragments/orders'; import TopMenu from '../../../../support/fragments/topMenu'; import Users from '../../../../support/fragments/users/users'; import { CodeTools, StringTools } from '../../../../support/utils'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../../../support/constants'; describe('Finance', () => { describe('Fiscal Year Rollover', () => { @@ -94,7 +98,7 @@ describe('Finance', () => { }), acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialType.id, materialSupplier: testData.organization.id, volumes: [], @@ -116,7 +120,7 @@ describe('Finance', () => { id: uuid(), acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialType.id, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/test-rollover-is-blocked.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/test-rollover-is-blocked.cy.js index 859c7ac45e..3699ae4c3c 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/test-rollover-is-blocked.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/test-rollover-is-blocked.cy.js @@ -1,5 +1,9 @@ import uuid from 'uuid'; -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 Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; @@ -111,7 +115,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/transactions-displaying-correctly-after-fund-name-was-changed.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/transactions-displaying-correctly-after-fund-name-was-changed.cy.js index 5f3c64268f..7ca20cf780 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/transactions-displaying-correctly-after-fund-name-was-changed.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/transactions-displaying-correctly-after-fund-name-was-changed.cy.js @@ -1,6 +1,11 @@ import uuid from 'uuid'; -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 { TransactionDetails } from '../../../../support/fragments/finance'; import Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../../support/fragments/finance/fiscalYears/fiscalYears'; @@ -16,7 +21,6 @@ import TopMenu from '../../../../support/fragments/topMenu'; import Users from '../../../../support/fragments/users/users'; import DateTools from '../../../../support/utils/dateTools'; import getRandomPostfix from '../../../../support/utils/stringTools'; -import { TransactionDetails } from '../../../../support/fragments/finance'; describe('Fiscal Year Rollover', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -119,7 +123,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-order-line-encumbrance-link-updated-after-rollover.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-order-line-encumbrance-link-updated-after-rollover.cy.js index 575e783dc0..3fc6cab690 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-order-line-encumbrance-link-updated-after-rollover.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-order-line-encumbrance-link-updated-after-rollover.cy.js @@ -1,23 +1,27 @@ 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 TopMenu from '../../../../support/fragments/topMenu'; +import { TransactionDetails } from '../../../../support/fragments/finance'; +import Budgets from '../../../../support/fragments/finance/budgets/budgets'; +import FinanceHelper from '../../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../../support/fragments/finance/fiscalYears/fiscalYears'; -import Ledgers from '../../../../support/fragments/finance/ledgers/ledgers'; import Funds from '../../../../support/fragments/finance/funds/funds'; -import Orders from '../../../../support/fragments/orders/orders'; -import Users from '../../../../support/fragments/users/users'; -import Budgets from '../../../../support/fragments/finance/budgets/budgets'; +import Ledgers from '../../../../support/fragments/finance/ledgers/ledgers'; +import { OrderLineDetails } from '../../../../support/fragments/orders'; import BasicOrderLine from '../../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../../support/fragments/orders/orderLines'; -import DateTools from '../../../../support/utils/dateTools'; -import getRandomPostfix from '../../../../support/utils/stringTools'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../../../support/constants'; -import Organizations from '../../../../support/fragments/organizations/organizations'; +import Orders from '../../../../support/fragments/orders/orders'; import NewOrganization from '../../../../support/fragments/organizations/newOrganization'; +import Organizations from '../../../../support/fragments/organizations/organizations'; +import TopMenu from '../../../../support/fragments/topMenu'; import TopMenuNavigation from '../../../../support/fragments/topMenuNavigation'; -import FinanceHelper from '../../../../support/fragments/finance/financeHelper'; -import { TransactionDetails } from '../../../../support/fragments/finance'; -import { OrderLineDetails } from '../../../../support/fragments/orders'; +import Users from '../../../../support/fragments/users/users'; +import DateTools from '../../../../support/utils/dateTools'; +import getRandomPostfix from '../../../../support/utils/stringTools'; describe('Finance', () => { describe('Fiscal Year Rollover', () => { @@ -104,7 +108,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -126,7 +130,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders-exchange-rate-is-set-manually.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders-exchange-rate-is-set-manually.cy.js index 9862c275ae..b7c90ffbe0 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders-exchange-rate-is-set-manually.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders-exchange-rate-is-set-manually.cy.js @@ -1,5 +1,9 @@ import uuid from 'uuid'; -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 Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; @@ -97,7 +101,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders.cy.js b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders.cy.js index 02caa3b76a..8e67ee9ed6 100644 --- a/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders.cy.js +++ b/cypress/e2e/finance/fiscalYears/fiscalYearRollover/verify-rollover-adjustment-and-estimated-price-displayed-correctly-for-foreign-currency-orders.cy.js @@ -1,5 +1,9 @@ import uuid from 'uuid'; -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 Budgets from '../../../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../../../support/fragments/finance/financeHelper'; @@ -97,7 +101,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fund-distribution-add-after-rollover.cy.js b/cypress/e2e/finance/fiscalYears/fund-distribution-add-after-rollover.cy.js index 231845d32a..4ede456420 100644 --- a/cypress/e2e/finance/fiscalYears/fund-distribution-add-after-rollover.cy.js +++ b/cypress/e2e/finance/fiscalYears/fund-distribution-add-after-rollover.cy.js @@ -1,21 +1,25 @@ 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 TopMenu from '../../../support/fragments/topMenu'; +import { TransactionDetails } from '../../../support/fragments/finance'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; -import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Funds from '../../../support/fragments/finance/funds/funds'; -import Orders from '../../../support/fragments/orders/orders'; -import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import DateTools from '../../../support/utils/dateTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../../support/constants'; -import Organizations from '../../../support/fragments/organizations/organizations'; +import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; +import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import { TransactionDetails } from '../../../support/fragments/finance'; +import Organizations from '../../../support/fragments/organizations/organizations'; +import TopMenu from '../../../support/fragments/topMenu'; +import Users from '../../../support/fragments/users/users'; +import DateTools from '../../../support/utils/dateTools'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance', () => { describe('Fiscal Year Rollover', () => { @@ -110,7 +114,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/fund-distribution-delete-after-rollover.cy.js b/cypress/e2e/finance/fiscalYears/fund-distribution-delete-after-rollover.cy.js index 5ee985d06d..c507af3be6 100644 --- a/cypress/e2e/finance/fiscalYears/fund-distribution-delete-after-rollover.cy.js +++ b/cypress/e2e/finance/fiscalYears/fund-distribution-delete-after-rollover.cy.js @@ -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 TopMenu from '../../../support/fragments/topMenu'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; -import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Funds from '../../../support/fragments/finance/funds/funds'; -import Orders from '../../../support/fragments/orders/orders'; -import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import DateTools from '../../../support/utils/dateTools'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../../support/constants'; -import Organizations from '../../../support/fragments/organizations/organizations'; +import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; +import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import Organizations from '../../../support/fragments/organizations/organizations'; +import TopMenu from '../../../support/fragments/topMenu'; +import Users from '../../../support/fragments/users/users'; +import DateTools from '../../../support/utils/dateTools'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance', () => { describe('Fiscal Year Rollover', () => { @@ -96,7 +100,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation-not-active-option.cy.js b/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation-not-active-option.cy.js index d9521fe6cc..6e4a1a5fc5 100644 --- a/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation-not-active-option.cy.js +++ b/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation-not-active-option.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import { Budgets, FiscalYears, Funds, Ledgers } from '../../../support/fragments/finance'; @@ -103,7 +104,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -125,7 +126,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation.cy.js b/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation.cy.js index 932bb7f65c..9b1520d57e 100644 --- a/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation.cy.js +++ b/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-allocation.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -109,7 +110,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -131,7 +132,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-none-allocation.cy.js b/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-none-allocation.cy.js index 5077c7d27d..42b3aea799 100644 --- a/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-none-allocation.cy.js +++ b/cypress/e2e/finance/fiscalYears/rollover-cash-balance-as-none-allocation.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -109,7 +110,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -131,7 +132,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/rollover-fiscal-year.cy.js b/cypress/e2e/finance/fiscalYears/rollover-fiscal-year.cy.js index ad837623fd..fbc5ff58d5 100644 --- a/cypress/e2e/finance/fiscalYears/rollover-fiscal-year.cy.js +++ b/cypress/e2e/finance/fiscalYears/rollover-fiscal-year.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -127,7 +128,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -149,7 +150,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/fiscalYears/test-and-common-rollover-are-executed-successfully.cy.js b/cypress/e2e/finance/fiscalYears/test-and-common-rollover-are-executed-successfully.cy.js index c2f9dbecb0..ae786e9cfb 100644 --- a/cypress/e2e/finance/fiscalYears/test-and-common-rollover-are-executed-successfully.cy.js +++ b/cypress/e2e/finance/fiscalYears/test-and-common-rollover-are-executed-successfully.cy.js @@ -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 FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; @@ -91,7 +95,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/funds/check-percent-of-total-expended.cy.js b/cypress/e2e/finance/funds/check-percent-of-total-expended.cy.js index ced16c4f9c..1d644e72e3 100644 --- a/cypress/e2e/finance/funds/check-percent-of-total-expended.cy.js +++ b/cypress/e2e/finance/funds/check-percent-of-total-expended.cy.js @@ -1,30 +1,31 @@ import uuid from 'uuid'; -import permissions from '../../../support/dictionary/permissions'; -import TopMenu from '../../../support/fragments/topMenu'; -import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; -import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; -import Funds from '../../../support/fragments/finance/funds/funds'; -import Groups from '../../../support/fragments/finance/groups/groups'; -import Orders from '../../../support/fragments/orders/orders'; -import Invoices from '../../../support/fragments/invoices/invoices'; -import Users from '../../../support/fragments/users/users'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import ExpenseClasses from '../../../support/fragments/settings/finance/expenseClasses'; -import NewOrder from '../../../support/fragments/orders/newOrder'; import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; -import Organizations from '../../../support/fragments/organizations/organizations'; +import permissions from '../../../support/dictionary/permissions'; +import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelper from '../../../support/fragments/finance/financeHelper'; +import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; +import FundDetails from '../../../support/fragments/finance/funds/fundDetails'; +import Funds from '../../../support/fragments/finance/funds/funds'; +import groupDetails from '../../../support/fragments/finance/groups/groupDetails'; +import Groups from '../../../support/fragments/finance/groups/groups'; +import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; +import Invoices from '../../../support/fragments/invoices/invoices'; 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 NewOrganization from '../../../support/fragments/organizations/newOrganization'; -import FinanceHelper from '../../../support/fragments/finance/financeHelper'; -import FundDetails from '../../../support/fragments/finance/funds/fundDetails'; -import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Organizations from '../../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../../support/fragments/settings/finance/expenseClasses'; +import TopMenu from '../../../support/fragments/topMenu'; +import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; -import groupDetails from '../../../support/fragments/finance/groups/groupDetails'; describe('Finance', () => { describe('Funds', () => { @@ -123,7 +124,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -153,7 +154,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/funds/correct-financial-summary-values-when-encumbered-amount-exceeds-available-amount.cy.js b/cypress/e2e/finance/funds/correct-financial-summary-values-when-encumbered-amount-exceeds-available-amount.cy.js index d045887537..a1ea1838e0 100644 --- a/cypress/e2e/finance/funds/correct-financial-summary-values-when-encumbered-amount-exceeds-available-amount.cy.js +++ b/cypress/e2e/finance/funds/correct-financial-summary-values-when-encumbered-amount-exceeds-available-amount.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import { @@ -101,7 +102,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none-without-rollover-with-ex-classes.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none-without-rollover-with-ex-classes.cy.js index 568d33d52d..1011628e29 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none-without-rollover-with-ex-classes.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none-without-rollover-with-ex-classes.cy.js @@ -3,6 +3,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 { Budgets, Funds, Ledgers } from '../../../../support/fragments/finance'; @@ -112,7 +113,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], @@ -153,7 +154,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none.cy.js index 8910080939..38c8addd94 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/expense-classes-none.cy.js @@ -3,6 +3,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 { @@ -112,7 +113,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-with-ex-classes.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-with-ex-classes.cy.js index 320fa15019..220698217f 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-with-ex-classes.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-with-ex-classes.cy.js @@ -3,6 +3,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 { @@ -125,7 +126,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], @@ -166,7 +167,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-without-rollover-with-ex-classes.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-without-rollover-with-ex-classes.cy.js index 34d0a47d26..bbc4a7f752 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-without-rollover-with-ex-classes.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-all-statuses-without-rollover-with-ex-classes.cy.js @@ -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 { Budgets, Ledgers } from '../../../../support/fragments/finance'; @@ -85,7 +86,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-with-rollover-and-2-exp-classes.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-with-rollover-and-2-exp-classes.cy.js index b31f160010..7c278ba625 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-with-rollover-and-2-exp-classes.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-with-rollover-and-2-exp-classes.cy.js @@ -3,6 +3,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 { @@ -142,7 +143,7 @@ describe('Finance', () => { ], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], @@ -185,7 +186,7 @@ describe('Finance', () => { ], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-without-rollover-with-2-exp-classes.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-without-rollover-with-2-exp-classes.cy.js index d37e549dcf..d7beae90f1 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-without-rollover-with-2-exp-classes.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-inactive-status-without-rollover-with-2-exp-classes.cy.js @@ -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 { Budgets, Funds, Ledgers } from '../../../../support/fragments/finance'; @@ -13,170 +14,172 @@ import TopMenu from '../../../../support/fragments/topMenu'; import Users from '../../../../support/fragments/users/users'; import FileManager from '../../../../support/utils/fileManager'; -describe('Finance: Ledgers', () => { - const organization = { ...NewOrganization.defaultUiOrganizations }; - const testData = { - organization, - user: {}, - expenseClass: { - name: 'Electronic', - code: 'Elec', - status: 'Active', - id: '', - }, - }; - const order = { - ...NewOrder.defaultOneTimeOrder, - approved: true, - reEncumber: true, - vendorId: testData.organization.id, - }; +describe('Finance', () => { + describe('Ledgers', () => { + const organization = { ...NewOrganization.defaultUiOrganizations }; + const testData = { + organization, + user: {}, + expenseClass: { + name: 'Electronic', + code: 'Elec', + status: 'Active', + id: '', + }, + }; + const order = { + ...NewOrder.defaultOneTimeOrder, + approved: true, + reEncumber: true, + vendorId: testData.organization.id, + }; - before('Setup test data', () => { - cy.getAdminToken(); - ExpenseClasses.getExpenseClassesViaApi({ - query: `name=="${testData.expenseClass.name}"`, - limit: 1, - }).then((response) => { - testData.expenseClass.id = response?.[0]?.id; + before('Setup test data', () => { + cy.getAdminToken(); + ExpenseClasses.getExpenseClassesViaApi({ + query: `name=="${testData.expenseClass.name}"`, + limit: 1, + }).then((response) => { + testData.expenseClass.id = response?.[0]?.id; - const { fiscalYear, ledger, fund, budget } = Budgets.createBudgetWithFundLedgerAndFYViaApi({ - ledger: { restrictEncumbrance: true, restrictExpenditures: true }, - budget: { - allocated: 100, - statusExpenseClasses: [ - { - status: testData.expenseClass.status, - expenseClassId: testData.expenseClass.id, - }, - ], - }, - }); - testData.fiscalYear = fiscalYear; - testData.ledger = ledger; - testData.fund = fund; - testData.budget = budget; + const { fiscalYear, ledger, fund, budget } = Budgets.createBudgetWithFundLedgerAndFYViaApi({ + ledger: { restrictEncumbrance: true, restrictExpenditures: true }, + budget: { + allocated: 100, + statusExpenseClasses: [ + { + status: testData.expenseClass.status, + expenseClassId: testData.expenseClass.id, + }, + ], + }, + }); + testData.fiscalYear = fiscalYear; + testData.ledger = ledger; + testData.fund = fund; + testData.budget = budget; - Organizations.createOrganizationViaApi(organization).then((orgResp) => { - organization.id = orgResp; - order.vendor = orgResp; + Organizations.createOrganizationViaApi(organization).then((orgResp) => { + organization.id = orgResp; + order.vendor = orgResp; - cy.getLocations({ query: `name="${LOCATION_NAMES.ANNEX_UI}"` }).then((locationResp) => { - cy.getAcquisitionMethodsApi({ - query: `value="${ACQUISITION_METHOD_NAMES_IN_PROFILE.PURCHASE_AT_VENDOR_SYSTEM}"`, - }).then((amResp) => { - cy.getBookMaterialType().then((mtypeResp) => { - const orderLine = { - ...BasicOrderLine.defaultOrderLine, - cost: { - listUnitPrice: 25.0, - currency: 'USD', - discountType: 'percentage', - quantityPhysical: 1, - poLineEstimatedPrice: 25.0, - }, - fundDistribution: [ - { - code: testData.fund.code, - fundId: testData.fund.id, - expenseClassId: testData.expenseClass.id, - value: 100, + cy.getLocations({ query: `name="${LOCATION_NAMES.ANNEX_UI}"` }).then((locationResp) => { + cy.getAcquisitionMethodsApi({ + query: `value="${ACQUISITION_METHOD_NAMES_IN_PROFILE.PURCHASE_AT_VENDOR_SYSTEM}"`, + }).then((amResp) => { + cy.getBookMaterialType().then((mtypeResp) => { + const orderLine = { + ...BasicOrderLine.defaultOrderLine, + cost: { + listUnitPrice: 25.0, + currency: 'USD', + discountType: 'percentage', + quantityPhysical: 1, + poLineEstimatedPrice: 25.0, + }, + fundDistribution: [ + { + code: testData.fund.code, + fundId: testData.fund.id, + expenseClassId: testData.expenseClass.id, + value: 100, + }, + ], + locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], + acquisitionMethod: amResp.body.acquisitionMethods[0].id, + physical: { + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, + materialType: mtypeResp.id, + materialSupplier: orgResp.id, + volumes: [], }, - ], - locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], - acquisitionMethod: amResp.body.acquisitionMethods[0].id, - physical: { - createInventory: 'Instance, Holding, Item', - materialType: mtypeResp.id, - materialSupplier: orgResp.id, - volumes: [], - }, - }; + }; - // Create first open order - Orders.createOrderViaApi(order).then((orderResp) => { - order.id = orderResp.id; - orderLine.purchaseOrderId = orderResp.id; + // Create first open order + Orders.createOrderViaApi(order).then((orderResp) => { + order.id = orderResp.id; + orderLine.purchaseOrderId = orderResp.id; - OrderLines.createOrderLineViaApi(orderLine); - Orders.updateOrderViaApi({ - ...orderResp, - workflowStatus: ORDER_STATUSES.OPEN, + OrderLines.createOrderLineViaApi(orderLine); + Orders.updateOrderViaApi({ + ...orderResp, + workflowStatus: ORDER_STATUSES.OPEN, + }); }); }); }); }); }); - }); - testData.fileName = `Export-${testData.ledger.code}-${fiscalYear.code}`; + testData.fileName = `Export-${testData.ledger.code}-${fiscalYear.code}`; - cy.loginAsAdmin(); - cy.visit(TopMenu.fundPath); - FinanceHelp.searchByName(testData.fund.name); - Funds.selectFund(testData.fund.name); - Funds.selectBudgetDetails(); - Funds.editBudget(); - Funds.changeStatusOfExpClassByName(testData.expenseClass.name, 'Inactive'); - }); + cy.loginAsAdmin(); + cy.visit(TopMenu.fundPath); + FinanceHelp.searchByName(testData.fund.name); + Funds.selectFund(testData.fund.name); + Funds.selectBudgetDetails(); + Funds.editBudget(); + Funds.changeStatusOfExpClassByName(testData.expenseClass.name, 'Inactive'); + }); - cy.createTempUser([ - Permissions.uiFinanceExportFinanceRecords.gui, - Permissions.uiFinanceViewLedger.gui, - ]).then((userProperties) => { - testData.user = userProperties; + cy.createTempUser([ + Permissions.uiFinanceExportFinanceRecords.gui, + Permissions.uiFinanceViewLedger.gui, + ]).then((userProperties) => { + testData.user = userProperties; - cy.login(userProperties.username, userProperties.password, { - path: TopMenu.ledgerPath, - waiter: Ledgers.waitForLedgerDetailsLoading, + cy.login(userProperties.username, userProperties.password, { + path: TopMenu.ledgerPath, + waiter: Ledgers.waitForLedgerDetailsLoading, + }); }); }); - }); - after('Clean up test data', () => { - FileManager.deleteFile(`cypress/downloads/${testData.fileName}.csv`); - cy.getAdminToken(); - Users.deleteViaApi(testData.user.userId); - }); + after('Clean up test data', () => { + FileManager.deleteFile(`cypress/downloads/${testData.fileName}.csv`); + cy.getAdminToken(); + Users.deleteViaApi(testData.user.userId); + }); - it( - 'C350978 Ledger export settings: current year Fund with budget, Economic (Inactive) Class, Export settings-Inactive status (thunderjet) (TaaS)', - { tags: ['extendedPath', 'thunderjet', 'C350978'] }, - () => { - FinanceHelp.searchByName(testData.ledger.name); - Ledgers.selectLedger(testData.ledger.name); - Ledgers.exportBudgetInformation(); - Ledgers.prepareExportSettings(testData.fiscalYear.code, 'Inactive', testData.ledger); - Ledgers.checkColumnNamesInDownloadedLedgerExportFileWithExpClasses( - `${testData.fileName}.csv`, - ); - Ledgers.checkColumnContentInDownloadedLedgerExportFileWithExpClasses( - `${testData.fileName}.csv`, - testData.expenseClass.name, - testData.fund, - testData.budget.name, - '100', - '100', - '100', - '0', - '0', - '100', - '0', - '100', - '25', - '0', - '0', - '25', - '0', - '0', - '100', - '75', - testData.expenseClass.code, - 'Inactive', - '25', - '0', - '0', - ); - Ledgers.deleteDownloadedFile(`${testData.fileName}.csv`); - }, - ); + it( + 'C350978 Ledger export settings: current year Fund with budget, Economic (Inactive) Class, Export settings-Inactive status (thunderjet) (TaaS)', + { tags: ['extendedPath', 'thunderjet', 'C350978'] }, + () => { + FinanceHelp.searchByName(testData.ledger.name); + Ledgers.selectLedger(testData.ledger.name); + Ledgers.exportBudgetInformation(); + Ledgers.prepareExportSettings(testData.fiscalYear.code, 'Inactive', testData.ledger); + Ledgers.checkColumnNamesInDownloadedLedgerExportFileWithExpClasses( + `${testData.fileName}.csv`, + ); + Ledgers.checkColumnContentInDownloadedLedgerExportFileWithExpClasses( + `${testData.fileName}.csv`, + testData.expenseClass.name, + testData.fund, + testData.budget.name, + '100', + '100', + '100', + '0', + '0', + '100', + '0', + '100', + '25', + '0', + '0', + '25', + '0', + '0', + '100', + '75', + testData.expenseClass.code, + 'Inactive', + '25', + '0', + '0', + ); + Ledgers.deleteDownloadedFile(`${testData.fileName}.csv`); + }, + ); + }); }); diff --git a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-no-fiscal-year-each-class-status.cy.js b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-no-fiscal-year-each-class-status.cy.js index 5e90240fdb..e46a1caf4a 100644 --- a/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-no-fiscal-year-each-class-status.cy.js +++ b/cypress/e2e/finance/ledgers/ledger-export-settings-pairwise-variants/export-settings-no-fiscal-year-each-class-status.cy.js @@ -3,6 +3,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 { Budgets, Funds, Ledgers } from '../../../../support/fragments/finance'; @@ -111,7 +112,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], @@ -152,7 +153,7 @@ describe('Finance: Ledgers', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/finance/transactions/approve-invoice-close-to-expended-balance.cy.js b/cypress/e2e/finance/transactions/approve-invoice-close-to-expended-balance.cy.js index 2d91813fbf..2708dce425 100644 --- a/cypress/e2e/finance/transactions/approve-invoice-close-to-expended-balance.cy.js +++ b/cypress/e2e/finance/transactions/approve-invoice-close-to-expended-balance.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -113,7 +114,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures-separate-credit-invoice-exists-in-paid-status.cy.js b/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures-separate-credit-invoice-exists-in-paid-status.cy.js index 88c689f999..bf6beaca89 100644 --- a/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures-separate-credit-invoice-exists-in-paid-status.cy.js +++ b/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures-separate-credit-invoice-exists-in-paid-status.cy.js @@ -1,27 +1,28 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../../support/fragments/invoices/invoices'; +import NewInvoice from '../../../support/fragments/invoices/newInvoice'; +import settingsInvoices from '../../../support/fragments/invoices/settingsInvoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import InteractorsTools from '../../../support/utils/interactorsTools'; -import NewInvoice from '../../../support/fragments/invoices/newInvoice'; -import settingsInvoices from '../../../support/fragments/invoices/settingsInvoices'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance: Transactions', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -134,7 +135,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -156,7 +157,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures.cy.js b/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures.cy.js index ef9842b0f0..3c0582c128 100644 --- a/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures.cy.js +++ b/cypress/e2e/finance/transactions/invoice-can-not-be-paid-when-invoice-amount-exceeding-remaining-allowed-expenditures.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -133,7 +134,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -157,7 +158,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js b/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js index fbba250b76..591e020093 100644 --- a/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js +++ b/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js @@ -5,6 +5,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import { Budgets, FundDetails, Funds } from '../../../support/fragments/finance'; @@ -70,7 +71,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: testData.organization.id, volumes: [], @@ -94,7 +95,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: testData.organization.id, volumes: [], @@ -118,7 +119,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-including-credit-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js b/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-including-credit-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js index ca22d895fb..1344e5ded4 100644 --- a/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-including-credit-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js +++ b/cypress/e2e/finance/transactions/invoice-with-three-invoice-lines-including-credit-can-not-be-paid-when-available-expenditure-balance-is-less-that-invoice-total.cy.js @@ -5,6 +5,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import { Budgets, FundDetails, Funds } from '../../../support/fragments/finance'; @@ -78,7 +79,7 @@ describe('Finance', () => { locations: [{ locationId: testData.location.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: testData.acquisitionMethod.id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialType.id, materialSupplier: organization.id, volumes: [], diff --git a/cypress/e2e/finance/transactions/order-can-not-be-opened-when-encumbered-amount-exceeding-remaining-allowed-encumbrances.cy.js b/cypress/e2e/finance/transactions/order-can-not-be-opened-when-encumbered-amount-exceeding-remaining-allowed-encumbrances.cy.js index edb3439b5c..d6687eafa6 100644 --- a/cypress/e2e/finance/transactions/order-can-not-be-opened-when-encumbered-amount-exceeding-remaining-allowed-encumbrances.cy.js +++ b/cypress/e2e/finance/transactions/order-can-not-be-opened-when-encumbered-amount-exceeding-remaining-allowed-encumbrances.cy.js @@ -1,26 +1,27 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import { TransactionDetails } from '../../../support/fragments/finance'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import InteractorsTools from '../../../support/utils/interactorsTools'; -import { TransactionDetails } from '../../../support/fragments/finance'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance', () => { describe('Transactions', () => { @@ -136,7 +137,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -160,7 +161,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/order-with-three-po-lines-can-not-be-opened-when-encumbered-available-balance-is-less-that-order-total.cy.js b/cypress/e2e/finance/transactions/order-with-three-po-lines-can-not-be-opened-when-encumbered-available-balance-is-less-that-order-total.cy.js index a255f37db9..085bbf17b7 100644 --- a/cypress/e2e/finance/transactions/order-with-three-po-lines-can-not-be-opened-when-encumbered-available-balance-is-less-that-order-total.cy.js +++ b/cypress/e2e/finance/transactions/order-with-three-po-lines-can-not-be-opened-when-encumbered-available-balance-is-less-that-order-total.cy.js @@ -1,18 +1,21 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; -import Users from '../../../support/fragments/users/users'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; import OrderLinesLimit from '../../../support/fragments/settings/orders/orderLinesLimit'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import Users from '../../../support/fragments/users/users'; describe('Finance', () => { describe('Transactions', () => { @@ -87,7 +90,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -109,7 +112,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -131,7 +134,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js b/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js index c74d43db73..f0fb2d151f 100644 --- a/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js +++ b/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js @@ -1,26 +1,27 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; import InteractorsTools from '../../../support/utils/interactorsTools'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance: Transactions', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -132,7 +133,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -154,7 +155,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-paid-credit-invoice-exists.cy.js b/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-paid-credit-invoice-exists.cy.js index d852c5884d..2848977867 100644 --- a/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-paid-credit-invoice-exists.cy.js +++ b/cypress/e2e/finance/transactions/restricted-encumbrances-are-calculated-correctly-when-paid-credit-invoice-exists.cy.js @@ -1,28 +1,29 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; +import FiscalYearDetails from '../../../support/fragments/finance/fiscalYears/fiscalYearDetails'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; +import LedgerDetails from '../../../support/fragments/finance/ledgers/ledgerDetails'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; import InteractorsTools from '../../../support/utils/interactorsTools'; -import FiscalYearDetails from '../../../support/fragments/finance/fiscalYears/fiscalYearDetails'; -import LedgerDetails from '../../../support/fragments/finance/ledgers/ledgerDetails'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance: Transactions', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -134,7 +135,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -156,7 +157,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-then-paid-credit-invoice-exists.cy.js b/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-then-paid-credit-invoice-exists.cy.js index 06d4bb1e84..e5c357fbb6 100644 --- a/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-then-paid-credit-invoice-exists.cy.js +++ b/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-then-paid-credit-invoice-exists.cy.js @@ -1,29 +1,30 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; +import { Permissions } from '../../../support/dictionary'; import permissions from '../../../support/dictionary/permissions'; +import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; +import InvoiceLineDetails from '../../../support/fragments/invoices/invoiceLineDetails'; import Invoices from '../../../support/fragments/invoices/invoices'; +import SettingsInvoices from '../../../support/fragments/invoices/settingsInvoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; -import InvoiceLineDetails from '../../../support/fragments/invoices/invoiceLineDetails'; import InteractorsTools from '../../../support/utils/interactorsTools'; -import SettingsInvoices from '../../../support/fragments/invoices/settingsInvoices'; -import { Permissions } from '../../../support/dictionary'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance: Transactions', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -135,7 +136,7 @@ describe('Finance: Transactions', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js b/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js index 4cbf4f0f37..ade05c10e3 100644 --- a/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js +++ b/cypress/e2e/finance/transactions/restricted-expenditures-are-calculated-correctly-when-approved-credit-invoice-exists.cy.js @@ -1,28 +1,29 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; +import InvoiceLineDetails from '../../../support/fragments/invoices/invoiceLineDetails'; import Invoices from '../../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; +import Approvals from '../../../support/fragments/settings/invoices/approvals'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; -import InvoiceLineDetails from '../../../support/fragments/invoices/invoiceLineDetails'; import InteractorsTools from '../../../support/utils/interactorsTools'; -import Approvals from '../../../support/fragments/settings/invoices/approvals'; +import getRandomPostfix from '../../../support/utils/stringTools'; describe('Finance', () => { describe('Transactions', () => { @@ -154,7 +155,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/unavailable-is-calculated-correctly-for-fiscal-year-ledger-and-group-when-credited-invoices-exist.cy.js b/cypress/e2e/finance/transactions/unavailable-is-calculated-correctly-for-fiscal-year-ledger-and-group-when-credited-invoices-exist.cy.js index caf67f50c5..bdfb34e341 100644 --- a/cypress/e2e/finance/transactions/unavailable-is-calculated-correctly-for-fiscal-year-ledger-and-group-when-credited-invoices-exist.cy.js +++ b/cypress/e2e/finance/transactions/unavailable-is-calculated-correctly-for-fiscal-year-ledger-and-group-when-credited-invoices-exist.cy.js @@ -1,9 +1,23 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import { GroupDetails } from '../../../support/fragments/finance'; +import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; +import FinanceHelp from '../../../support/fragments/finance/financeHelper'; +import FiscalYearDetails from '../../../support/fragments/finance/fiscalYears/fiscalYearDetails'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; +import Groups from '../../../support/fragments/finance/groups/groups'; +import LedgerDetails from '../../../support/fragments/finance/ledgers/ledgerDetails'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import OrderLines from '../../../support/fragments/orders/orderLines'; import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; @@ -11,19 +25,6 @@ import Organizations from '../../../support/fragments/organizations/organization import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import FinanceHelp from '../../../support/fragments/finance/financeHelper'; -import BudgetDetails from '../../../support/fragments/finance/budgets/budgetDetails'; -import Groups from '../../../support/fragments/finance/groups/groups'; -import FiscalYearDetails from '../../../support/fragments/finance/fiscalYears/fiscalYearDetails'; -import LedgerDetails from '../../../support/fragments/finance/ledgers/ledgerDetails'; -import { GroupDetails } from '../../../support/fragments/finance'; describe('Finance', () => { describe('Transactions', () => { @@ -151,7 +152,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], @@ -175,7 +176,7 @@ describe('Finance', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/transactions/unrelease-encumbrance.cy.js b/cypress/e2e/finance/transactions/unrelease-encumbrance.cy.js index c73b765824..b71d9aeaba 100644 --- a/cypress/e2e/finance/transactions/unrelease-encumbrance.cy.js +++ b/cypress/e2e/finance/transactions/unrelease-encumbrance.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, TRANSACTION_TOOLTIPS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; @@ -86,7 +87,7 @@ describe('Finance', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-approved-status.cy.js b/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-approved-status.cy.js index f5da5cdaed..8b3c6063a2 100644 --- a/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-approved-status.cy.js +++ b/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-approved-status.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import Budgets from '../../support/fragments/finance/budgets/budgets'; @@ -16,10 +17,10 @@ import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; describe('Finance', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -95,7 +96,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-fully-paid-status.cy.js b/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-fully-paid-status.cy.js index 446f13ff4f..56b2681a74 100644 --- a/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-fully-paid-status.cy.js +++ b/cypress/e2e/finance/unrelease-encumbrance-related-to-open-one-time-order-with-invoice-in-fully-paid-status.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import Budgets from '../../support/fragments/finance/budgets/budgets'; @@ -96,7 +97,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/finance/user-is-not-able-to-unrelease-encumbrance-without-finance-unrelease-encumbrance-permission.cy.js b/cypress/e2e/finance/user-is-not-able-to-unrelease-encumbrance-without-finance-unrelease-encumbrance-permission.cy.js index 88a994ec23..d21e166752 100644 --- a/cypress/e2e/finance/user-is-not-able-to-unrelease-encumbrance-without-finance-unrelease-encumbrance-permission.cy.js +++ b/cypress/e2e/finance/user-is-not-able-to-unrelease-encumbrance-without-finance-unrelease-encumbrance-permission.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import Budgets from '../../support/fragments/finance/budgets/budgets'; @@ -95,7 +96,7 @@ describe('Finance', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/invoices/adding-pol-to-invoice-line-with-different-vendors-via-search.cy.js b/cypress/e2e/invoices/adding-pol-to-invoice-line-with-different-vendors-via-search.cy.js index f5572d5edc..7e4be408ad 100644 --- a/cypress/e2e/invoices/adding-pol-to-invoice-line-with-different-vendors-via-search.cy.js +++ b/cypress/e2e/invoices/adding-pol-to-invoice-line-with-different-vendors-via-search.cy.js @@ -1,10 +1,11 @@ +import { POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import BrowseContributors from '../../support/fragments/inventory/search/browseContributors'; -import { NewInvoice, Invoices, InvoiceView } from '../../support/fragments/invoices'; -import { NewOrganization, Organizations } from '../../support/fragments/organizations'; +import { Invoices, InvoiceView, NewInvoice } from '../../support/fragments/invoices'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; -import { BatchGroups } from '../../support/fragments/settings/invoices'; import OrdersHelper from '../../support/fragments/orders/ordersHelper'; +import { NewOrganization, Organizations } from '../../support/fragments/organizations'; +import { BatchGroups } from '../../support/fragments/settings/invoices'; import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; @@ -30,7 +31,7 @@ describe('Invoices', () => { selector: `Autotest_selector_${getRandomPostfix()}`, fundDistribution: [], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: '', materialSupplier: '', volumes: [`test_vol_${getRandomPostfix()}`], diff --git a/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-dollar.cy.js b/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-dollar.cy.js index aa2697239b..f349dba1b3 100644 --- a/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-dollar.cy.js +++ b/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-dollar.cy.js @@ -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 Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; @@ -98,7 +102,7 @@ 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: [], diff --git a/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-percent.cy.js b/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-percent.cy.js index db8f81503f..cff4f8fed5 100644 --- a/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-percent.cy.js +++ b/cypress/e2e/invoices/adjustment-amount-to-invoice-line-in-percent.cy.js @@ -1,23 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; -import Users from '../../support/fragments/users/users'; -import getRandomPostfix from '../../support/utils/stringTools'; -import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; 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 BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import Users from '../../support/fragments/users/users'; +import getRandomPostfix from '../../support/utils/stringTools'; describe('Invoices', () => { const order = { ...NewOrder.defaultOngoingTimeOrder, approved: true, reEncumber: true }; @@ -98,7 +102,7 @@ describe('Invoices', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, materialType: mtypes.body.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/invoices/approve-and-pay-invoice-created-in-current-FY-for-previous-FYwhen-POL-created-in-previous-FY.cy.js b/cypress/e2e/invoices/approve-and-pay-invoice-created-in-current-FY-for-previous-FYwhen-POL-created-in-previous-FY.cy.js index 27e1289bbc..ee65478a21 100644 --- a/cypress/e2e/invoices/approve-and-pay-invoice-created-in-current-FY-for-previous-FYwhen-POL-created-in-previous-FY.cy.js +++ b/cypress/e2e/invoices/approve-and-pay-invoice-created-in-current-FY-for-previous-FYwhen-POL-created-in-previous-FY.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -120,7 +121,7 @@ describe('Invoices', { retries: { runMode: 1 } }, () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/invoices/approve-and-pay-invoice-with-more-than-50-invoice-lines.cy.js b/cypress/e2e/invoices/approve-and-pay-invoice-with-more-than-50-invoice-lines.cy.js index 8a16c51cbb..b2b8268acb 100644 --- a/cypress/e2e/invoices/approve-and-pay-invoice-with-more-than-50-invoice-lines.cy.js +++ b/cypress/e2e/invoices/approve-and-pay-invoice-with-more-than-50-invoice-lines.cy.js @@ -1,28 +1,32 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; import NewInvoice from '../../support/fragments/invoices/newInvoice'; +import { BasicOrderLine } from '../../support/fragments/orders'; import NewOrder from '../../support/fragments/orders/newOrder'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; +import { Approvals } from '../../support/fragments/settings/invoices'; +import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; +import SettingsOrders from '../../support/fragments/settings/orders/settingsOrders'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; +import SettingsMenu from '../../support/fragments/settingsMenu'; import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { Approvals } from '../../support/fragments/settings/invoices'; -import SettingsOrders from '../../support/fragments/settings/orders/settingsOrders'; -import SettingsMenu from '../../support/fragments/settingsMenu'; -import { ORDER_STATUSES, ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../support/constants'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import { BasicOrderLine } from '../../support/fragments/orders'; -import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -120,7 +124,7 @@ describe('Invoices', () => { }, locations: [{ locationId: location.id, quantity: 1, quantityPhysical: 1 }], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialType.id, materialSupplier: organization.id, volumes: [], diff --git a/cypress/e2e/invoices/approve-invoice-in-previous-FY-and-pay-invoice-in-current FY.cy.js b/cypress/e2e/invoices/approve-invoice-in-previous-FY-and-pay-invoice-in-current FY.cy.js index e48688579a..7b54a54f8f 100644 --- a/cypress/e2e/invoices/approve-invoice-in-previous-FY-and-pay-invoice-in-current FY.cy.js +++ b/cypress/e2e/invoices/approve-invoice-in-previous-FY-and-pay-invoice-in-current FY.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -114,7 +115,7 @@ describe('Invoices', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/invoices/approve-invoice-with-payment-credit.cy.js b/cypress/e2e/invoices/approve-invoice-with-payment-credit.cy.js index 6aa4ba75b9..287616951b 100644 --- a/cypress/e2e/invoices/approve-invoice-with-payment-credit.cy.js +++ b/cypress/e2e/invoices/approve-invoice-with-payment-credit.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { Budgets, Funds, Transactions } from '../../support/fragments/finance'; @@ -61,7 +62,7 @@ describe('Invoices', () => { locations: [{ locationId: locationResp.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: [], diff --git a/cypress/e2e/invoices/approve-invoice.cy.js b/cypress/e2e/invoices/approve-invoice.cy.js index f0e271e929..4ede7f4962 100644 --- a/cypress/e2e/invoices/approve-invoice.cy.js +++ b/cypress/e2e/invoices/approve-invoice.cy.js @@ -1,24 +1,28 @@ 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 Budgets from '../../support/fragments/finance/budgets/budgets'; import Helper from '../../support/fragments/finance/financeHelper'; +import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; +import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; +import Approvals from '../../support/fragments/settings/invoices/approvals'; +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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; -import Approvals from '../../support/fragments/settings/invoices/approvals'; -import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import NewOrganization from '../../support/fragments/organizations/newOrganization'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import OrderLines from '../../support/fragments/orders/orderLines'; -import Orders from '../../support/fragments/orders/orders'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -89,7 +93,7 @@ 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: [], diff --git a/cypress/e2e/invoices/cancel-invoice-with-more-than-90-invoice-lines.cy.js b/cypress/e2e/invoices/cancel-invoice-with-more-than-90-invoice-lines.cy.js index a372e85ea5..49ffb14f51 100644 --- a/cypress/e2e/invoices/cancel-invoice-with-more-than-90-invoice-lines.cy.js +++ b/cypress/e2e/invoices/cancel-invoice-with-more-than-90-invoice-lines.cy.js @@ -1,30 +1,31 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + TRANSACTION_TOOLTIPS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails, Transactions } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails, Transactions } from '../../support/fragments/finance'; -import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; import Invoices from '../../support/fragments/invoices/invoices'; import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - TRANSACTION_TOOLTIPS, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import InteractorsTools from '../../support/utils/interactorsTools'; describe('Invoices', () => { @@ -68,7 +69,7 @@ describe('Invoices', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/invoices/cancelling-approved-invoices.cy.js b/cypress/e2e/invoices/cancelling-approved-invoices.cy.js index 766c75cb82..5d62f40921 100644 --- a/cypress/e2e/invoices/cancelling-approved-invoices.cy.js +++ b/cypress/e2e/invoices/cancelling-approved-invoices.cy.js @@ -1,5 +1,12 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import Helper from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; @@ -10,18 +17,12 @@ import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; -import TopMenu from '../../support/fragments/topMenu'; -import Users from '../../support/fragments/users/users'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../support/constants'; -import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import Users from '../../support/fragments/users/users'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -94,7 +95,7 @@ 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: [], diff --git a/cypress/e2e/invoices/encumbrance-released-pending-payment-created.cy.js b/cypress/e2e/invoices/encumbrance-released-pending-payment-created.cy.js index 700f235b60..e2bd382ad9 100644 --- a/cypress/e2e/invoices/encumbrance-released-pending-payment-created.cy.js +++ b/cypress/e2e/invoices/encumbrance-released-pending-payment-created.cy.js @@ -1,25 +1,26 @@ -import permissions from '../../support/dictionary/permissions'; import { ACQUISITION_METHOD_NAMES_IN_PROFILE, APPLICATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; +import permissions from '../../support/dictionary/permissions'; import { Budgets, TransactionDetails } from '../../support/fragments/finance'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import NewInvoice from '../../support/fragments/invoices/newInvoice'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; import Invoices from '../../support/fragments/invoices/invoices'; import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import NewInvoice from '../../support/fragments/invoices/newInvoice'; import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import Approvals from '../../support/fragments/settings/invoices/approvals'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import Approvals from '../../support/fragments/settings/invoices/approvals'; import TopMenu from '../../support/fragments/topMenu'; import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; @@ -133,7 +134,7 @@ describe('Invoices', () => { ], acquisitionMethod: acquisitionMethod.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialType.id, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/invoices/filter-invoices.cy.js b/cypress/e2e/invoices/filter-invoices.cy.js index 98a82ccfa0..5df855c678 100644 --- a/cypress/e2e/invoices/filter-invoices.cy.js +++ b/cypress/e2e/invoices/filter-invoices.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import Budgets from '../../support/fragments/finance/budgets/budgets'; @@ -58,7 +59,7 @@ describe('Invoices', () => { locations: [{ locationId: locationResp.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: mtypeResp.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/invoices/pay-invoice-with-multiple-expense-classes.cy.js b/cypress/e2e/invoices/pay-invoice-with-multiple-expense-classes.cy.js index f360444762..06e54ccae0 100644 --- a/cypress/e2e/invoices/pay-invoice-with-multiple-expense-classes.cy.js +++ b/cypress/e2e/invoices/pay-invoice-with-multiple-expense-classes.cy.js @@ -4,13 +4,14 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { BudgetDetails, Budgets, Funds } from '../../support/fragments/finance'; import { Invoices, InvoiceView, NewInvoice } from '../../support/fragments/invoices'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; import InvoiceLineEditForm from '../../support/fragments/invoices/invoiceLineEditForm'; import InvoiceNewForm from '../../support/fragments/invoices/invoiceNewForm'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; import { BasicOrderLine, NewOrder, OrderLines, Orders } from '../../support/fragments/orders'; import { NewOrganization, Organizations } from '../../support/fragments/organizations'; import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; @@ -92,7 +93,7 @@ describe('Invoices', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/invoices/pay-invoice.cy.js b/cypress/e2e/invoices/pay-invoice.cy.js index 3ae6685ea1..94c1736542 100644 --- a/cypress/e2e/invoices/pay-invoice.cy.js +++ b/cypress/e2e/invoices/pay-invoice.cy.js @@ -4,6 +4,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, VENDOR_NAMES, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; @@ -66,7 +67,7 @@ describe('Invoices', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp.id, volumes: [], diff --git a/cypress/e2e/invoices/pol-payment-status-is-changed-to-artially-paid-after-cancelling-one-of-related paid-invoice.cy.js b/cypress/e2e/invoices/pol-payment-status-is-changed-to-artially-paid-after-cancelling-one-of-related paid-invoice.cy.js index b0bde86d10..34cb4bd97b 100644 --- a/cypress/e2e/invoices/pol-payment-status-is-changed-to-artially-paid-after-cancelling-one-of-related paid-invoice.cy.js +++ b/cypress/e2e/invoices/pol-payment-status-is-changed-to-artially-paid-after-cancelling-one-of-related paid-invoice.cy.js @@ -1,28 +1,29 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POLINE_DETAILS_FIELDS, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import { InvoiceView, Invoices } from '../../support/fragments/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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 Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -94,7 +95,7 @@ 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: [], diff --git a/cypress/e2e/invoices/pol-payment-status-is-changed-to-awaiting-payment-after-cancelling-related-paid-invoice.cy.js b/cypress/e2e/invoices/pol-payment-status-is-changed-to-awaiting-payment-after-cancelling-related-paid-invoice.cy.js index 2a9157255d..dfdd8f0737 100644 --- a/cypress/e2e/invoices/pol-payment-status-is-changed-to-awaiting-payment-after-cancelling-related-paid-invoice.cy.js +++ b/cypress/e2e/invoices/pol-payment-status-is-changed-to-awaiting-payment-after-cancelling-related-paid-invoice.cy.js @@ -1,28 +1,29 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POLINE_DETAILS_FIELDS, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import { InvoiceView, Invoices } from '../../support/fragments/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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 Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -93,7 +94,7 @@ 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: [], diff --git a/cypress/e2e/invoices/pol-payment-status-remains-fully-paid-after-cancelling-one-of-related-paid-invoice.cy.js b/cypress/e2e/invoices/pol-payment-status-remains-fully-paid-after-cancelling-one-of-related-paid-invoice.cy.js index 282700f0c2..5616227547 100644 --- a/cypress/e2e/invoices/pol-payment-status-remains-fully-paid-after-cancelling-one-of-related-paid-invoice.cy.js +++ b/cypress/e2e/invoices/pol-payment-status-remains-fully-paid-after-cancelling-one-of-related-paid-invoice.cy.js @@ -4,9 +4,10 @@ import { APPLICATION_NAMES, INVOICE_STATUSES, LOCATION_NAMES, + ORDER_LINE_PAYMENT_STATUS, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { Budgets, FiscalYears, Funds, Ledgers } from '../../support/fragments/finance'; @@ -88,7 +89,7 @@ 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: [], diff --git a/cypress/e2e/invoices/pol-payment-status-remains-ongoing-after-cancelling-related-paid-invoice.cy.js b/cypress/e2e/invoices/pol-payment-status-remains-ongoing-after-cancelling-related-paid-invoice.cy.js index 86c640ad9f..0bf9601bb4 100644 --- a/cypress/e2e/invoices/pol-payment-status-remains-ongoing-after-cancelling-related-paid-invoice.cy.js +++ b/cypress/e2e/invoices/pol-payment-status-remains-ongoing-after-cancelling-related-paid-invoice.cy.js @@ -1,28 +1,29 @@ -import NewOrder from '../../support/fragments/orders/newOrder'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POLINE_DETAILS_FIELDS, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import { InvoiceView, Invoices } from '../../support/fragments/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import NewOrder from '../../support/fragments/orders/newOrder'; +import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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 Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -93,7 +94,7 @@ 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: [], diff --git a/cypress/e2e/invoices/pol-payment-status-remains-payment-not-required-after-cancelling-related-paid-invoice.cy.js b/cypress/e2e/invoices/pol-payment-status-remains-payment-not-required-after-cancelling-related-paid-invoice.cy.js index 4dcde5d95a..7c9e596097 100644 --- a/cypress/e2e/invoices/pol-payment-status-remains-payment-not-required-after-cancelling-related-paid-invoice.cy.js +++ b/cypress/e2e/invoices/pol-payment-status-remains-payment-not-required-after-cancelling-related-paid-invoice.cy.js @@ -1,28 +1,29 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POLINE_DETAILS_FIELDS, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import { InvoiceView, Invoices } from '../../support/fragments/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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 Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; describe('Invoices', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -93,7 +94,7 @@ 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: [], diff --git a/cypress/e2e/invoices/save-invoice-FY-after-fund-change.cy.js b/cypress/e2e/invoices/save-invoice-FY-after-fund-change.cy.js index 587af7c4d3..a497493826 100644 --- a/cypress/e2e/invoices/save-invoice-FY-after-fund-change.cy.js +++ b/cypress/e2e/invoices/save-invoice-FY-after-fund-change.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -125,7 +126,7 @@ describe('Invoices', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/add-cancel-po-and-display-indication.cy.js b/cypress/e2e/orders/add-cancel-po-and-display-indication.cy.js index 6e3b7cea09..ca34397654 100644 --- a/cypress/e2e/orders/add-cancel-po-and-display-indication.cy.js +++ b/cypress/e2e/orders/add-cancel-po-and-display-indication.cy.js @@ -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 Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; @@ -74,7 +78,7 @@ describe('Fiscal Year Rollover', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/adding-fund-to-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js b/cypress/e2e/orders/adding-fund-to-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js index 49c587301a..bffad7fb59 100644 --- a/cypress/e2e/orders/adding-fund-to-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js +++ b/cypress/e2e/orders/adding-fund-to-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js @@ -1,31 +1,32 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - APPLICATION_NAMES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { TransactionDetails } from '../../support/fragments/finance'; describe('Orders', () => { const testData = { @@ -103,7 +104,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/an-order-with-invalid-location-for-restricted-fund-can-not-be-opened.cy.js b/cypress/e2e/orders/an-order-with-invalid-location-for-restricted-fund-can-not-be-opened.cy.js index a35084d621..c30b5f763a 100644 --- a/cypress/e2e/orders/an-order-with-invalid-location-for-restricted-fund-can-not-be-opened.cy.js +++ b/cypress/e2e/orders/an-order-with-invalid-location-for-restricted-fund-can-not-be-opened.cy.js @@ -1,23 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import { OrderLineEditForm } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import InteractorsTools from '../../support/utils/interactorsTools'; -import { OrderLineEditForm } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -60,7 +64,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/blocked-when-PO-line-has-related-approved-invoice.cy.js b/cypress/e2e/orders/blocked-when-PO-line-has-related-approved-invoice.cy.js index cfb1efef1f..772d845570 100644 --- a/cypress/e2e/orders/blocked-when-PO-line-has-related-approved-invoice.cy.js +++ b/cypress/e2e/orders/blocked-when-PO-line-has-related-approved-invoice.cy.js @@ -1,8 +1,16 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +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'; @@ -11,13 +19,6 @@ import Organizations from '../../support/fragments/organizations/organizations'; import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -103,7 +104,7 @@ describe('Orders', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/can-not-be-delete-pol-and-order.cy.js b/cypress/e2e/orders/can-not-be-delete-pol-and-order.cy.js index 878adccef4..c28f5150b7 100644 --- a/cypress/e2e/orders/can-not-be-delete-pol-and-order.cy.js +++ b/cypress/e2e/orders/can-not-be-delete-pol-and-order.cy.js @@ -1,8 +1,15 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +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'; @@ -11,9 +18,6 @@ import Organizations from '../../support/fragments/organizations/organizations'; import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const order = { @@ -92,7 +96,7 @@ describe('Orders', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/change-fund-in-pol-with-paid-invoices-in-previous-and-current-fiscal-years.cy.js b/cypress/e2e/orders/change-fund-in-pol-with-paid-invoices-in-previous-and-current-fiscal-years.cy.js index f1f175c164..813a19f038 100644 --- a/cypress/e2e/orders/change-fund-in-pol-with-paid-invoices-in-previous-and-current-fiscal-years.cy.js +++ b/cypress/e2e/orders/change-fund-in-pol-with-paid-invoices-in-previous-and-current-fiscal-years.cy.js @@ -1,26 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; import NewInvoice from '../../support/fragments/invoices/newInvoice'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; describe('Orders', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -129,7 +130,7 @@ describe('Orders', () => { 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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/change-location-during-receiving.cy.js b/cypress/e2e/orders/change-location-during-receiving.cy.js index d5355c3826..2ff2d5fa60 100644 --- a/cypress/e2e/orders/change-location-during-receiving.cy.js +++ b/cypress/e2e/orders/change-location-during-receiving.cy.js @@ -1,24 +1,25 @@ import uuid from 'uuid'; -import permissions from '../../support/dictionary/permissions'; -import NewOrder from '../../support/fragments/orders/newOrder'; -import OrderLines from '../../support/fragments/orders/orderLines'; -import Orders from '../../support/fragments/orders/orders'; -import NewOrganization from '../../support/fragments/organizations/newOrganization'; -import Organizations from '../../support/fragments/organizations/organizations'; -import Receiving from '../../support/fragments/receiving/receiving'; -import TopMenu from '../../support/fragments/topMenu'; -import Users from '../../support/fragments/users/users'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import { ACQUISITION_METHOD_NAMES_IN_PROFILE, DELETE_HOLDINGS_ACTIONS, ITEM_STATUS_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; +import permissions from '../../support/dictionary/permissions'; +import InstanceRecordView from '../../support/fragments/inventory/instanceRecordView'; import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; -import InstanceRecordView from '../../support/fragments/inventory/instanceRecordView'; import ItemRecordView from '../../support/fragments/inventory/item/itemRecordView'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; +import Organizations from '../../support/fragments/organizations/organizations'; +import Receiving from '../../support/fragments/receiving/receiving'; +import TopMenu from '../../support/fragments/topMenu'; +import Users from '../../support/fragments/users/users'; describe( 'Orders', @@ -69,7 +70,7 @@ describe( locations: [{ locationId: firstLocation.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: mtype.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/changing-order-format-from-pe-mix-to-electronic.cy.js b/cypress/e2e/orders/changing-order-format-from-pe-mix-to-electronic.cy.js index 41db917a74..af1aab342b 100644 --- a/cypress/e2e/orders/changing-order-format-from-pe-mix-to-electronic.cy.js +++ b/cypress/e2e/orders/changing-order-format-from-pe-mix-to-electronic.cy.js @@ -3,6 +3,7 @@ import { LOCATION_NAMES, ORDER_FORMAT_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, POLINE_DETAILS_FIELDS, RECORD_STATUSES, } from '../../support/constants'; @@ -45,11 +46,11 @@ describe('Orders', () => { }, orderFormat: 'P/E Mix', eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, accessProvider: organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, }, locations: [ diff --git a/cypress/e2e/orders/changing-order-format-from-pe-mix-to-other.cy.js b/cypress/e2e/orders/changing-order-format-from-pe-mix-to-other.cy.js index 2e40a197ed..f9e6d1b18d 100644 --- a/cypress/e2e/orders/changing-order-format-from-pe-mix-to-other.cy.js +++ b/cypress/e2e/orders/changing-order-format-from-pe-mix-to-other.cy.js @@ -3,6 +3,7 @@ import { LOCATION_NAMES, ORDER_FORMAT_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, POLINE_DETAILS_FIELDS, RECORD_STATUSES, } from '../../support/constants'; @@ -46,11 +47,11 @@ describe('Orders', () => { }, orderFormat: 'P/E Mix', eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, accessProvider: organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, }, locations: [ diff --git a/cypress/e2e/orders/changing-order-format-from-pe-mix-to-physical.cy.js b/cypress/e2e/orders/changing-order-format-from-pe-mix-to-physical.cy.js index 6e98a3da4b..98926cb39b 100644 --- a/cypress/e2e/orders/changing-order-format-from-pe-mix-to-physical.cy.js +++ b/cypress/e2e/orders/changing-order-format-from-pe-mix-to-physical.cy.js @@ -4,6 +4,7 @@ import { ORDER_FORMAT_NAMES, ORDER_STATUSES, POLINE_DETAILS_FIELDS, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -38,11 +39,11 @@ describe('Orders', () => { }, orderFormat: 'P/E Mix', eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, accessProvider: testData.organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/close-order-as-complete-when-all-pols-fully-paid-and-received.cy.js b/cypress/e2e/orders/close-order-as-complete-when-all-pols-fully-paid-and-received.cy.js index 006c6752e6..a06c7a84b4 100644 --- a/cypress/e2e/orders/close-order-as-complete-when-all-pols-fully-paid-and-received.cy.js +++ b/cypress/e2e/orders/close-order-as-complete-when-all-pols-fully-paid-and-received.cy.js @@ -1,25 +1,26 @@ import { v4 as uuid } from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLineEditForm from '../../support/fragments/orders/orderLineEditForm'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; import TopMenu from '../../support/fragments/topMenu'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import OrderLines from '../../support/fragments/orders/orderLines'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -60,7 +61,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/create-new-routing-list-from-poline.cy.js b/cypress/e2e/orders/create-new-routing-list-from-poline.cy.js index cb3996cf95..51981195f0 100644 --- a/cypress/e2e/orders/create-new-routing-list-from-poline.cy.js +++ b/cypress/e2e/orders/create-new-routing-list-from-poline.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -54,7 +55,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/create-new-routing-list-from-receiving-title.cy.js b/cypress/e2e/orders/create-new-routing-list-from-receiving-title.cy.js index 4c8a4f224e..70e2052502 100644 --- a/cypress/e2e/orders/create-new-routing-list-from-receiving-title.cy.js +++ b/cypress/e2e/orders/create-new-routing-list-from-receiving-title.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { BasicOrderLine, NewOrder, OrderLines, Orders } from '../../support/fragments/orders'; @@ -47,7 +48,7 @@ describe('Receiving', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/create-second-routing-list-for-po-line-with-quantity-more-then-1.cy.js b/cypress/e2e/orders/create-second-routing-list-for-po-line-with-quantity-more-then-1.cy.js index 42a328c794..20a2f2532b 100644 --- a/cypress/e2e/orders/create-second-routing-list-for-po-line-with-quantity-more-then-1.cy.js +++ b/cypress/e2e/orders/create-second-routing-list-for-po-line-with-quantity-more-then-1.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -55,7 +56,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.id, quantity: 2, quantityPhysical: 2 }], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypes.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/delete-fund-in-POL.cy.js b/cypress/e2e/orders/delete-fund-in-POL.cy.js index 6a2452924c..0e49aae35f 100644 --- a/cypress/e2e/orders/delete-fund-in-POL.cy.js +++ b/cypress/e2e/orders/delete-fund-in-POL.cy.js @@ -1,23 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import Helper from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; describe('Orders', () => { const order = { @@ -101,7 +105,7 @@ 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: [], diff --git a/cypress/e2e/orders/delete-routing-list-from-orders.cy.js b/cypress/e2e/orders/delete-routing-list-from-orders.cy.js index 8dac500f3e..10dbd46c52 100644 --- a/cypress/e2e/orders/delete-routing-list-from-orders.cy.js +++ b/cypress/e2e/orders/delete-routing-list-from-orders.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -53,7 +54,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/edifact-exports/delete-order-by-user.cy.js b/cypress/e2e/orders/edifact-exports/delete-order-by-user.cy.js index 23634f42b0..c92b892b3d 100644 --- a/cypress/e2e/orders/edifact-exports/delete-order-by-user.cy.js +++ b/cypress/e2e/orders/edifact-exports/delete-order-by-user.cy.js @@ -1,4 +1,7 @@ -import { ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../../support/constants'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + 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'; @@ -79,7 +82,7 @@ describe('Export Manager', () => { 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: organizationsResponse, volumes: [], diff --git a/cypress/e2e/orders/edifact-exports/exported-order-does-not-display-export-details.cy.js b/cypress/e2e/orders/edifact-exports/exported-order-does-not-display-export-details.cy.js index fad96d143b..ec4d1d11e6 100644 --- a/cypress/e2e/orders/edifact-exports/exported-order-does-not-display-export-details.cy.js +++ b/cypress/e2e/orders/edifact-exports/exported-order-does-not-display-export-details.cy.js @@ -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'; @@ -77,7 +81,7 @@ describe('Orders', () => { 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: organizationsResponse, volumes: [], diff --git a/cypress/e2e/orders/edit-existing-routing-list-in-orders.cy.js b/cypress/e2e/orders/edit-existing-routing-list-in-orders.cy.js index 783e6a42ab..2015285aa0 100644 --- a/cypress/e2e/orders/edit-existing-routing-list-in-orders.cy.js +++ b/cypress/e2e/orders/edit-existing-routing-list-in-orders.cy.js @@ -5,6 +5,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -61,11 +62,11 @@ describe('Orders', () => { }, orderFormat: 'P/E Mix', eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, accessProvider: organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypes.id, }, locations: [ @@ -90,7 +91,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/edit-fund-when-invoice-are-approved-cancelled.cy.js b/cypress/e2e/orders/edit-fund-when-invoice-are-approved-cancelled.cy.js index 68279751e8..9490fca9bc 100644 --- a/cypress/e2e/orders/edit-fund-when-invoice-are-approved-cancelled.cy.js +++ b/cypress/e2e/orders/edit-fund-when-invoice-are-approved-cancelled.cy.js @@ -3,6 +3,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import Budgets from '../../support/fragments/finance/budgets/budgets'; @@ -101,7 +102,7 @@ describe('Orders', () => { ], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/edit-fund-when-invoice-are-open.cy.js b/cypress/e2e/orders/edit-fund-when-invoice-are-open.cy.js index 4d8add5d0b..7083a69176 100644 --- a/cypress/e2e/orders/edit-fund-when-invoice-are-open.cy.js +++ b/cypress/e2e/orders/edit-fund-when-invoice-are-open.cy.js @@ -1,24 +1,28 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; describe('Orders', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -107,7 +111,7 @@ 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: [], diff --git a/cypress/e2e/orders/edit-fund-with-reviewed-invoice.cy.js b/cypress/e2e/orders/edit-fund-with-reviewed-invoice.cy.js index 6f1a9f735c..da7e7e6aa8 100644 --- a/cypress/e2e/orders/edit-fund-with-reviewed-invoice.cy.js +++ b/cypress/e2e/orders/edit-fund-with-reviewed-invoice.cy.js @@ -1,25 +1,29 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; import NewInvoice from '../../support/fragments/invoices/newInvoice'; +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 NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; describe('Orders', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -110,7 +114,7 @@ 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: [], diff --git a/cypress/e2e/orders/editing-fund-and-increasing-cost-in-pol.cy.js b/cypress/e2e/orders/editing-fund-and-increasing-cost-in-pol.cy.js index 9c0077e8ec..c5a7167001 100644 --- a/cypress/e2e/orders/editing-fund-and-increasing-cost-in-pol.cy.js +++ b/cypress/e2e/orders/editing-fund-and-increasing-cost-in-pol.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import { TransactionDetails } from '../../support/fragments/finance'; @@ -112,7 +113,7 @@ 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: [], diff --git a/cypress/e2e/orders/editing-fund-distribution-in-pol-when-related-open-invoice-with-acquisition-unit-exists.cy.js b/cypress/e2e/orders/editing-fund-distribution-in-pol-when-related-open-invoice-with-acquisition-unit-exists.cy.js index c9488a6399..5f94845217 100644 --- a/cypress/e2e/orders/editing-fund-distribution-in-pol-when-related-open-invoice-with-acquisition-unit-exists.cy.js +++ b/cypress/e2e/orders/editing-fund-distribution-in-pol-when-related-open-invoice-with-acquisition-unit-exists.cy.js @@ -1,36 +1,37 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import InvoiceEditForm from '../../support/fragments/invoices/invoiceEditForm'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; -import InvoiceEditForm from '../../support/fragments/invoices/invoiceEditForm'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import AcquisitionUnits from '../../support/fragments/settings/acquisitionUnits/acquisitionUnits'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import AcquisitionUnits from '../../support/fragments/settings/acquisitionUnits/acquisitionUnits'; import TopMenu from '../../support/fragments/topMenu'; import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import { TransactionDetails } from '../../support/fragments/finance'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - APPLICATION_NAMES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const testData = { @@ -111,7 +112,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/editing-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js b/cypress/e2e/orders/editing-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js index e00db55c37..82fc957719 100644 --- a/cypress/e2e/orders/editing-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js +++ b/cypress/e2e/orders/editing-fund-distribution-with-two-funds-in-pol-when-related-open-invoice-exists.cy.js @@ -1,27 +1,28 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -102,7 +103,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed-C375986.cy.js b/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed-C375986.cy.js index 24270c115a..5d1a3c375b 100644 --- a/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed-C375986.cy.js +++ b/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed-C375986.cy.js @@ -3,6 +3,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import { Budgets } from '../../support/fragments/finance'; @@ -52,7 +53,7 @@ describe('Orders', () => { }; testData.orderLine = BasicOrderLine.getDefaultOrderLine({ checkinItems: true, - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, specialLocationId: locationResp.id, specialMaterialTypeId: mtypeResp.id, listUnitPrice: 90, diff --git a/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed.cy.js b/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed.cy.js index 2638d35779..dfc56d1cfe 100644 --- a/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed.cy.js +++ b/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece-when-order-closed.cy.js @@ -5,6 +5,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import { Budgets } from '../../support/fragments/finance'; @@ -77,7 +78,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.id, quantity: 2, quantityPhysical: 2 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece.cy.js b/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece.cy.js index 22da7e06d4..0889450f17 100644 --- a/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece.cy.js +++ b/cypress/e2e/orders/encumbered-amount-is-not-changed-after-deleting-received-piece.cy.js @@ -3,6 +3,7 @@ import { INVOICE_STATUSES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { Budgets, Funds } from '../../support/fragments/finance'; @@ -64,7 +65,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-created-as-released-when-editing-fund-distribution-after-rollover.cy.js b/cypress/e2e/orders/encumbrance-created-as-released-when-editing-fund-distribution-after-rollover.cy.js index e0652855cc..17ffe990f6 100644 --- a/cypress/e2e/orders/encumbrance-created-as-released-when-editing-fund-distribution-after-rollover.cy.js +++ b/cypress/e2e/orders/encumbrance-created-as-released-when-editing-fund-distribution-after-rollover.cy.js @@ -1,31 +1,32 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; import LedgerRollovers from '../../support/fragments/finance/ledgers/ledgerRollovers'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import Invoices from '../../support/fragments/invoices/invoices'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 DateTools from '../../support/utils/dateTools'; import { CodeTools, StringTools } from '../../support/utils'; -import { TransactionDetails } from '../../support/fragments/finance'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; +import DateTools from '../../support/utils/dateTools'; describe('Orders', () => { const code = CodeTools(4); @@ -137,7 +138,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-created-as-released-when-removing-and-adding-fund-distribution-in-pol-with-released-encumbrance.cy.js b/cypress/e2e/orders/encumbrance-created-as-released-when-removing-and-adding-fund-distribution-in-pol-with-released-encumbrance.cy.js index ed75f3096f..28cfd0f677 100644 --- a/cypress/e2e/orders/encumbrance-created-as-released-when-removing-and-adding-fund-distribution-in-pol-with-released-encumbrance.cy.js +++ b/cypress/e2e/orders/encumbrance-created-as-released-when-removing-and-adding-fund-distribution-in-pol-with-released-encumbrance.cy.js @@ -1,26 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails } from '../../support/fragments/finance'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; @@ -98,7 +99,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-created-as-released-when-replacing-fund-distribution-in-pol-with-released-encumbrance-change-fund.cy.js b/cypress/e2e/orders/encumbrance-created-as-released-when-replacing-fund-distribution-in-pol-with-released-encumbrance-change-fund.cy.js index c243a3172e..20f120793b 100644 --- a/cypress/e2e/orders/encumbrance-created-as-released-when-replacing-fund-distribution-in-pol-with-released-encumbrance-change-fund.cy.js +++ b/cypress/e2e/orders/encumbrance-created-as-released-when-replacing-fund-distribution-in-pol-with-released-encumbrance-change-fund.cy.js @@ -1,26 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails } from '../../support/fragments/finance'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; @@ -98,7 +99,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-approved-invoice-was-cancelled.cy.js b/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-approved-invoice-was-cancelled.cy.js index 3312f7063d..5ffda6ff6e 100644 --- a/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-approved-invoice-was-cancelled.cy.js +++ b/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-approved-invoice-was-cancelled.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails } from '../../support/fragments/finance'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -88,7 +89,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-paid-invoice-was-cancelled.cy.js b/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-paid-invoice-was-cancelled.cy.js index 0b52581f61..8b442a7a49 100644 --- a/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-paid-invoice-was-cancelled.cy.js +++ b/cypress/e2e/orders/encumbrance-has-zero-amount-when-related-order-was-unopened-and-paid-invoice-was-cancelled.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails } from '../../support/fragments/finance'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -88,7 +89,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-is-deleted-from-fund-transactions-when-order-is-closed-and-related-invoice-is-cancelled.cy.js b/cypress/e2e/orders/encumbrance-is-deleted-from-fund-transactions-when-order-is-closed-and-related-invoice-is-cancelled.cy.js index b153c18997..ada7d8cc9c 100644 --- a/cypress/e2e/orders/encumbrance-is-deleted-from-fund-transactions-when-order-is-closed-and-related-invoice-is-cancelled.cy.js +++ b/cypress/e2e/orders/encumbrance-is-deleted-from-fund-transactions-when-order-is-closed-and-related-invoice-is-cancelled.cy.js @@ -1,28 +1,29 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; import Transactions from '../../support/fragments/finance/transactions/transactions'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -87,7 +88,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-order-status-is-changed-to-closed-after-closing-an-order-with-a-paid-invoice.cy.js b/cypress/e2e/orders/encumbrance-order-status-is-changed-to-closed-after-closing-an-order-with-a-paid-invoice.cy.js index 7fc72b2a88..6e81ed6eea 100644 --- a/cypress/e2e/orders/encumbrance-order-status-is-changed-to-closed-after-closing-an-order-with-a-paid-invoice.cy.js +++ b/cypress/e2e/orders/encumbrance-order-status-is-changed-to-closed-after-closing-an-order-with-a-paid-invoice.cy.js @@ -1,13 +1,22 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails } from '../../support/fragments/finance'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; @@ -15,14 +24,6 @@ import ServicePoints from '../../support/fragments/settings/tenant/servicePoints import TopMenu from '../../support/fragments/topMenu'; import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; -import Invoices from '../../support/fragments/invoices/invoices'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - APPLICATION_NAMES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const testData = { @@ -67,7 +68,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-status-unreleased-when-order-unopened-and-reopened.cy.js b/cypress/e2e/orders/encumbrance-status-unreleased-when-order-unopened-and-reopened.cy.js index 764f090a57..6723c85595 100644 --- a/cypress/e2e/orders/encumbrance-status-unreleased-when-order-unopened-and-reopened.cy.js +++ b/cypress/e2e/orders/encumbrance-status-unreleased-when-order-unopened-and-reopened.cy.js @@ -1,31 +1,32 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { TransactionDetails } from '../../support/fragments/finance'; +import Invoices from '../../support/fragments/invoices/invoices'; +import invoiceView from '../../support/fragments/invoices/invoiceView'; +import { OrderLineDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import Approvals from '../../support/fragments/settings/invoices/approvals'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; -import Invoices from '../../support/fragments/invoices/invoices'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - APPLICATION_NAMES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { OrderLineDetails } from '../../support/fragments/orders'; -import invoiceView from '../../support/fragments/invoices/invoiceView'; -import Approvals from '../../support/fragments/settings/invoices/approvals'; describe('Orders', () => { const testData = { @@ -69,7 +70,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-transaction-does-not-update-when-fund-name-is-changing-in-open-one-time-order-and-approved-invoice-related-to-pol-exists.cy.js b/cypress/e2e/orders/encumbrance-transaction-does-not-update-when-fund-name-is-changing-in-open-one-time-order-and-approved-invoice-related-to-pol-exists.cy.js index 5146c33bb4..2fecaa1ced 100644 --- a/cypress/e2e/orders/encumbrance-transaction-does-not-update-when-fund-name-is-changing-in-open-one-time-order-and-approved-invoice-related-to-pol-exists.cy.js +++ b/cypress/e2e/orders/encumbrance-transaction-does-not-update-when-fund-name-is-changing-in-open-one-time-order-and-approved-invoice-related-to-pol-exists.cy.js @@ -1,27 +1,28 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; 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 Invoices from '../../support/fragments/invoices/invoices'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import OrderLines from '../../support/fragments/orders/orderLines'; describe('Orders', () => { const testData = { @@ -120,7 +121,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changed-in-open-one-time-order-with-invoice.cy.js b/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changed-in-open-one-time-order-with-invoice.cy.js index 062479bc5b..eefd21b51b 100644 --- a/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changed-in-open-one-time-order-with-invoice.cy.js +++ b/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changed-in-open-one-time-order-with-invoice.cy.js @@ -1,30 +1,31 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; +import Transactions from '../../support/fragments/finance/transactions/transactions'; import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; -import Transactions from '../../support/fragments/finance/transactions/transactions'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - APPLICATION_NAMES, - ORDER_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import OrderLines from '../../support/fragments/orders/orderLines'; -import { TransactionDetails } from '../../support/fragments/finance'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -119,7 +120,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-in-open-one-time-order.cy.js b/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-in-open-one-time-order.cy.js index 465db2cf29..72c1408466 100644 --- a/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-in-open-one-time-order.cy.js +++ b/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-in-open-one-time-order.cy.js @@ -1,30 +1,31 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; +import Transactions from '../../support/fragments/finance/transactions/transactions'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; +import orderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; -import Transactions from '../../support/fragments/finance/transactions/transactions'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - APPLICATION_NAMES, - ORDER_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import orderLines from '../../support/fragments/orders/orderLines'; -import { TransactionDetails } from '../../support/fragments/finance'; describe('Orders', () => { const testData = { @@ -113,7 +114,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-several-times-in-open-ongoing-order.cy.js b/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-several-times-in-open-ongoing-order.cy.js index 3e935076c4..144d1e7fe0 100644 --- a/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-several-times-in-open-ongoing-order.cy.js +++ b/cypress/e2e/orders/encumbrance-transaction-updates-when-fund-name-is-changing-several-times-in-open-ongoing-order.cy.js @@ -1,30 +1,31 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; +import Transactions from '../../support/fragments/finance/transactions/transactions'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; +import orderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; -import Transactions from '../../support/fragments/finance/transactions/transactions'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - APPLICATION_NAMES, - ORDER_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import orderLines from '../../support/fragments/orders/orderLines'; -import { TransactionDetails } from '../../support/fragments/finance'; describe('Orders', () => { const testData = { @@ -122,7 +123,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/error-message-appears-while-opening-an-order-with-pol-related-to-different-fiscal-years.cy.js b/cypress/e2e/orders/error-message-appears-while-opening-an-order-with-pol-related-to-different-fiscal-years.cy.js index 332a923f31..d065332e35 100644 --- a/cypress/e2e/orders/error-message-appears-while-opening-an-order-with-pol-related-to-different-fiscal-years.cy.js +++ b/cypress/e2e/orders/error-message-appears-while-opening-an-order-with-pol-related-to-different-fiscal-years.cy.js @@ -1,22 +1,26 @@ import { v4 as 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 Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; 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 OrderLinesLimit from '../../support/fragments/settings/orders/orderLinesLimit'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import InteractorsTools from '../../support/utils/interactorsTools'; @@ -107,7 +111,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/expense-class-of-transaction-is-updated-correctly-when-expense-class-of-fund-distribution-is-changed-in-pol.cy.js b/cypress/e2e/orders/expense-class-of-transaction-is-updated-correctly-when-expense-class-of-fund-distribution-is-changed-in-pol.cy.js index 85faf0bf73..88d79a8cca 100644 --- a/cypress/e2e/orders/expense-class-of-transaction-is-updated-correctly-when-expense-class-of-fund-distribution-is-changed-in-pol.cy.js +++ b/cypress/e2e/orders/expense-class-of-transaction-is-updated-correctly-when-expense-class-of-fund-distribution-is-changed-in-pol.cy.js @@ -1,22 +1,26 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; 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 { TransactionDetails } from '../../support/fragments/finance'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; @@ -118,7 +122,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/export/export-orders.cy.js b/cypress/e2e/orders/export/export-orders.cy.js index 7ae2c730a5..8e74b3e3e2 100644 --- a/cypress/e2e/orders/export/export-orders.cy.js +++ b/cypress/e2e/orders/export/export-orders.cy.js @@ -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'; @@ -73,7 +77,7 @@ describe('Orders', () => { 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: organizationsResponse, volumes: [], diff --git a/cypress/e2e/orders/export/pol-export-by-filters.cy.js b/cypress/e2e/orders/export/pol-export-by-filters.cy.js index 7b26213df5..df566eadf9 100644 --- a/cypress/e2e/orders/export/pol-export-by-filters.cy.js +++ b/cypress/e2e/orders/export/pol-export-by-filters.cy.js @@ -4,6 +4,7 @@ import { APPLICATION_NAMES, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -60,7 +61,7 @@ describe('Orders', () => { locations: [{ locationId: testData.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/fund-distribution-can-not-be-changed-in-open-order-when-paid-invoice-for-current-fiscal-year-related-to-pol-exists.cy.js b/cypress/e2e/orders/fund-distribution-can-not-be-changed-in-open-order-when-paid-invoice-for-current-fiscal-year-related-to-pol-exists.cy.js index dbece145e3..0a89086e38 100644 --- a/cypress/e2e/orders/fund-distribution-can-not-be-changed-in-open-order-when-paid-invoice-for-current-fiscal-year-related-to-pol-exists.cy.js +++ b/cypress/e2e/orders/fund-distribution-can-not-be-changed-in-open-order-when-paid-invoice-for-current-fiscal-year-related-to-pol-exists.cy.js @@ -1,26 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 Invoices from '../../support/fragments/invoices/invoices'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const testData = { @@ -64,7 +65,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-electronic-resource-format.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-electronic-resource-format.cy.js index 1240a3de44..3ffb4168f3 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-electronic-resource-format.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-electronic-resource-format.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -47,7 +47,7 @@ describe('Orders', () => { checkinItems: CHECKIN_ITEMS_VALUE[RECEIVING_WORKFLOWS.INDEPENDENT], eresource: { activated: false, - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, trial: false, accessProvider: testData.organization.id, materialType: materialTypeId, diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-other-format.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-other-format.cy.js index 6db176e7f4..1d600723ed 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-other-format.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-other-format.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -46,7 +46,7 @@ describe('Orders', () => { orderFormat: 'Other', checkinItems: CHECKIN_ITEMS_VALUE[RECEIVING_WORKFLOWS.INDEPENDENT], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-i.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-i.cy.js index fba5f53d68..a4c4e7ad0e 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-i.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-i.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -48,11 +48,11 @@ describe('Orders', () => { orderFormat: 'P/E Mix', checkinItems: CHECKIN_ITEMS_VALUE[RECEIVING_WORKFLOWS.INDEPENDENT], eresource: { - createInventory: 'Instance', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE, accessProvider: testData.organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ih.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ih.cy.js index 79515beba1..1a70a499fc 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ih.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ih.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -48,11 +48,11 @@ describe('Orders', () => { orderFormat: 'P/E Mix', checkinItems: CHECKIN_ITEMS_VALUE[RECEIVING_WORKFLOWS.INDEPENDENT], eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, accessProvider: testData.organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ihi.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ihi.cy.js index b1f9c22137..179b2363c7 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ihi.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-ihi.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -48,12 +48,12 @@ describe('Orders', () => { orderFormat: 'P/E Mix', checkinItems: CHECKIN_ITEMS_VALUE[RECEIVING_WORKFLOWS.INDEPENDENT], eresource: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, accessProvider: testData.organization.id, materialType: materialTypeId, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-none.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-none.cy.js index 4e5627642a..d7e6b7451c 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-none.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-pe-mix-format-eresource-none.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -52,7 +52,7 @@ describe('Orders', () => { accessProvider: testData.organization.id, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/holdings-records creation-for-order-with-physical-resource-format.cy.js b/cypress/e2e/orders/holdings-records creation-for-order-with-physical-resource-format.cy.js index 78dd5c6cb0..74b40a542f 100644 --- a/cypress/e2e/orders/holdings-records creation-for-order-with-physical-resource-format.cy.js +++ b/cypress/e2e/orders/holdings-records creation-for-order-with-physical-resource-format.cy.js @@ -1,4 +1,4 @@ -import { ORDER_STATUSES } from '../../support/constants'; +import { ORDER_STATUSES, POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import { Permissions } from '../../support/dictionary'; import InventoryHoldings from '../../support/fragments/inventory/holdings/inventoryHoldings'; import { BasicOrderLine, NewOrder, Orders } from '../../support/fragments/orders'; @@ -46,7 +46,7 @@ describe('Orders', () => { orderFormat: 'Physical Resource', checkinItems: CHECKIN_ITEMS_VALUE[RECEIVING_WORKFLOWS.INDEPENDENT], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [ diff --git a/cypress/e2e/orders/inventory-interaction/edit-instance-connection.cy.js b/cypress/e2e/orders/inventory-interaction/edit-instance-connection.cy.js index 2893605afc..766ebc566e 100644 --- a/cypress/e2e/orders/inventory-interaction/edit-instance-connection.cy.js +++ b/cypress/e2e/orders/inventory-interaction/edit-instance-connection.cy.js @@ -1,6 +1,7 @@ import { ORDER_STATUSES, POLINE_DETAILS_FIELDS, + POL_CREATE_INVENTORY_SETTINGS, POL_CREATE_INVENTORY_SETTINGS_VIEW, } from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; @@ -41,7 +42,7 @@ describe('Orders', () => { testData.orderLine = BasicOrderLine.getDefaultOrderLine({ specialLocationId: testData.location.id, specialMaterialTypeId: testData.materialType.id, - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, }); Orders.createOrderWithOrderLineViaApi(testData.order, testData.orderLine).then( diff --git a/cypress/e2e/orders/inventory-interaction/instance-reference-is-not-removed-when-edited-pol.cy.js b/cypress/e2e/orders/inventory-interaction/instance-reference-is-not-removed-when-edited-pol.cy.js index 3ef8b9acfb..69da4ec928 100644 --- a/cypress/e2e/orders/inventory-interaction/instance-reference-is-not-removed-when-edited-pol.cy.js +++ b/cypress/e2e/orders/inventory-interaction/instance-reference-is-not-removed-when-edited-pol.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import InstanceRecordView from '../../../support/fragments/inventory/instanceRecordView'; @@ -57,7 +58,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/inventory-interaction/instance-reference-is-removed-when-edited-pol.cy.js b/cypress/e2e/orders/inventory-interaction/instance-reference-is-removed-when-edited-pol.cy.js index b4e950f623..dc631e63f7 100644 --- a/cypress/e2e/orders/inventory-interaction/instance-reference-is-removed-when-edited-pol.cy.js +++ b/cypress/e2e/orders/inventory-interaction/instance-reference-is-removed-when-edited-pol.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import InstanceRecordView from '../../../support/fragments/inventory/instanceRecordView'; @@ -62,7 +63,7 @@ describe('Orders', () => { ], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/inventory-interaction/permission-does-not-grant-delete-polpermission.cy.js b/cypress/e2e/orders/inventory-interaction/permission-does-not-grant-delete-polpermission.cy.js index aad4ed572a..6e1935e9dc 100644 --- a/cypress/e2e/orders/inventory-interaction/permission-does-not-grant-delete-polpermission.cy.js +++ b/cypress/e2e/orders/inventory-interaction/permission-does-not-grant-delete-polpermission.cy.js @@ -3,6 +3,7 @@ import { CAPABILITY_ACTIONS, CAPABILITY_TYPES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Budgets from '../../../support/fragments/finance/budgets/budgets'; @@ -123,7 +124,7 @@ 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: [], diff --git a/cypress/e2e/orders/item-status-changed-to-order-closed.cy.js b/cypress/e2e/orders/item-status-changed-to-order-closed.cy.js index 98ff41c2ed..2091bdaa36 100644 --- a/cypress/e2e/orders/item-status-changed-to-order-closed.cy.js +++ b/cypress/e2e/orders/item-status-changed-to-order-closed.cy.js @@ -1,16 +1,17 @@ -import { Permissions } from '../../support/dictionary'; -import { Budgets } from '../../support/fragments/finance'; -import { Locations, ServicePoints } from '../../support/fragments/settings/tenant'; -import { NewOrder, Orders, BasicOrderLine, OrderLines } from '../../support/fragments/orders'; -import { NewOrganization, Organizations } from '../../support/fragments/organizations'; -import { InventoryHoldings } from '../../support/fragments/inventory'; -import { OrderLinesLimit } from '../../support/fragments/settings/orders'; import { + ORDER_LINE_PAYMENT_STATUS, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, RECEIPT_STATUS_VIEW, } from '../../support/constants'; +import { Permissions } from '../../support/dictionary'; +import { Budgets } from '../../support/fragments/finance'; +import { InventoryHoldings } from '../../support/fragments/inventory'; +import { BasicOrderLine, NewOrder, OrderLines, Orders } from '../../support/fragments/orders'; +import { NewOrganization, Organizations } from '../../support/fragments/organizations'; +import { OrderLinesLimit } from '../../support/fragments/settings/orders'; +import { Locations, ServicePoints } from '../../support/fragments/settings/tenant'; import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; @@ -60,7 +61,7 @@ describe('Orders', () => { const orderLine = BasicOrderLine.getDefaultOrderLine({ acquisitionMethod, purchaseOrderId: testData.order.id, - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, checkinItems: false, specialLocationId: testData.location.id, specialMaterialTypeId: materialTypeId, diff --git a/cypress/e2e/orders/items-for-receiving-includes-order-closed-statuses.cy.js b/cypress/e2e/orders/items-for-receiving-includes-order-closed-statuses.cy.js index eda6166f6c..73849930b2 100644 --- a/cypress/e2e/orders/items-for-receiving-includes-order-closed-statuses.cy.js +++ b/cypress/e2e/orders/items-for-receiving-includes-order-closed-statuses.cy.js @@ -4,6 +4,7 @@ import { ITEM_STATUS_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, VENDOR_NAMES, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; @@ -77,7 +78,7 @@ describe('Orders', () => { ], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, volumes: [], }, diff --git a/cypress/e2e/orders/manage-user-assignments-in-routing-list-from-orders.cy.js b/cypress/e2e/orders/manage-user-assignments-in-routing-list-from-orders.cy.js index ea05ce4518..421319ed7c 100644 --- a/cypress/e2e/orders/manage-user-assignments-in-routing-list-from-orders.cy.js +++ b/cypress/e2e/orders/manage-user-assignments-in-routing-list-from-orders.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -53,7 +54,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-budget.cy.js b/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-budget.cy.js index 9b6f1fe44d..5f210cae9f 100644 --- a/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-budget.cy.js +++ b/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-budget.cy.js @@ -1,26 +1,27 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import { OrderLineDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { OrderLineDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -62,7 +63,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-current-fiscal-year.cy.js b/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-current-fiscal-year.cy.js index f9a0110a57..12d33d94c4 100644 --- a/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-current-fiscal-year.cy.js +++ b/cypress/e2e/orders/meaningful-error-message-appears-when-trying-to-open-an-order-with-fund-specified-in-fund-distribution-that-has-no-current-fiscal-year.cy.js @@ -1,20 +1,24 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import DateTools from '../../support/utils/dateTools'; describe('Orders', () => { @@ -56,7 +60,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/one-time-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js b/cypress/e2e/orders/one-time-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js index e887c479f6..afc507356b 100644 --- a/cypress/e2e/orders/one-time-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js +++ b/cypress/e2e/orders/one-time-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js @@ -1,10 +1,11 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, ORDER_STATUSES, ORDER_SYSTEM_CLOSING_REASONS, + POL_CREATE_INVENTORY_SETTINGS, POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, RECEIPT_STATUS_VIEW, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; @@ -89,7 +90,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/ongoing-order-can-be-reopened-after-rollover.cy.js b/cypress/e2e/orders/ongoing-order-can-be-reopened-after-rollover.cy.js index 67c0cd067b..e700226179 100644 --- a/cypress/e2e/orders/ongoing-order-can-be-reopened-after-rollover.cy.js +++ b/cypress/e2e/orders/ongoing-order-can-be-reopened-after-rollover.cy.js @@ -1,15 +1,26 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; -import { ORDER_STATUSES, ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../support/constants'; +import { + BudgetDetails, + FundDetails, + TransactionDetails, + Transactions, +} from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; import LedgerRollovers from '../../support/fragments/finance/ledgers/ledgerRollovers'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import { OrderLineDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; @@ -17,13 +28,6 @@ import ServicePoints from '../../support/fragments/settings/tenant/servicePoints import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import { CodeTools, DateTools, StringTools } from '../../support/utils'; -import { OrderLineDetails } from '../../support/fragments/orders'; -import { - BudgetDetails, - FundDetails, - TransactionDetails, - Transactions, -} from '../../support/fragments/finance'; describe('Orders', () => { const code = CodeTools(4); @@ -112,7 +116,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/ongoing-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js b/cypress/e2e/orders/ongoing-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js index f436e6cfb0..6ea2598682 100644 --- a/cypress/e2e/orders/ongoing-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js +++ b/cypress/e2e/orders/ongoing-order-remains-in-closed-status-after-changing-pol-statuses-manually.cy.js @@ -1,10 +1,11 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, ORDER_STATUSES, ORDER_SYSTEM_CLOSING_REASONS, + POL_CREATE_INVENTORY_SETTINGS, POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, RECEIPT_STATUS_VIEW, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; @@ -89,7 +90,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/open-order-when-related-open-invoice-with-acquisition-unit-exists.cy.js b/cypress/e2e/orders/open-order-when-related-open-invoice-with-acquisition-unit-exists.cy.js index 0b3dec5c47..d0789f8553 100644 --- a/cypress/e2e/orders/open-order-when-related-open-invoice-with-acquisition-unit-exists.cy.js +++ b/cypress/e2e/orders/open-order-when-related-open-invoice-with-acquisition-unit-exists.cy.js @@ -1,35 +1,36 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import InvoiceEditForm from '../../support/fragments/invoices/invoiceEditForm'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; +import selectOrderLinesModal from '../../support/fragments/invoices/modal/selectOrderLinesModal'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; -import InvoiceEditForm from '../../support/fragments/invoices/invoiceEditForm'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import AcquisitionUnits from '../../support/fragments/settings/acquisitionUnits/acquisitionUnits'; import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import AcquisitionUnits from '../../support/fragments/settings/acquisitionUnits/acquisitionUnits'; import TopMenu from '../../support/fragments/topMenu'; import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - APPLICATION_NAMES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import selectOrderLinesModal from '../../support/fragments/invoices/modal/selectOrderLinesModal'; describe('Orders', () => { const testData = { @@ -105,7 +106,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/order-line-status-updated-when-paying-against-previous-fiscal-year.cy.js b/cypress/e2e/orders/order-line-status-updated-when-paying-against-previous-fiscal-year.cy.js index f6f2a9fd59..ce0f0ef4ff 100644 --- a/cypress/e2e/orders/order-line-status-updated-when-paying-against-previous-fiscal-year.cy.js +++ b/cypress/e2e/orders/order-line-status-updated-when-paying-against-previous-fiscal-year.cy.js @@ -1,37 +1,38 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + APPLICATION_NAMES, + INVOICE_POL_PAYMENT_STATUSES, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { FinanceHelper, TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; import LedgerRollovers from '../../support/fragments/finance/ledgers/ledgerRollovers'; -import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import ExpenseClasses from '../../support/fragments/settings/finance/expenseClasses'; 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 DateTools from '../../support/utils/dateTools'; -import { CodeTools, StringTools } from '../../support/utils'; -import { TransactionDetails, FinanceHelper } from '../../support/fragments/finance'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - APPLICATION_NAMES, - INVOICE_POL_PAYMENT_STATUSES, - INVOICE_STATUSES, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { OrderDetails } from '../../support/fragments/orders'; import topMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; +import { CodeTools, StringTools } from '../../support/utils'; +import DateTools from '../../support/utils/dateTools'; describe('Orders', () => { const code = CodeTools(4); @@ -171,7 +172,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-cancelled-one-time-order-.cy.js b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-cancelled-one-time-order-.cy.js index 77f2bac522..fb32864fb7 100644 --- a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-cancelled-one-time-order-.cy.js +++ b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-cancelled-one-time-order-.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -86,7 +87,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-payment-status-set-as-payment-not-required.cy.js b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-payment-status-set-as-payment-not-required.cy.js index e145cf5003..80e88ee6d3 100644 --- a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-payment-status-set-as-payment-not-required.cy.js +++ b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-payment-status-set-as-payment-not-required.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -87,7 +88,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-is-partially-received.cy.js b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-is-partially-received.cy.js index 8b6d0fc0d6..01bd783fd2 100644 --- a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-is-partially-received.cy.js +++ b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-is-partially-received.cy.js @@ -1,30 +1,31 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; -import Receiving from '../../support/fragments/receiving/receiving'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -87,7 +88,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-set-as-receipt-not-required.cy.js b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-set-as-receipt-not-required.cy.js index f5d1227863..ee77a82112 100644 --- a/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-set-as-receipt-not-required.cy.js +++ b/cypress/e2e/orders/paying-an-invoice-does-not-reopen-one-time-order-with-receipt-status-set-as-receipt-not-required.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -88,7 +89,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/pol-filters.cy.js b/cypress/e2e/orders/pol-filters.cy.js index 8f70c0afa4..bb942a9a25 100644 --- a/cypress/e2e/orders/pol-filters.cy.js +++ b/cypress/e2e/orders/pol-filters.cy.js @@ -1,7 +1,9 @@ import uuid from 'uuid'; +import { POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; import NewInvoice from '../../support/fragments/invoices/newInvoice'; 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 OrdersHelper from '../../support/fragments/orders/ordersHelper'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; @@ -9,7 +11,6 @@ import Organizations from '../../support/fragments/organizations/organizations'; import TopMenu from '../../support/fragments/topMenu'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import OrderLines from '../../support/fragments/orders/orderLines'; describe('Orders', () => { const organization = { ...NewOrganization.defaultUiOrganizations }; @@ -44,7 +45,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: '', materialSupplier: '', volumes: ['test vol. 1'], diff --git a/cypress/e2e/orders/pol-search.cy.js b/cypress/e2e/orders/pol-search.cy.js index 574fccf717..ee9a52dbc0 100644 --- a/cypress/e2e/orders/pol-search.cy.js +++ b/cypress/e2e/orders/pol-search.cy.js @@ -1,13 +1,14 @@ import uuid from 'uuid'; +import { POL_CREATE_INVENTORY_SETTINGS } from '../../support/constants'; 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 OrdersHelper from '../../support/fragments/orders/ordersHelper'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; import TopMenu from '../../support/fragments/topMenu'; import getRandomPostfix from '../../support/utils/stringTools'; -import OrderLines from '../../support/fragments/orders/orderLines'; describe('Orders', () => { const organization = { ...NewOrganization.defaultUiOrganizations }; @@ -29,7 +30,7 @@ describe('Orders', () => { selector: `Autotest selector_${getRandomPostfix()}`, fundDistribution: [], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: '', materialSupplier: '', volumes: [`test_vol_${getRandomPostfix()}`], diff --git a/cypress/e2e/orders/pol-with-linked-holdings-could-be-found-by-location-filteringon-order-lines-pane.cy.js b/cypress/e2e/orders/pol-with-linked-holdings-could-be-found-by-location-filteringon-order-lines-pane.cy.js index 6e37cead2d..febebb79a0 100644 --- a/cypress/e2e/orders/pol-with-linked-holdings-could-be-found-by-location-filteringon-order-lines-pane.cy.js +++ b/cypress/e2e/orders/pol-with-linked-holdings-could-be-found-by-location-filteringon-order-lines-pane.cy.js @@ -1,23 +1,27 @@ 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 getRandomPostfix from '../../support/utils/stringTools'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; -import TopMenu from '../../support/fragments/topMenu'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Users from '../../support/fragments/users/users'; import Funds from '../../support/fragments/finance/funds/funds'; -import DateTools from '../../support/utils/dateTools'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Organizations from '../../support/fragments/organizations/organizations'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; -import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import Organizations from '../../support/fragments/organizations/organizations'; 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 DateTools from '../../support/utils/dateTools'; +import getRandomPostfix from '../../support/utils/stringTools'; describe('Orders', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -117,7 +121,7 @@ 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: [], diff --git a/cypress/e2e/orders/receipt-ongoing-po-line-status-remains-ongoing-after-receiving.cy.js b/cypress/e2e/orders/receipt-ongoing-po-line-status-remains-ongoing-after-receiving.cy.js index 94a8a1f839..ddde1c2d59 100644 --- a/cypress/e2e/orders/receipt-ongoing-po-line-status-remains-ongoing-after-receiving.cy.js +++ b/cypress/e2e/orders/receipt-ongoing-po-line-status-remains-ongoing-after-receiving.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FinanceHelp from '../../support/fragments/finance/financeHelper'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; +import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import Receiving from '../../support/fragments/receiving/receiving'; +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 Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import Receiving from '../../support/fragments/receiving/receiving'; -import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; describe('Orders', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -97,7 +98,7 @@ 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: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-quick-receive-option.cy.js b/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-quick-receive-option.cy.js index 1ed7bef510..c1abebc865 100644 --- a/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-quick-receive-option.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-quick-receive-option.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import Helper from '../../../support/fragments/finance/financeHelper'; @@ -49,7 +50,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-receive-option.cy.js b/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-receive-option.cy.js index 49e359905b..670f022b52 100644 --- a/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-receive-option.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/copy-number-applies-receive-option.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import Helper from '../../../support/fragments/finance/financeHelper'; @@ -49,7 +50,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.id, quantity: 1, quantityPhysical: 1 }], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, materialSupplier: orgResp, volumes: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/copy-number-not-shown-in-receiving.cy.js b/cypress/e2e/orders/receiving-and-check-in/copy-number-not-shown-in-receiving.cy.js index 21a272dcdb..59fbfe926a 100644 --- a/cypress/e2e/orders/receiving-and-check-in/copy-number-not-shown-in-receiving.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/copy-number-not-shown-in-receiving.cy.js @@ -1,8 +1,12 @@ import uuid from 'uuid'; -import { APPLICATION_NAMES, LOCATION_NAMES } from '../../../support/constants'; +import { + APPLICATION_NAMES, + LOCATION_NAMES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; -import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; +import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; import { BasicOrderLine, NewOrder, Orders } from '../../../support/fragments/orders'; import { NewOrganization, Organizations } from '../../../support/fragments/organizations'; import { Receivings } from '../../../support/fragments/receiving'; @@ -54,7 +58,7 @@ describe('Orders', () => { receiptStatus: 'Awaiting Receipt', orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], diff --git a/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-quick-receive-option.cy.js b/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-quick-receive-option.cy.js index 966ff67d47..f6096a6e79 100644 --- a/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-quick-receive-option.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-quick-receive-option.cy.js @@ -1,20 +1,21 @@ -import uuid from 'uuid'; import { including } from '@interactors/html'; +import uuid from 'uuid'; -import { Permissions } from '../../../support/dictionary'; -import { NewOrder, BasicOrderLine, Orders, OrderLines } from '../../../support/fragments/orders'; -import { NewOrganization, Organizations } from '../../../support/fragments/organizations'; -import InventoryHoldings from '../../../support/fragments/inventory/holdings/inventoryHoldings'; -import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; import { - ORDER_STATUSES, - LOCATION_NAMES, ACQUISITION_METHOD_NAMES_IN_PROFILE, + LOCATION_NAMES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; +import { Permissions } from '../../../support/dictionary'; +import InventoryHoldings from '../../../support/fragments/inventory/holdings/inventoryHoldings'; +import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; +import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; +import { BasicOrderLine, NewOrder, OrderLines, Orders } from '../../../support/fragments/orders'; +import { NewOrganization, Organizations } from '../../../support/fragments/organizations'; +import Receiving from '../../../support/fragments/receiving/receiving'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; -import Receiving from '../../../support/fragments/receiving/receiving'; -import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; describe('Orders', () => { describe('Receiving and Check-in', () => { @@ -70,7 +71,7 @@ describe('Orders', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialType.id, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-receive-option.cy.js b/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-receive-option.cy.js index 823e220c2f..65d27023a1 100644 --- a/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-receive-option.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/create-new-holding-for-existing-location-receive-option.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; import InventoryHoldings from '../../../support/fragments/inventory/holdings/inventoryHoldings'; @@ -67,7 +68,7 @@ describe('Orders', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialType.id, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/item-statuses-are-set-to-status-other.cy.js b/cypress/e2e/orders/receiving-and-check-in/item-statuses-are-set-to-status-other.cy.js index 9c080beb4a..9dca735d4d 100644 --- a/cypress/e2e/orders/receiving-and-check-in/item-statuses-are-set-to-status-other.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/item-statuses-are-set-to-status-other.cy.js @@ -5,6 +5,7 @@ import { ITEM_STATUS_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, VENDOR_NAMES, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; @@ -90,7 +91,7 @@ describe('Orders', () => { ], acquisitionMethod: amResp.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypeResp.id, volumes: [], }, diff --git a/cypress/e2e/orders/receiving-and-check-in/pol-with-linked-holdings-could-be-found-by-location-filtering.cy.js b/cypress/e2e/orders/receiving-and-check-in/pol-with-linked-holdings-could-be-found-by-location-filtering.cy.js index 072e321caa..fc7e7bcd2e 100644 --- a/cypress/e2e/orders/receiving-and-check-in/pol-with-linked-holdings-could-be-found-by-location-filtering.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/pol-with-linked-holdings-could-be-found-by-location-filtering.cy.js @@ -1,5 +1,5 @@ import uuid from 'uuid'; -import { APPLICATION_NAMES } from '../../../support/constants'; +import { APPLICATION_NAMES, POL_CREATE_INVENTORY_SETTINGS } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; import { BasicOrderLine, NewOrder, Orders } from '../../../support/fragments/orders'; @@ -86,7 +86,7 @@ describe('Orders', () => { }, orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], @@ -103,7 +103,7 @@ describe('Orders', () => { }, orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], @@ -120,7 +120,7 @@ describe('Orders', () => { }, orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], @@ -137,7 +137,7 @@ describe('Orders', () => { }, orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], diff --git a/cypress/e2e/orders/receiving-and-check-in/receive-piece-with-payment-not-required-status.cy.js b/cypress/e2e/orders/receiving-and-check-in/receive-piece-with-payment-not-required-status.cy.js index 042bf6405e..b7f38c02cf 100644 --- a/cypress/e2e/orders/receiving-and-check-in/receive-piece-with-payment-not-required-status.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/receive-piece-with-payment-not-required-status.cy.js @@ -1,22 +1,26 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; +import Budgets from '../../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../../support/fragments/finance/funds/funds'; import Ledgers from '../../../support/fragments/finance/ledgers/ledgers'; +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 NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import Receiving from '../../../support/fragments/receiving/receiving'; +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'; -import Budgets from '../../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../../support/constants'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../../support/fragments/settings/inventory/materialTypes'; describe('Orders', () => { describe('Receiving and Check-in', () => { @@ -101,7 +105,7 @@ 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: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/receive-pieces-for-package-order.cy.js b/cypress/e2e/orders/receiving-and-check-in/receive-pieces-for-package-order.cy.js index 48eab494cf..8d5569ee11 100644 --- a/cypress/e2e/orders/receiving-and-check-in/receive-pieces-for-package-order.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/receive-pieces-for-package-order.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, APPLICATION_NAMES, LOCATION_NAMES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import Helper from '../../../support/fragments/finance/financeHelper'; @@ -94,7 +95,7 @@ describe('Orders', () => { ], acquisitionMethod: testData.acquisitionMethod, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialType.id, materialSupplier: organization.id, volumes: [], diff --git a/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-level-request.cy.js b/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-level-request.cy.js index be29a57723..01274e114a 100644 --- a/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-level-request.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-level-request.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, ITEM_STATUS_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, REQUEST_TYPES, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; @@ -71,7 +72,7 @@ describe('Orders', () => { }, orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], diff --git a/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-title-level-request.cy.js b/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-title-level-request.cy.js index 760e37dc13..85b8d68a21 100644 --- a/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-title-level-request.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/receiving-item-with-open-title-level-request.cy.js @@ -3,13 +3,14 @@ import { APPLICATION_NAMES, ITEM_STATUS_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, REQUEST_TYPES, } from '../../../support/constants'; import Permissions from '../../../support/dictionary/permissions'; import CheckInActions from '../../../support/fragments/check-in-actions/checkInActions'; import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; import ItemRecordView from '../../../support/fragments/inventory/item/itemRecordView'; -import { BasicOrderLine, NewOrder, Orders, OrderLines } from '../../../support/fragments/orders'; +import { BasicOrderLine, NewOrder, OrderLines, Orders } from '../../../support/fragments/orders'; import { NewOrganization, Organizations } from '../../../support/fragments/organizations'; import Receiving from '../../../support/fragments/receiving/receiving'; import NewRequest from '../../../support/fragments/requests/newRequest'; @@ -68,7 +69,7 @@ describe('Orders', () => { }, orderFormat: 'Other', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, }, locations: [{ locationId: testData.location.id, quantityPhysical: 1 }], diff --git a/cypress/e2e/orders/receiving-and-check-in/receiving-pieces-from-order-for-PE-mix.cy.js b/cypress/e2e/orders/receiving-and-check-in/receiving-pieces-from-order-for-PE-mix.cy.js index 5872a824ef..c95167c6d6 100644 --- a/cypress/e2e/orders/receiving-and-check-in/receiving-pieces-from-order-for-PE-mix.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/receiving-pieces-from-order-for-PE-mix.cy.js @@ -1,5 +1,10 @@ import uuid from 'uuid'; -import { APPLICATION_NAMES, ITEM_STATUS_NAMES, LOCATION_NAMES } from '../../../support/constants'; +import { + APPLICATION_NAMES, + ITEM_STATUS_NAMES, + LOCATION_NAMES, + 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'; @@ -55,10 +60,10 @@ describe('Orders', () => { listUnitPrice: 10, }, eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: testData.materialTypeId, }, orderFormat: 'P/E Mix', diff --git a/cypress/e2e/orders/receiving-and-check-in/update-barcode.cy.js b/cypress/e2e/orders/receiving-and-check-in/update-barcode.cy.js index ddf2fea08d..716cda9c6d 100644 --- a/cypress/e2e/orders/receiving-and-check-in/update-barcode.cy.js +++ b/cypress/e2e/orders/receiving-and-check-in/update-barcode.cy.js @@ -1,23 +1,27 @@ -import { ITEM_STATUS_NAMES, ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../../support/constants'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ITEM_STATUS_NAMES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; import Helper from '../../../support/fragments/finance/financeHelper'; import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter'; import InventoryItems from '../../../support/fragments/inventory/item/inventoryItems'; import ItemRecordView from '../../../support/fragments/inventory/item/itemRecordView'; +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 NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; import Receiving from '../../../support/fragments/receiving/receiving'; +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'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../../support/fragments/settings/inventory/materialTypes'; describe('Orders', () => { describe('Inventory interaction', () => { @@ -81,7 +85,7 @@ describe('Orders', () => { locations: [{ locationId: location.id, quantity: 2, quantityPhysical: 2 }], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypes.body.id, materialSupplier: organizationsResponse, volumes: [], diff --git a/cypress/e2e/orders/receiving-piece-does-not-reopen-cancelled-one-time-order-without-related-invoices.cy.js b/cypress/e2e/orders/receiving-piece-does-not-reopen-cancelled-one-time-order-without-related-invoices.cy.js index a787182fea..22ac88f5b6 100644 --- a/cypress/e2e/orders/receiving-piece-does-not-reopen-cancelled-one-time-order-without-related-invoices.cy.js +++ b/cypress/e2e/orders/receiving-piece-does-not-reopen-cancelled-one-time-order-without-related-invoices.cy.js @@ -1,28 +1,29 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Receiving from '../../support/fragments/receiving/receiving'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -84,7 +85,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/receiving-piece-does-not-reopen-one-time-order-with-related-paid-invoices-receipt-status-receipt-not-required.cy.js b/cypress/e2e/orders/receiving-piece-does-not-reopen-one-time-order-with-related-paid-invoices-receipt-status-receipt-not-required.cy.js index a262fb38ae..0e3f944583 100644 --- a/cypress/e2e/orders/receiving-piece-does-not-reopen-one-time-order-with-related-paid-invoices-receipt-status-receipt-not-required.cy.js +++ b/cypress/e2e/orders/receiving-piece-does-not-reopen-one-time-order-with-related-paid-invoices-receipt-status-receipt-not-required.cy.js @@ -1,30 +1,31 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; -import Receiving from '../../support/fragments/receiving/receiving'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -90,7 +91,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/receiving-piece-does-not-reopen-partially-paid-one-time-order.cy.js b/cypress/e2e/orders/receiving-piece-does-not-reopen-partially-paid-one-time-order.cy.js index fcd9ef70f2..d5d7e5bf79 100644 --- a/cypress/e2e/orders/receiving-piece-does-not-reopen-partially-paid-one-time-order.cy.js +++ b/cypress/e2e/orders/receiving-piece-does-not-reopen-partially-paid-one-time-order.cy.js @@ -1,30 +1,31 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + POLINE_DETAILS_FIELDS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import { OrderDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; -import Receiving from '../../support/fragments/receiving/receiving'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - POLINE_DETAILS_FIELDS, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; -import { OrderDetails } from '../../support/fragments/orders'; describe('Orders', () => { const testData = { @@ -87,7 +88,7 @@ describe('Orders', () => { }, ], physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/release-encumbrances-when-reopen-one-time-order-with-approved-invoice.cy.js b/cypress/e2e/orders/release-encumbrances-when-reopen-one-time-order-with-approved-invoice.cy.js index 6c4c56aee8..676b0ed1d8 100644 --- a/cypress/e2e/orders/release-encumbrances-when-reopen-one-time-order-with-approved-invoice.cy.js +++ b/cypress/e2e/orders/release-encumbrances-when-reopen-one-time-order-with-approved-invoice.cy.js @@ -1,28 +1,29 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { TransactionDetails } from '../../support/fragments/finance'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -87,7 +88,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/release-encumbrances-when-reopen-received-one-time-order-with-paid-invoice.cy.js b/cypress/e2e/orders/release-encumbrances-when-reopen-received-one-time-order-with-paid-invoice.cy.js index 8f44da41ab..c2a91e498a 100644 --- a/cypress/e2e/orders/release-encumbrances-when-reopen-received-one-time-order-with-paid-invoice.cy.js +++ b/cypress/e2e/orders/release-encumbrances-when-reopen-received-one-time-order-with-paid-invoice.cy.js @@ -1,29 +1,30 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Receiving from '../../support/fragments/receiving/receiving'; -import Invoices from '../../support/fragments/invoices/invoices'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, - ORDER_LINE_PAYMENT_STATUS, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { TransactionDetails } from '../../support/fragments/finance'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -88,7 +89,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/release-encumbrances-when-reopen-unreceived-one-time-order-with-approved-invoice-with-acquisition-unit.cy.js b/cypress/e2e/orders/release-encumbrances-when-reopen-unreceived-one-time-order-with-approved-invoice-with-acquisition-unit.cy.js index 0c6c1ec077..ff673fb38c 100644 --- a/cypress/e2e/orders/release-encumbrances-when-reopen-unreceived-one-time-order-with-approved-invoice-with-acquisition-unit.cy.js +++ b/cypress/e2e/orders/release-encumbrances-when-reopen-unreceived-one-time-order-with-approved-invoice-with-acquisition-unit.cy.js @@ -1,31 +1,32 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import InvoiceEditForm from '../../support/fragments/invoices/invoiceEditForm'; +import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; +import Invoices from '../../support/fragments/invoices/invoices'; +import InvoiceView from '../../support/fragments/invoices/invoiceView'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Invoices from '../../support/fragments/invoices/invoices'; -import InvoiceView from '../../support/fragments/invoices/invoiceView'; -import InvoiceLineDetails from '../../support/fragments/invoices/invoiceLineDetails'; -import InvoiceEditForm from '../../support/fragments/invoices/invoiceEditForm'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; -import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; -import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; import AcquisitionUnits from '../../support/fragments/settings/acquisitionUnits/acquisitionUnits'; import { Approvals } from '../../support/fragments/settings/invoices'; +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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { TransactionDetails } from '../../support/fragments/finance'; import Users from '../../support/fragments/users/users'; import DateTools from '../../support/utils/dateTools'; import getRandomPostfix from '../../support/utils/stringTools'; @@ -102,7 +103,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/replace-acquisition-unit-in-title-record.cy.js b/cypress/e2e/orders/replace-acquisition-unit-in-title-record.cy.js index 1aac0c04a2..4cd7d2c9e2 100644 --- a/cypress/e2e/orders/replace-acquisition-unit-in-title-record.cy.js +++ b/cypress/e2e/orders/replace-acquisition-unit-in-title-record.cy.js @@ -3,6 +3,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, APPLICATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; @@ -98,7 +99,7 @@ describe('Orders', () => { ], 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: [], diff --git a/cypress/e2e/orders/routing-list-not-displayed-for-electronic-and-other-formats.cy.js b/cypress/e2e/orders/routing-list-not-displayed-for-electronic-and-other-formats.cy.js index 0d84b1cd7c..8a2320f9e9 100644 --- a/cypress/e2e/orders/routing-list-not-displayed-for-electronic-and-other-formats.cy.js +++ b/cypress/e2e/orders/routing-list-not-displayed-for-electronic-and-other-formats.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, APPLICATION_NAMES, LOCATION_NAMES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -60,7 +61,7 @@ describe('Orders', () => { }, ], eresource: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, materialType: mtypes.id, }, }; @@ -83,7 +84,7 @@ describe('Orders', () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDINGs, materialType: mtypes.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/total-credited-field-is-displayed-in-po-summary-accordion-on-order-details-pane.cy.js b/cypress/e2e/orders/total-credited-field-is-displayed-in-po-summary-accordion-on-order-details-pane.cy.js index 9850f6bd6a..891c400411 100644 --- a/cypress/e2e/orders/total-credited-field-is-displayed-in-po-summary-accordion-on-order-details-pane.cy.js +++ b/cypress/e2e/orders/total-credited-field-is-displayed-in-po-summary-accordion-on-order-details-pane.cy.js @@ -1,27 +1,28 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; +import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +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'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - INVOICE_STATUSES, - ORDER_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; -import OrderDetails from '../../support/fragments/orders/orderDetails'; describe('Orders', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -115,7 +116,7 @@ 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: [], diff --git a/cypress/e2e/orders/total-expended-in-order-summary-contains-paid-amount-from-linked-invoice-line.cy.js b/cypress/e2e/orders/total-expended-in-order-summary-contains-paid-amount-from-linked-invoice-line.cy.js index 9ca3f5433d..13d3e8313a 100644 --- a/cypress/e2e/orders/total-expended-in-order-summary-contains-paid-amount-from-linked-invoice-line.cy.js +++ b/cypress/e2e/orders/total-expended-in-order-summary-contains-paid-amount-from-linked-invoice-line.cy.js @@ -1,26 +1,27 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + INVOICE_STATUSES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import Invoices from '../../support/fragments/invoices/invoices'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 Invoices from '../../support/fragments/invoices/invoices'; -import { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_STATUSES, - INVOICE_STATUSES, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const testData = { @@ -70,7 +71,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/unopen-one-time-order-multiple-funds.cy.js b/cypress/e2e/orders/unopen-one-time-order-multiple-funds.cy.js index a462b531c7..61c7ca5c73 100644 --- a/cypress/e2e/orders/unopen-one-time-order-multiple-funds.cy.js +++ b/cypress/e2e/orders/unopen-one-time-order-multiple-funds.cy.js @@ -1,9 +1,14 @@ -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 Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; import OrderLines from '../../support/fragments/orders/orderLines'; @@ -15,9 +20,8 @@ import NewLocation from '../../support/fragments/settings/tenant/locations/newLo 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'; import InteractorsTools from '../../support/utils/interactorsTools'; -import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; +import getRandomPostfix from '../../support/utils/stringTools'; describe('Orders', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -141,7 +145,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: [], diff --git a/cypress/e2e/orders/unopen-ongoing-order-multiple-funds.cy.js b/cypress/e2e/orders/unopen-ongoing-order-multiple-funds.cy.js index 888e179782..2e8362e45c 100644 --- a/cypress/e2e/orders/unopen-ongoing-order-multiple-funds.cy.js +++ b/cypress/e2e/orders/unopen-ongoing-order-multiple-funds.cy.js @@ -1,9 +1,14 @@ -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 Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; import OrderLines from '../../support/fragments/orders/orderLines'; @@ -15,9 +20,8 @@ import NewLocation from '../../support/fragments/settings/tenant/locations/newLo 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'; import InteractorsTools from '../../support/utils/interactorsTools'; -import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; +import getRandomPostfix from '../../support/utils/stringTools'; describe('Orders', () => { const defaultFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -141,7 +145,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: [], diff --git a/cypress/e2e/orders/unopen-order-with-changed-fund-distribution.cy.js b/cypress/e2e/orders/unopen-order-with-changed-fund-distribution.cy.js index 8228db2000..0df8d45746 100644 --- a/cypress/e2e/orders/unopen-order-with-changed-fund-distribution.cy.js +++ b/cypress/e2e/orders/unopen-order-with-changed-fund-distribution.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import Budgets from '../../support/fragments/finance/budgets/budgets'; @@ -24,11 +25,11 @@ import Organizations from '../../support/fragments/organizations/organizations'; 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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; import Users from '../../support/fragments/users/users'; import InteractorsTools from '../../support/utils/interactorsTools'; import getRandomPostfix from '../../support/utils/stringTools'; -import TopMenu from '../../support/fragments/topMenu'; describe('Orders', { retries: { runMode: 1 } }, () => { const order = { ...NewOrder.defaultOngoingTimeOrder, approved: true, reEncumber: true }; @@ -130,7 +131,7 @@ describe('Orders', { retries: { runMode: 1 } }, () => { ], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING, materialType: mtypes.body.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/unrelease-encumbrances-when-reopen-one-time-and-ongoing-received-orders-with-no-invoices.cy.js b/cypress/e2e/orders/unrelease-encumbrances-when-reopen-one-time-and-ongoing-received-orders-with-no-invoices.cy.js index ff7166dfa5..ba93eabbab 100644 --- a/cypress/e2e/orders/unrelease-encumbrances-when-reopen-one-time-and-ongoing-received-orders-with-no-invoices.cy.js +++ b/cypress/e2e/orders/unrelease-encumbrances-when-reopen-one-time-and-ongoing-received-orders-with-no-invoices.cy.js @@ -1,30 +1,31 @@ import uuid from 'uuid'; +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_LINE_PAYMENT_STATUS, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, + RECEIPT_STATUS_VIEW, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; -import Receiving from '../../support/fragments/receiving/receiving'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; 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 { - ACQUISITION_METHOD_NAMES_IN_PROFILE, - ORDER_LINE_PAYMENT_STATUS, - ORDER_STATUSES, - RECEIPT_STATUS_VIEW, -} from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import OrderLines from '../../support/fragments/orders/orderLines'; -import { TransactionDetails } from '../../support/fragments/finance'; -import Users from '../../support/fragments/users/users'; import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import Users from '../../support/fragments/users/users'; describe('Orders', () => { const testData = { @@ -89,7 +90,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/unrelease-encumbrances-when-reopen-ongoing-order-without-receiving.cy.js b/cypress/e2e/orders/unrelease-encumbrances-when-reopen-ongoing-order-without-receiving.cy.js index 6362d7152f..0d7939f2d5 100644 --- a/cypress/e2e/orders/unrelease-encumbrances-when-reopen-ongoing-order-without-receiving.cy.js +++ b/cypress/e2e/orders/unrelease-encumbrances-when-reopen-ongoing-order-without-receiving.cy.js @@ -1,21 +1,25 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; -import OrderLines from '../../support/fragments/orders/orderLines'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; +import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import { TransactionDetails } from '../../support/fragments/finance'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -78,7 +82,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/unrelease-encumbrances-when-reopen-unreceived-order.cy.js b/cypress/e2e/orders/unrelease-encumbrances-when-reopen-unreceived-order.cy.js index a9812b58cc..96235e372e 100644 --- a/cypress/e2e/orders/unrelease-encumbrances-when-reopen-unreceived-order.cy.js +++ b/cypress/e2e/orders/unrelease-encumbrances-when-reopen-unreceived-order.cy.js @@ -2,6 +2,7 @@ import { ACQUISITION_METHOD_NAMES_IN_PROFILE, INVOICE_STATUSES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; import BudgetDetails from '../../support/fragments/finance/budgets/budgetDetails'; @@ -95,7 +96,7 @@ 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: [], diff --git a/cypress/e2e/orders/update-encumbrance-after-successful-rollover.cy.js b/cypress/e2e/orders/update-encumbrance-after-successful-rollover.cy.js index 1cc2306936..a4894c9c67 100644 --- a/cypress/e2e/orders/update-encumbrance-after-successful-rollover.cy.js +++ b/cypress/e2e/orders/update-encumbrance-after-successful-rollover.cy.js @@ -1,25 +1,29 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; -import { ORDER_STATUSES, ACQUISITION_METHOD_NAMES_IN_PROFILE } from '../../support/constants'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; import LedgerRollovers from '../../support/fragments/finance/ledgers/ledgerRollovers'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import { OrderLineDetails } from '../../support/fragments/orders'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 InteractorsTools from '../../support/utils/interactorsTools'; import { CodeTools, DateTools, StringTools } from '../../support/utils'; -import { OrderLineDetails } from '../../support/fragments/orders'; -import { TransactionDetails } from '../../support/fragments/finance'; +import InteractorsTools from '../../support/utils/interactorsTools'; describe('Orders', () => { const code = CodeTools(4); @@ -109,7 +113,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/user-can-edit-fund-distribution-for-unopened-ongoing-order-with-inactive-budget-in-pol.cy.js b/cypress/e2e/orders/user-can-edit-fund-distribution-for-unopened-ongoing-order-with-inactive-budget-in-pol.cy.js index 6a7af88ef0..9aa05d8327 100644 --- a/cypress/e2e/orders/user-can-edit-fund-distribution-for-unopened-ongoing-order-with-inactive-budget-in-pol.cy.js +++ b/cypress/e2e/orders/user-can-edit-fund-distribution-for-unopened-ongoing-order-with-inactive-budget-in-pol.cy.js @@ -1,22 +1,26 @@ 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 Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; describe('Orders', () => { const testData = { @@ -89,7 +93,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, volumes: [], diff --git a/cypress/e2e/orders/users-added-to-routing-list-from-pol-are-synchronized-with-users-added-via-receiving-title.cy.js b/cypress/e2e/orders/users-added-to-routing-list-from-pol-are-synchronized-with-users-added-via-receiving-title.cy.js index 2c78299fc9..74907e88fa 100644 --- a/cypress/e2e/orders/users-added-to-routing-list-from-pol-are-synchronized-with-users-added-via-receiving-title.cy.js +++ b/cypress/e2e/orders/users-added-to-routing-list-from-pol-are-synchronized-with-users-added-via-receiving-title.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -51,7 +52,7 @@ describe('Orders', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/orders/verify-encumbrance-amount-updates-when-exchange-rate-is-edited-on-open-order.cy.js b/cypress/e2e/orders/verify-encumbrance-amount-updates-when-exchange-rate-is-edited-on-open-order.cy.js index 3fbde2e64f..38c2997ef3 100644 --- a/cypress/e2e/orders/verify-encumbrance-amount-updates-when-exchange-rate-is-edited-on-open-order.cy.js +++ b/cypress/e2e/orders/verify-encumbrance-amount-updates-when-exchange-rate-is-edited-on-open-order.cy.js @@ -1,22 +1,26 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; -import orderLineEditForm from '../../support/fragments/orders/orderLineEditForm'; +import { TransactionDetails } from '../../support/fragments/finance'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; import Funds from '../../support/fragments/finance/funds/funds'; import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderDetails from '../../support/fragments/orders/orderDetails'; import OrderLineDetails from '../../support/fragments/orders/orderLineDetails'; +import orderLineEditForm from '../../support/fragments/orders/orderLineEditForm'; import OrderLines from '../../support/fragments/orders/orderLines'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; 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 { TransactionDetails } from '../../support/fragments/finance'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import Users from '../../support/fragments/users/users'; describe('Orders', () => { @@ -89,7 +93,7 @@ describe('Orders', () => { ], acquisitionMethod: acquisitionMethodId, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: testData.organization.id, }, diff --git a/cypress/e2e/orders/view-acquisition-unit-in-title-not-editable.cy.js b/cypress/e2e/orders/view-acquisition-unit-in-title-not-editable.cy.js index 224586ce37..4745c2669d 100644 --- a/cypress/e2e/orders/view-acquisition-unit-in-title-not-editable.cy.js +++ b/cypress/e2e/orders/view-acquisition-unit-in-title-not-editable.cy.js @@ -1,4 +1,11 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; +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'; @@ -9,9 +16,6 @@ import ReceivingDetails from '../../support/fragments/receiving/receivingDetails 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; describe('Orders', () => { const organization = { ...NewOrganization.defaultUiOrganizations }; @@ -79,7 +83,7 @@ describe('Orders', () => { ], 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: [], diff --git a/cypress/e2e/receiving/create-second-routing-list-for-receiving-title-with-quantitymore1.cy.js b/cypress/e2e/receiving/create-second-routing-list-for-receiving-title-with-quantitymore1.cy.js index 28801a1229..1ebc57313d 100644 --- a/cypress/e2e/receiving/create-second-routing-list-for-receiving-title-with-quantitymore1.cy.js +++ b/cypress/e2e/receiving/create-second-routing-list-for-receiving-title-with-quantitymore1.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -53,7 +54,7 @@ describe('Receiving', () => { locations: [{ locationId: locationResp.id, quantity: 2, quantityPhysical: 2 }], acquisitionMethod: params.body.acquisitionMethods[0].id, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: mtypes.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/receiving/delete-routing-list-from-receiving-app.cy.js b/cypress/e2e/receiving/delete-routing-list-from-receiving-app.cy.js index d6023fa3a4..78d1cf97a4 100644 --- a/cypress/e2e/receiving/delete-routing-list-from-receiving-app.cy.js +++ b/cypress/e2e/receiving/delete-routing-list-from-receiving-app.cy.js @@ -3,6 +3,7 @@ import { APPLICATION_NAMES, LOCATION_NAMES, ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, } from '../../support/constants'; import Permissions from '../../support/dictionary/permissions'; import { @@ -52,7 +53,7 @@ describe('Receiving', () => { locations: [{ locationId: locationResp.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.id, materialSupplier: responseOrganizations, volumes: [], diff --git a/cypress/e2e/receiving/leaving-display-to-public-false-with-checked-display-on-holdings-option-when-receiving-a-piece.cy.js b/cypress/e2e/receiving/leaving-display-to-public-false-with-checked-display-on-holdings-option-when-receiving-a-piece.cy.js index 44f657c505..dd687e7e14 100644 --- a/cypress/e2e/receiving/leaving-display-to-public-false-with-checked-display-on-holdings-option-when-receiving-a-piece.cy.js +++ b/cypress/e2e/receiving/leaving-display-to-public-false-with-checked-display-on-holdings-option-when-receiving-a-piece.cy.js @@ -1,24 +1,28 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; -import getRandomPostfix from '../../support/utils/stringTools'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; -import TopMenu from '../../support/fragments/topMenu'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Users from '../../support/fragments/users/users'; import Funds from '../../support/fragments/finance/funds/funds'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import HoldingsRecordView from '../../support/fragments/inventory/holdingsRecordView'; +import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Organizations from '../../support/fragments/organizations/organizations'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; -import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; +import Organizations from '../../support/fragments/organizations/organizations'; import Receiving from '../../support/fragments/receiving/receiving'; -import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; -import HoldingsRecordView from '../../support/fragments/inventory/holdingsRecordView'; +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('Receiving', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -96,7 +100,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/making-display-to-public-checkbox-visible-on-holdings-for-already-received-piece-with-display-on-holdings-false.cy.js b/cypress/e2e/receiving/making-display-to-public-checkbox-visible-on-holdings-for-already-received-piece-with-display-on-holdings-false.cy.js index cf5bc429f6..36ecab4146 100644 --- a/cypress/e2e/receiving/making-display-to-public-checkbox-visible-on-holdings-for-already-received-piece-with-display-on-holdings-false.cy.js +++ b/cypress/e2e/receiving/making-display-to-public-checkbox-visible-on-holdings-for-already-received-piece-with-display-on-holdings-false.cy.js @@ -1,25 +1,29 @@ +import { + ACQUISITION_METHOD_NAMES_IN_PROFILE, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../support/constants'; import permissions from '../../support/dictionary/permissions'; -import getRandomPostfix from '../../support/utils/stringTools'; +import Budgets from '../../support/fragments/finance/budgets/budgets'; import FiscalYears from '../../support/fragments/finance/fiscalYears/fiscalYears'; -import TopMenu from '../../support/fragments/topMenu'; -import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; -import Users from '../../support/fragments/users/users'; import Funds from '../../support/fragments/finance/funds/funds'; +import Ledgers from '../../support/fragments/finance/ledgers/ledgers'; +import HoldingsRecordView from '../../support/fragments/inventory/holdingsRecordView'; +import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; +import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../support/fragments/orders/newOrder'; -import Orders from '../../support/fragments/orders/orders'; import OrderLines from '../../support/fragments/orders/orderLines'; -import Organizations from '../../support/fragments/organizations/organizations'; +import Orders from '../../support/fragments/orders/orders'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; -import ServicePoints from '../../support/fragments/settings/tenant/servicePoints/servicePoints'; -import NewLocation from '../../support/fragments/settings/tenant/locations/newLocation'; -import Budgets from '../../support/fragments/finance/budgets/budgets'; -import { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; -import BasicOrderLine from '../../support/fragments/orders/basicOrderLine'; -import MaterialTypes from '../../support/fragments/settings/inventory/materialTypes'; +import Organizations from '../../support/fragments/organizations/organizations'; import Receiving from '../../support/fragments/receiving/receiving'; -import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; -import HoldingsRecordView from '../../support/fragments/inventory/holdingsRecordView'; +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 TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import Users from '../../support/fragments/users/users'; +import getRandomPostfix from '../../support/utils/stringTools'; describe('Receiving', () => { const firstFiscalYear = { ...FiscalYears.defaultUiFiscalYear }; @@ -97,7 +101,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-add-acq-units-to-new-titles.cy.js b/cypress/e2e/receiving/user-add-acq-units-to-new-titles.cy.js index acf222ef24..9c0905b565 100644 --- a/cypress/e2e/receiving/user-add-acq-units-to-new-titles.cy.js +++ b/cypress/e2e/receiving/user-add-acq-units-to-new-titles.cy.js @@ -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'; @@ -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'; @@ -123,7 +127,7 @@ describe('Receiving', () => { 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: [], diff --git a/cypress/e2e/receiving/user-in-acq-unit-cannot-add-acq-unit-to-new-title-without-assign-permission.cy.js b/cypress/e2e/receiving/user-in-acq-unit-cannot-add-acq-unit-to-new-title-without-assign-permission.cy.js index 9e82e49965..50b5b6ede6 100644 --- a/cypress/e2e/receiving/user-in-acq-unit-cannot-add-acq-unit-to-new-title-without-assign-permission.cy.js +++ b/cypress/e2e/receiving/user-in-acq-unit-cannot-add-acq-unit-to-new-title-without-assign-permission.cy.js @@ -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'; @@ -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'; @@ -100,7 +104,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-in-acq-unit-cannot-edit-acq-unit-of-title-without-manage-permission.cy.js b/cypress/e2e/receiving/user-in-acq-unit-cannot-edit-acq-unit-of-title-without-manage-permission.cy.js index 768731bdd7..1a12f76875 100644 --- a/cypress/e2e/receiving/user-in-acq-unit-cannot-edit-acq-unit-of-title-without-manage-permission.cy.js +++ b/cypress/e2e/receiving/user-in-acq-unit-cannot-edit-acq-unit-of-title-without-manage-permission.cy.js @@ -1,5 +1,12 @@ 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 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'; @@ -11,9 +18,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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import InteractorsTools from '../../support/utils/interactorsTools'; import getRandomPostfix from '../../support/utils/stringTools'; @@ -108,7 +112,7 @@ describe('Receiving', () => { 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: [], diff --git a/cypress/e2e/receiving/user-included-in-acq-unit-can-assign-acq-unit-to-title-in-receiving.cy.js b/cypress/e2e/receiving/user-included-in-acq-unit-can-assign-acq-unit-to-title-in-receiving.cy.js index 3bd3768e6a..c34787b02a 100644 --- a/cypress/e2e/receiving/user-included-in-acq-unit-can-assign-acq-unit-to-title-in-receiving.cy.js +++ b/cypress/e2e/receiving/user-included-in-acq-unit-can-assign-acq-unit-to-title-in-receiving.cy.js @@ -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'; @@ -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'; @@ -110,7 +114,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-included-only-in-acq-unit-for-order-cannot-receive-piece-with-different-acq-unit.cy.js b/cypress/e2e/receiving/user-included-only-in-acq-unit-for-order-cannot-receive-piece-with-different-acq-unit.cy.js index 38effb3d5a..0a21ae82c1 100644 --- a/cypress/e2e/receiving/user-included-only-in-acq-unit-for-order-cannot-receive-piece-with-different-acq-unit.cy.js +++ b/cypress/e2e/receiving/user-included-only-in-acq-unit-for-order-cannot-receive-piece-with-different-acq-unit.cy.js @@ -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 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -102,7 +106,7 @@ describe('Receiving', () => { 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: [], diff --git a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-able-to-receive-piece-having-acq-unit-in-related-order.cy.js b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-able-to-receive-piece-having-acq-unit-in-related-order.cy.js index e578082907..03f9c35f38 100644 --- a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-able-to-receive-piece-having-acq-unit-in-related-order.cy.js +++ b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-able-to-receive-piece-having-acq-unit-in-related-order.cy.js @@ -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 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -85,7 +89,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-delayed-status.cy.js b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-delayed-status.cy.js index 182f173547..3f10892b7b 100644 --- a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-delayed-status.cy.js +++ b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-delayed-status.cy.js @@ -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 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -89,7 +93,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-sent-status.cy.js b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-sent-status.cy.js index 6345a6c5c8..6efcd0dad2 100644 --- a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-sent-status.cy.js +++ b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-claim-sent-status.cy.js @@ -1,21 +1,25 @@ 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 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import DeletePieceModal from '../../support/fragments/receiving/modals/deletePieceModal'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; -import DeletePieceModal from '../../support/fragments/receiving/modals/deletePieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -91,7 +95,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-unreceivable-status.cy.js b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-unreceivable-status.cy.js index 89261c3ff7..1c6a55d483 100644 --- a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-unreceivable-status.cy.js +++ b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-move-piece-having-acq-unit-in-unreceivable-status.cy.js @@ -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 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -89,7 +93,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-unreceive-piece-having-acq-unit.cy.js b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-unreceive-piece-having-acq-unit.cy.js index e6219c49ed..e823758ae3 100644 --- a/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-unreceive-piece-having-acq-unit.cy.js +++ b/cypress/e2e/receiving/user-not-included-in-acq-unit-is-not-able-to-unreceive-piece-having-acq-unit.cy.js @@ -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 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 { ACQUISITION_METHOD_NAMES_IN_PROFILE, ORDER_STATUSES } from '../../support/constants'; import getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -89,7 +93,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/receiving/user-without-assigned-acq-unit-can-delete-piece-with-acq-unit.cy.js b/cypress/e2e/receiving/user-without-assigned-acq-unit-can-delete-piece-with-acq-unit.cy.js index 281c148760..490bb7aba6 100644 --- a/cypress/e2e/receiving/user-without-assigned-acq-unit-can-delete-piece-with-acq-unit.cy.js +++ b/cypress/e2e/receiving/user-without-assigned-acq-unit-can-delete-piece-with-acq-unit.cy.js @@ -1,22 +1,26 @@ 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'; import NewOrganization from '../../support/fragments/organizations/newOrganization'; import Organizations from '../../support/fragments/organizations/organizations'; +import DeletePieceModal from '../../support/fragments/receiving/modals/deletePieceModal'; +import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; import Receiving from '../../support/fragments/receiving/receiving'; import ReceivingDetails from '../../support/fragments/receiving/receivingDetails'; 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 getRandomPostfix from '../../support/utils/stringTools'; -import EditPieceModal from '../../support/fragments/receiving/modals/editPieceModal'; -import DeletePieceModal from '../../support/fragments/receiving/modals/deletePieceModal'; describe('Receiving', () => { describe('Acquisition units', () => { @@ -91,7 +95,7 @@ describe('Receiving', () => { ], 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: [], diff --git a/cypress/e2e/settings/data-import/check-contributor-type-mappings.cy.js b/cypress/e2e/settings/data-import/check-contributor-type-mappings.cy.js index 45e830f080..a11d6e7604 100644 --- a/cypress/e2e/settings/data-import/check-contributor-type-mappings.cy.js +++ b/cypress/e2e/settings/data-import/check-contributor-type-mappings.cy.js @@ -1,4 +1,9 @@ -import { APPLICATION_NAMES, JOB_STATUS_NAMES, ORDER_STATUSES } from '../../../support/constants'; +import { + APPLICATION_NAMES, + JOB_STATUS_NAMES, + ORDER_STATUSES, + POL_CREATE_INVENTORY_SETTINGS, +} from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; import DataImport from '../../../support/fragments/data_import/dataImport'; import DataImportJobProfiles from '../../../support/fragments/data_import/job_profiles/jobProfiles'; @@ -53,7 +58,7 @@ describe('Data Import', () => { currency: 'USD', }, physicalResourceDetails: { - createInventory: 'Instance', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE, }, }, }, diff --git a/cypress/e2e/settings/orders/acquisition-method-delete-only.cy.js b/cypress/e2e/settings/orders/acquisition-method-delete-only.cy.js index 7f8180d918..7af0400659 100644 --- a/cypress/e2e/settings/orders/acquisition-method-delete-only.cy.js +++ b/cypress/e2e/settings/orders/acquisition-method-delete-only.cy.js @@ -1,16 +1,17 @@ import { v4 as uuid } from 'uuid'; -import AcquisitionMethods from '../../../support/fragments/settings/orders/acquisitionMethods'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; +import { POL_CREATE_INVENTORY_SETTINGS } from '../../../support/constants'; import permissions from '../../../support/dictionary/permissions'; -import Users from '../../../support/fragments/users/users'; +import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; import NewOrder from '../../../support/fragments/orders/newOrder'; -import Orders from '../../../support/fragments/orders/orders'; import OrderLines from '../../../support/fragments/orders/orderLines'; -import BasicOrderLine from '../../../support/fragments/orders/basicOrderLine'; +import Orders from '../../../support/fragments/orders/orders'; import NewOrganization from '../../../support/fragments/organizations/newOrganization'; import Organizations from '../../../support/fragments/organizations/organizations'; +import AcquisitionMethods from '../../../support/fragments/settings/orders/acquisitionMethods'; import NewLocation from '../../../support/fragments/settings/tenant/locations/newLocation'; import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; +import SettingsMenu from '../../../support/fragments/settingsMenu'; +import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; describe('Orders', () => { @@ -57,7 +58,7 @@ describe('Orders', () => { poLineEstimatedPrice: 10.0, }, physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: materialTypeId, materialSupplier: vendorId, volumes: [], diff --git a/cypress/support/fragments/orders/basicOrderLine.js b/cypress/support/fragments/orders/basicOrderLine.js index 5ba76fe4d1..595827f817 100644 --- a/cypress/support/fragments/orders/basicOrderLine.js +++ b/cypress/support/fragments/orders/basicOrderLine.js @@ -1,4 +1,5 @@ import uuid from 'uuid'; +import { POL_CREATE_INVENTORY_SETTINGS } from '../../constants'; import getRandomPostfix from '../../utils/stringTools'; import MaterialTypes from '../settings/inventory/materialTypes'; @@ -136,7 +137,7 @@ export default { orderFormat: 'Physical Resource', paymentStatus: 'Pending', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: '', materialSupplier: '', volumes: [], diff --git a/cypress/support/fragments/orders/enchancedOrderLine.js b/cypress/support/fragments/orders/enchancedOrderLine.js index 3f9f2936e2..dff0312bf0 100644 --- a/cypress/support/fragments/orders/enchancedOrderLine.js +++ b/cypress/support/fragments/orders/enchancedOrderLine.js @@ -1,4 +1,5 @@ import uuid from 'uuid'; +import { POL_CREATE_INVENTORY_SETTINGS } from '../../constants'; import getRandomPostfix from '../../utils/stringTools'; export default { @@ -44,7 +45,7 @@ export default { orderFormat: 'Physical Resource', paymentStatus: 'Pending', physical: { - createInventory: 'Instance, Holding, Item', + createInventory: POL_CREATE_INVENTORY_SETTINGS.INSTANCE_HOLDING_ITEM, materialType: '', materialSupplier: '', volumes: ['testvol1'],