From 7451e5d77611dd250c7678bdc769b20993969ab6 Mon Sep 17 00:00:00 2001 From: Tetiana_Paranich Date: Wed, 21 Aug 2024 11:58:31 +0300 Subject: [PATCH 1/2] added material types --- ...pdate-instance-holdings-item-via-vrn.cy.js | 21 ++++++++++--------- ...-pe-mix-with-instance-holdings-items.cy.js | 12 ++++------- ...s-for-electronic-resource-open-order.cy.js | 10 +++++---- ...ngs-for-physical-resource-open-order.cy.js | 10 +++++---- ...rC388570.mrc => marcBibFileForC388570.mrc} | 0 ...rC388571.mrc => marcBibFileForC388571.mrc} | 0 6 files changed, 27 insertions(+), 26 deletions(-) rename cypress/fixtures/{marcFileForC388570.mrc => marcBibFileForC388570.mrc} (100%) rename cypress/fixtures/{marcFileForC388571.mrc => marcBibFileForC388571.mrc} (100%) diff --git a/cypress/e2e/data-import/importing-marc-bib-files/import-with-2-submatches-for-update-instance-holdings-item-via-vrn.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/import-with-2-submatches-for-update-instance-holdings-item-via-vrn.cy.js index d25661c841..e335b0faec 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/import-with-2-submatches-for-update-instance-holdings-item-via-vrn.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/import-with-2-submatches-for-update-instance-holdings-item-via-vrn.cy.js @@ -70,7 +70,8 @@ describe('Data Import', () => { physicalUnitPrice: '"20"', quantityPhysical: '"1"', currency: 'USD', - locationName: '"Main Library (KU/CC/DI/M)"', + materialType: MATERIAL_TYPE_NAMES.BOOK, + locationName: `"${LOCATION_NAMES.MAIN_LIBRARY}"`, locationQuantityPhysical: '"1"', }, actionProfile: { @@ -82,7 +83,7 @@ describe('Data Import', () => { mappingProfile: { typeValue: FOLIO_RECORD_TYPE.HOLDINGS, name: `C451467 Create simple holdings ${getRandomPostfix()}`, - permanentLocation: `"${LOCATION_NAMES.ANNEX}"`, + permanentLocation: `"${LOCATION_NAMES.MAIN_LIBRARY}"`, }, actionProfile: { typeValue: FOLIO_RECORD_TYPE.HOLDINGS, @@ -93,7 +94,7 @@ describe('Data Import', () => { mappingProfile: { typeValue: FOLIO_RECORD_TYPE.ITEM, name: `C451467 Create simple item${getRandomPostfix()}`, - materialType: `"${MATERIAL_TYPE_NAMES.ELECTRONIC_RESOURCE}"`, + materialType: `"${MATERIAL_TYPE_NAMES.BOOK}"`, permanentLoanType: LOAN_TYPE_NAMES.CAN_CIRCULATE, status: ITEM_STATUS_NAMES.AVAILABLE, }, @@ -248,13 +249,13 @@ describe('Data Import', () => { NewJobProfile.saveAndClose(); JobProfiles.checkJobProfilePresented(jobProfileForCreate.profileName); - DataImport.uploadFileViaApi( - testData.editedMarcFileName, - testData.marcFileNameForCreate, - jobProfileForCreate.profileName, - ).then((response) => { - instanceId = response[0].instance.id; - }); + cy.visit(TopMenu.dataImportPath); + DataImport.verifyUploadState(); + DataImport.checkIsLandingPageOpened(); + DataImport.uploadFile(testData.filePath, testData.marcFileNameForCreate); + JobProfiles.waitFileIsUploaded(); + JobProfiles.search(jobProfileForCreate.profileName); + JobProfiles.runImportFile(); cy.createTempUser([ Permissions.settingsDataImportEnabled.gui, diff --git a/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js index 1a92641526..73ec85c066 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js @@ -60,6 +60,8 @@ describe('Data Import', () => { currency: 'USD', electronicUnitPrice: '"25"', quantityElectronic: '"1"', + materialType: MATERIAL_TYPE_NAMES.BOOK, + materialTypeElectronic: MATERIAL_TYPE_NAMES.BOOK, locationName: `"${LOCATION_NAMES.ANNEX}"`, locationQuantityPhysical: '"1"', locationQuantityElectronic: '"1"', @@ -73,8 +75,8 @@ describe('Data Import', () => { mappingProfile: { name: `C380446 Create simple holdings for open order ${getRandomPostfix()}`, typeValue: FOLIO_RECORD_TYPE.HOLDINGS, - permanentLocation: `"${LOCATION_NAMES.MAIN_LIBRARY}"`, - permanentLocationUI: LOCATION_NAMES.MAIN_LIBRARY_UI, + permanentLocation: `"${LOCATION_NAMES.ANNEX}"`, + permanentLocationUI: LOCATION_NAMES.ANNEX_UI, }, actionProfile: { typeValue: FOLIO_RECORD_TYPE.HOLDINGS, @@ -145,12 +147,6 @@ describe('Data Import', () => { FieldMappingProfiles.createOrderMappingProfile( collectionOfMappingAndActionProfiles[0].mappingProfile, ); - FieldMappingProfiles.checkMappingProfilePresented( - collectionOfMappingAndActionProfiles[0].mappingProfile.name, - ); - FieldMappingProfileView.closeViewMode( - collectionOfMappingAndActionProfiles[0].mappingProfile.name, - ); FieldMappingProfiles.openNewMappingProfileForm(); NewFieldMappingProfile.fillSummaryInMappingProfile( diff --git a/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-electronic-resource-open-order.cy.js b/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-electronic-resource-open-order.cy.js index eb760b8fad..3246df70a4 100644 --- a/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-electronic-resource-open-order.cy.js +++ b/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-electronic-resource-open-order.cy.js @@ -10,6 +10,7 @@ import { ORDER_STATUSES, RECORD_STATUSES, VENDOR_NAMES, + MATERIAL_TYPE_NAMES, } from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; import ActionProfiles from '../../../support/fragments/data_import/action_profiles/actionProfiles'; @@ -40,7 +41,7 @@ describe('Data Import', () => { let user; let orderNumber; let instanceHRID; - const filePathForCreate = 'marcFileForC388571.mrc'; + const filePathForCreate = 'marcBibFileForC388571.mrc'; const marcFileName = `C388571 autotestFileName${getRandomPostfix()}.mrc`; const arrayOfHoldingsStatuses = ['Created (E)', 'Created (KU/CC/DI/M)', 'Created (KU/CC/DI/A)']; const quantityOfCreatedHoldings = 3; @@ -65,7 +66,8 @@ describe('Data Import', () => { currency: 'USD', electronicUnitPrice: '"25"', quantityElectronic: '"1"', - locationName: `"${LOCATION_NAMES.ANNEX}"`, + materialTypeElectronic: MATERIAL_TYPE_NAMES.BOOK, + locationName: '945$h', locationQuantityElectronic: '"1"', }, actionProfile: { @@ -88,7 +90,7 @@ describe('Data Import', () => { mappingProfile: { typeValue: FOLIO_RECORD_TYPE.ITEM, name: `C388571 Test multiple items.${getRandomPostfix()}`, - materialType: '945$a', + materialType: `"${MATERIAL_TYPE_NAMES.BOOK}"`, permanentLoanType: LOAN_TYPE_NAMES.CAN_CIRCULATE, status: ITEM_STATUS_NAMES.ON_ORDER, }, @@ -144,7 +146,7 @@ describe('Data Import', () => { it( 'C388571 Check the log result table for imported multiple items and holdings for Electronic resource open order (folijet)', - { tags: ['criticalPathBroken', 'folijet'] }, + { tags: ['criticalPath', 'folijet'] }, () => { // create mapping profiles FieldMappingProfiles.createOrderMappingProfile( diff --git a/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-physical-resource-open-order.cy.js b/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-physical-resource-open-order.cy.js index 76c07dc8a2..c6f30bdbce 100644 --- a/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-physical-resource-open-order.cy.js +++ b/cypress/e2e/data-import/log-details/log-result-table-for-imported-multiple-items-and-holdings-for-physical-resource-open-order.cy.js @@ -10,6 +10,7 @@ import { ORDER_STATUSES, RECORD_STATUSES, VENDOR_NAMES, + MATERIAL_TYPE_NAMES, } from '../../../support/constants'; import { Permissions } from '../../../support/dictionary'; import ActionProfiles from '../../../support/fragments/data_import/action_profiles/actionProfiles'; @@ -40,7 +41,7 @@ describe('Data Import', () => { let user; let orderNumber; let instanceHRID; - const filePathForCreate = 'marcFileForC388570.mrc'; + const filePathForCreate = 'marcBibFileForC388570.mrc'; const marcFileName = `C388570 autotestFileName${getRandomPostfix()}.mrc`; const arrayOfHoldingsStatuses = ['Created (KU/CC/DI/M)', 'Created (E)', 'Created (KU/CC/DI/A)']; const quantityOfCreatedHoldings = 3; @@ -65,7 +66,8 @@ describe('Data Import', () => { physicalUnitPrice: '"20"', quantityPhysical: '"1"', currency: 'USD', - locationName: `"${LOCATION_NAMES.ANNEX}"`, + materialType: MATERIAL_TYPE_NAMES.BOOK, + locationName: '945$h', locationQuantityPhysical: '"1"', }, actionProfile: { @@ -88,7 +90,7 @@ describe('Data Import', () => { mappingProfile: { typeValue: FOLIO_RECORD_TYPE.ITEM, name: `C388570 Test multiple items.${getRandomPostfix()}`, - materialType: '945$a', + materialType: `"${MATERIAL_TYPE_NAMES.BOOK}"`, permanentLoanType: LOAN_TYPE_NAMES.CAN_CIRCULATE, status: ITEM_STATUS_NAMES.ON_ORDER, }, @@ -144,7 +146,7 @@ describe('Data Import', () => { it( 'C388570 Check the log result table for imported multiple items and holdings for Physical resource open order (folijet)', - { tags: ['criticalPathBroken', 'folijet'] }, + { tags: ['criticalPath', 'folijet'] }, () => { // create mapping profiles FieldMappingProfiles.createOrderMappingProfile( diff --git a/cypress/fixtures/marcFileForC388570.mrc b/cypress/fixtures/marcBibFileForC388570.mrc similarity index 100% rename from cypress/fixtures/marcFileForC388570.mrc rename to cypress/fixtures/marcBibFileForC388570.mrc diff --git a/cypress/fixtures/marcFileForC388571.mrc b/cypress/fixtures/marcBibFileForC388571.mrc similarity index 100% rename from cypress/fixtures/marcFileForC388571.mrc rename to cypress/fixtures/marcBibFileForC388571.mrc From e98d35e3e6908b3c682f9ee05664ccb100cf4877 Mon Sep 17 00:00:00 2001 From: Tetiana_Paranich Date: Wed, 16 Oct 2024 19:11:26 +0300 Subject: [PATCH 2/2] added material type --- ...pen-order-pe-mix-with-instance-holdings-items.cy.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js index 7433ee0ed9..b4b75c3b7f 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/mrc-import-create-open-order-pe-mix-with-instance-holdings-items.cy.js @@ -63,12 +63,12 @@ describe('Data Import', () => { quantityPhysical: '"1"', materialType: MATERIAL_TYPE_NAMES.BOOK, currency: 'USD', - electronicUnitPrice: '"25"', - quantityElectronic: '"1"', - materialTypeElectronic: MATERIAL_TYPE_NAMES.BOOK, locationName: `"${LOCATION_NAMES.ANNEX}"`, locationQuantityPhysical: '"1"', locationQuantityElectronic: '"1"', + electronicUnitPrice: '"25"', + quantityElectronic: '"1"', + materialTypeElectronic: MATERIAL_TYPE_NAMES.BOOK, }, actionProfile: { typeValue: FOLIO_RECORD_TYPE.ORDER, @@ -233,11 +233,11 @@ describe('Data Import', () => { instanceHrid = initialInstanceHrId; }); InstanceRecordView.verifyHotlinkToPOL(polNumber); - InstanceRecordView.verifyIsHoldingsCreated([`${LOCATION_NAMES.MAIN_LIBRARY_UI} >`]); + InstanceRecordView.verifyIsHoldingsCreated([`${LOCATION_NAMES.ANNEX_UI} >`]); InventoryInstance.openHoldingView(); HoldingsRecordView.checkHoldingRecordViewOpened(); HoldingsRecordView.close(); - InventoryInstance.openHoldingsAccordion(`${LOCATION_NAMES.MAIN_LIBRARY_UI} >`); + InventoryInstance.openHoldingsAccordion(`${LOCATION_NAMES.ANNEX_UI} >`); InventoryInstance.openItemByBarcode('No barcode'); ItemRecordView.waitLoading(); ItemRecordView.checkHotlinksToCreatedPOL(polNumber);