Skip to content

Commit

Permalink
Merge branch 'master' into FAT-13501_4
Browse files Browse the repository at this point in the history
  • Loading branch information
sviatlana-stsiapanava committed May 24, 2024
2 parents 8528556 + 24144dd commit 87ec7d5
Show file tree
Hide file tree
Showing 153 changed files with 2,580 additions and 2,115 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ACCEPTED_DATA_TYPE_NAMES,
ACTION_NAMES_IN_ACTION_PROFILE,
EXISTING_RECORDS_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
RECORD_STATUSES,
DEFAULT_JOB_PROFILE_NAMES,
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_AUTHORITY,
recordType: EXISTING_RECORD_NAMES.MARC_AUTHORITY,
};
const jobProfile = {
...NewJobProfile.defaultJobProfile,
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('Data Import', () => {

cy.loginAsAdmin();
// create Match profile
NewMatchProfile.createMatchProfileViaApiMarc(matchProfile);
NewMatchProfile.createMatchProfileWithIncomingAndExistingRecordsViaApi(matchProfile);

// create Field mapping profile
NewFieldMappingProfile.createMappingProfileForUpdateMarcAuthViaApi(mappingProfile);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORDS_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
JOB_STATUS_NAMES,
} from '../../../../support/constants';
Expand Down Expand Up @@ -75,7 +75,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C411794 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -94,7 +93,7 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C411794 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;

Expand Down Expand Up @@ -126,7 +125,7 @@ describe('Data Import', () => {
]);
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
EXISTING_RECORD_NAMES,
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORDS_NAMES,
FOLIO_RECORD_TYPE,
JOB_STATUS_NAMES,
} from '../../../../support/constants';
Expand Down Expand Up @@ -74,7 +74,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C405531 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -93,15 +92,15 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C405531 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;

before('Create test data', () => {
cy.getAdminToken();
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down Expand Up @@ -153,6 +152,9 @@ describe('Data Import', () => {
});

after('Delete test data', () => {
// delete created files in fixtures
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.exportedFileName}`);
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.modifiedMarcFile}`);
cy.resetTenant();
cy.getAdminToken();
Users.deleteViaApi(testData.user.userId);
Expand All @@ -161,9 +163,6 @@ describe('Data Import', () => {
SettingsMatchProfiles.deleteMatchProfileByNameViaApi(matchProfile.profileName);
SettingsActionProfiles.deleteActionProfileByNameViaApi(actionProfile.name);
SettingsFieldMappingProfiles.deleteMappingProfileByNameViaApi(mappingProfile.name);
// delete created files in fixtures
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.exportedFileName}`);
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.modifiedMarcFile}`);
});

it(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORDS_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
JOB_STATUS_NAMES,
} from '../../../../support/constants';
Expand Down Expand Up @@ -73,7 +73,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C405532 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -92,7 +91,7 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C405532 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;

Expand Down Expand Up @@ -140,7 +139,7 @@ describe('Data Import', () => {
cy.setTenant(Affiliations.College);
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
import {
EXISTING_RECORDS_NAMES,
FOLIO_RECORD_TYPE,
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
import Permissions from '../../../../support/dictionary/permissions';
import NewJobProfile from '../../../../support/fragments/data_import/job_profiles/newJobProfile';
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances';
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter';
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager';
import TopMenu from '../../../../support/fragments/topMenu';
import Users from '../../../../support/fragments/users/users';
import getRandomPostfix from '../../../../support/utils/stringTools';
import ExportFile from '../../../../support/fragments/data-export/exportFile';
import NewActionProfile from '../../../../support/fragments/data_import/action_profiles/newActionProfile';
import DataImport from '../../../../support/fragments/data_import/dataImport';
import JobProfiles from '../../../../support/fragments/data_import/job_profiles/jobProfiles';
import NewJobProfile from '../../../../support/fragments/data_import/job_profiles/newJobProfile';
import Logs from '../../../../support/fragments/data_import/logs/logs';
import NewFieldMappingProfile from '../../../../support/fragments/data_import/mapping_profiles/newFieldMappingProfile';
import FileManager from '../../../../support/utils/fileManager';
import InventoryHoldings from '../../../../support/fragments/inventory/holdings/inventoryHoldings';
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance';
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances';
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter';
import InventoryViewSource from '../../../../support/fragments/inventory/inventoryViewSource';
import MarcAuthorities from '../../../../support/fragments/marcAuthority/marcAuthorities';
import MarcAuthority from '../../../../support/fragments/marcAuthority/marcAuthority';
import QuickMarcEditor from '../../../../support/fragments/quickMarcEditor';
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager';
import {
JobProfiles as SettingsJobProfiles,
MatchProfiles as SettingsMatchProfiles,
ActionProfiles as SettingsActionProfiles,
FieldMappingProfiles as SettingsFieldMappingProfiles,
JobProfiles as SettingsJobProfiles,
MatchProfiles as SettingsMatchProfiles,
} from '../../../../support/fragments/settings/dataImport';
import InventoryViewSource from '../../../../support/fragments/inventory/inventoryViewSource';
import NewMatchProfile from '../../../../support/fragments/settings/dataImport/matchProfiles/newMatchProfile';
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance';
import MarcAuthority from '../../../../support/fragments/marcAuthority/marcAuthority';
import MarcAuthorities from '../../../../support/fragments/marcAuthority/marcAuthorities';
import QuickMarcEditor from '../../../../support/fragments/quickMarcEditor';
import InventoryHoldings from '../../../../support/fragments/inventory/holdings/inventoryHoldings';
import ServicePoints from '../../../../support/fragments/settings/tenant/servicePoints/servicePoints';
import Locations from '../../../../support/fragments/settings/tenant/location-setup/locations';
import ServicePoints from '../../../../support/fragments/settings/tenant/servicePoints/servicePoints';
import TopMenu from '../../../../support/fragments/topMenu';
import Users from '../../../../support/fragments/users/users';
import FileManager from '../../../../support/utils/fileManager';
import getRandomPostfix from '../../../../support/utils/stringTools';

describe('Data Import', () => {
describe('Importing MARC Bib files', () => {
Expand Down Expand Up @@ -112,7 +112,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C411802 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -131,7 +130,7 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C411802 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;
const createdAuthorityIDs = [];
Expand Down Expand Up @@ -213,7 +212,7 @@ describe('Data Import', () => {
.then(() => {
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
import {
EXISTING_RECORDS_NAMES,
FOLIO_RECORD_TYPE,
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
} from '../../../../support/constants';
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations';
import Permissions from '../../../../support/dictionary/permissions';
import NewJobProfile from '../../../../support/fragments/data_import/job_profiles/newJobProfile';
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances';
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter';
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager';
import TopMenu from '../../../../support/fragments/topMenu';
import Users from '../../../../support/fragments/users/users';
import getRandomPostfix from '../../../../support/utils/stringTools';
import ExportFile from '../../../../support/fragments/data-export/exportFile';
import NewActionProfile from '../../../../support/fragments/data_import/action_profiles/newActionProfile';
import DataImport from '../../../../support/fragments/data_import/dataImport';
import JobProfiles from '../../../../support/fragments/data_import/job_profiles/jobProfiles';
import NewJobProfile from '../../../../support/fragments/data_import/job_profiles/newJobProfile';
import Logs from '../../../../support/fragments/data_import/logs/logs';
import NewFieldMappingProfile from '../../../../support/fragments/data_import/mapping_profiles/newFieldMappingProfile';
import FileManager from '../../../../support/utils/fileManager';
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance';
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances';
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter';
import InventoryViewSource from '../../../../support/fragments/inventory/inventoryViewSource';
import MarcAuthorities from '../../../../support/fragments/marcAuthority/marcAuthorities';
import MarcAuthority from '../../../../support/fragments/marcAuthority/marcAuthority';
import QuickMarcEditor from '../../../../support/fragments/quickMarcEditor';
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager';
import {
JobProfiles as SettingsJobProfiles,
MatchProfiles as SettingsMatchProfiles,
ActionProfiles as SettingsActionProfiles,
FieldMappingProfiles as SettingsFieldMappingProfiles,
JobProfiles as SettingsJobProfiles,
MatchProfiles as SettingsMatchProfiles,
} from '../../../../support/fragments/settings/dataImport';
import InventoryViewSource from '../../../../support/fragments/inventory/inventoryViewSource';
import NewMatchProfile from '../../../../support/fragments/settings/dataImport/matchProfiles/newMatchProfile';
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance';
import MarcAuthority from '../../../../support/fragments/marcAuthority/marcAuthority';
import MarcAuthorities from '../../../../support/fragments/marcAuthority/marcAuthorities';
import QuickMarcEditor from '../../../../support/fragments/quickMarcEditor';
import TopMenu from '../../../../support/fragments/topMenu';
import Users from '../../../../support/fragments/users/users';
import FileManager from '../../../../support/utils/fileManager';
import getRandomPostfix from '../../../../support/utils/stringTools';

describe('Data Import', () => {
describe('Importing MARC Bib files', () => {
Expand Down Expand Up @@ -112,7 +112,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C407696 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -131,7 +130,7 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C407696 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;
const createdAuthorityIDs = [];
Expand Down Expand Up @@ -216,7 +215,7 @@ describe('Data Import', () => {
cy.setTenant(Affiliations.College);
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORDS_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
JOB_STATUS_NAMES,
} from '../../../../support/constants';
Expand Down Expand Up @@ -61,7 +61,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C411795 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -80,15 +79,15 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C411795 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;

before('Create test data', () => {
cy.getAdminToken();
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down Expand Up @@ -157,6 +156,9 @@ describe('Data Import', () => {
});

after('Delete test data', () => {
// delete created files in fixtures
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.exportedFileName}`);
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.modifiedMarcFile}`);
// delete created files in fixtures
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.exportedFileName}`);
FileManager.deleteFile(`cypress/fixtures/${testData.marcFile.modifiedMarcFile}`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
DEFAULT_JOB_PROFILE_NAMES,
EXISTING_RECORDS_NAMES,
EXISTING_RECORD_NAMES,
FOLIO_RECORD_TYPE,
JOB_STATUS_NAMES,
RECORD_STATUSES,
Expand Down Expand Up @@ -59,7 +59,6 @@ describe('Data Import', () => {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
};
const actionProfile = {
typeValue: FOLIO_RECORD_TYPE.MARCBIBLIOGRAPHIC,
name: `C405534 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`,
action: 'UPDATE',
folioRecordType: 'MARC_BIBLIOGRAPHIC',
Expand All @@ -78,15 +77,15 @@ describe('Data Import', () => {
in2: 'f',
subfield: 's',
},
recordType: EXISTING_RECORDS_NAMES.MARC_BIBLIOGRAPHIC,
recordType: EXISTING_RECORD_NAMES.MARC_BIBLIOGRAPHIC,
};
const jobProfileName = `C405534 Update MARC Bib records by matching 999 ff $s subfield value${getRandomPostfix()}`;

before('Create test data', () => {
cy.getAdminToken();
NewFieldMappingProfile.createMappingProfileForUpdateMarcBibViaApi(mappingProfile).then(
(mappingProfileResponse) => {
NewActionProfile.createActionProfileViaApiMarc(
NewActionProfile.createActionProfileViaApi(
actionProfile,
mappingProfileResponse.body.id,
).then((actionProfileResponse) => {
Expand Down
Loading

0 comments on commit 87ec7d5

Please sign in to comment.