From b4f85598a1efd6f7ac2d84d1601a787141b7f4b7 Mon Sep 17 00:00:00 2001 From: Yauhen Viazau Date: Wed, 20 Dec 2023 21:36:57 +0500 Subject: [PATCH 1/2] FAT-10096: Preconditions added --- ...erive-from-shared-marc-bib-in-member.cy.js | 156 ++++++++++++++++++ cypress/fixtures/marcBibFileC402769.mrc | 1 + 2 files changed, 157 insertions(+) create mode 100644 cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js create mode 100644 cypress/fixtures/marcBibFileC402769.mrc diff --git a/cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js b/cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js new file mode 100644 index 0000000000..629742c7fa --- /dev/null +++ b/cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js @@ -0,0 +1,156 @@ +import Permissions from '../../support/dictionary/permissions'; +import Affiliations, { tenantNames } from '../../support/dictionary/affiliations'; +import Users from '../../support/fragments/users/users'; +import TopMenu from '../../support/fragments/topMenu'; +import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; +import TestTypes from '../../support/dictionary/testTypes'; +import DevTeams from '../../support/dictionary/devTeams'; +import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; +import InventoryViewSource from '../../support/fragments/inventory/inventoryViewSource'; +import QuickMarcEditor from '../../support/fragments/quickMarcEditor'; +import ConsortiumManager from '../../support/fragments/settings/consortium-manager/consortium-manager'; +import MarcAuthority from '../../support/fragments/marcAuthority/marcAuthority'; +import DataImport from '../../support/fragments/data_import/dataImport'; +import { JOB_STATUS_NAMES } from '../../support/constants'; +import JobProfiles from '../../support/fragments/data_import/job_profiles/jobProfiles'; +import Logs from '../../support/fragments/data_import/logs/logs'; +import getRandomPostfix from '../../support/utils/stringTools'; + +describe('MARC -> MARC Bibliographic -> Derive MARC bib -> Consortia', () => { + const testData = { + tags: { + // tag245: '245', + // tagLDR: 'LDR', + }, + fieldContents: { + // tag245Content: 'C405547 Created Shared Instance', + // tagLDRContent: '00000naa\\a2200000uu\\4500', + }, + // contributor: 'Dante Alighieri 1265-1321', + instanceTitle: 'C402769 The Riviera house / Natasha Lester.', + }; + + const marcFile = { + marc: 'marcBibFileC402769.mrc', + fileNameImported: `testMarcFileC402769.${getRandomPostfix()}.mrc`, + jobProfileToRun: 'Default - Create instance and SRS MARC Bib', + }; + + const users = {}; + + let createdInstanceID; + + before('Create user, data', () => { + cy.getAdminToken(); + cy.createTempUser([ + Permissions.uiInventoryViewInstances.gui, + Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, + ]) + .then((userProperties) => { + users.userProperties = userProperties; + }) + .then(() => { + cy.assignAffiliationToUser(Affiliations.College, users.userProperties.userId); + cy.assignAffiliationToUser(Affiliations.University, users.userProperties.userId); + cy.setTenant(Affiliations.College); + cy.assignPermissionsToExistingUser(users.userProperties.userId, [ + Permissions.uiInventoryViewInstances.gui, + Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, + Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, + ]); + }) + .then(() => { + cy.setTenant(Affiliations.University); + cy.assignPermissionsToExistingUser(users.userProperties.userId, [ + Permissions.uiInventoryViewInstances.gui, + Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, + Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, + ]); + }) + .then(() => { + cy.resetTenant(); + cy.loginAsAdmin().then(() => { + cy.visit(TopMenu.dataImportPath); + DataImport.verifyUploadState(); + DataImport.uploadFileAndRetry(marcFile.marc, marcFile.fileNameImported); + JobProfiles.waitLoadingList(); + JobProfiles.search(marcFile.jobProfileToRun); + JobProfiles.runImportFile(); + JobProfiles.waitFileIsImported(marcFile.fileNameImported); + Logs.checkStatusOfJobProfile(JOB_STATUS_NAMES.COMPLETED); + Logs.openFileDetails(marcFile.fileNameImported); + Logs.getCreatedItemsID().then((link) => { + createdInstanceID = link.split('/')[5]; + }); + }); + + cy.login(users.userProperties.username, users.userProperties.password, { + path: TopMenu.inventoryPath, + waiter: InventoryInstances.waitContentLoading, + }).then(() => { + ConsortiumManager.switchActiveAffiliation(tenantNames.college); + InventoryInstances.waitContentLoading(); + ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college); + }); + }); + }); + + after('Delete user, data', () => { + cy.resetTenant(); + cy.getAdminToken(); + Users.deleteViaApi(users.userProperties.userId); + InventoryInstance.deleteInstanceViaApi(createdInstanceID); + }); + + it( + 'C402769 Derive new Local MARC bib record from Shared Instance in Member tenant (consortia) (spitfire)', + { tags: [TestTypes.criticalPath, DevTeams.spitfire] }, + () => { + InventoryInstance.searchByTitle(createdInstanceID); + InventoryInstances.selectInstance(); + + InventoryInstance.checkPresentedText(testData.instanceTitle); + + // InventoryInstance.newMarcBibRecord(); + // QuickMarcEditor.updateExistingField( + // testData.tags.tag245, + // `$a ${testData.fieldContents.tag245Content}`, + // ); + // QuickMarcEditor.updateExistingField( + // testData.tags.tagLDR, + // testData.fieldContents.tagLDRContent, + // ); + // MarcAuthority.addNewField(4, newField.tag, newField.content); + // QuickMarcEditor.updateIndicatorValue(newField.tag, '2', 0); + // QuickMarcEditor.updateIndicatorValue(newField.tag, '0', 1); + // QuickMarcEditor.pressSaveAndClose(); + // QuickMarcEditor.checkAfterSaveAndClose(); + // InventoryInstance.getId().then((id) => { + // createdInstanceID.push(id); + // }); + // InventoryInstance.checkPresentedText(testData.fieldContents.tag245Content); + // InventoryInstance.checkExpectedMARCSource(); + // InventoryInstance.checkContributor(testData.contributor); + + // cy.login(users.userBProperties.username, users.userBProperties.password, { + // path: TopMenu.inventoryPath, + // waiter: InventoryInstances.waitContentLoading, + // }); + // ConsortiumManager.switchActiveAffiliation(tenantNames.college); + // InventoryInstance.searchByTitle(testData.fieldContents.tag245Content); + // InventoryInstances.selectInstance(); + // InventoryInstance.verifySharedIcon(); + // InventoryInstance.checkPresentedText(testData.fieldContents.tag245Content); + // InventoryInstance.checkExpectedMARCSource(); + // InventoryInstance.checkContributor(testData.contributor); + + // InventoryInstance.viewSource(); + // InventoryViewSource.contains( + // `\t${testData.tags.tag245}\t \t$a ${testData.fieldContents.tag245Content}`, + // ); + // InventoryViewSource.contains( + // `\t${newField.tag}\t2 0\t$a Dante Alighieri $d 1265-1321 $e Poet, Writer, Philosopher`, + // ); + }, + ); +}); diff --git a/cypress/fixtures/marcBibFileC402769.mrc b/cypress/fixtures/marcBibFileC402769.mrc new file mode 100644 index 0000000000..c8449994f0 --- /dev/null +++ b/cypress/fixtures/marcBibFileC402769.mrc @@ -0,0 +1 @@ +02358cam a2200349 i 4500001001600000008004100016005001700057010001700074020003700091020002700128024001200155040002800167042000800195050002700203082001600230100003700246245004900283250002700332264003200359300002300391336002600414337002800440338002700468500008400495520113700579655003101716655003101747655001901778906004501797925004201842955012401884mgin00017412112210305s2021 nyu 000 1 eng 20221108152823.5 a 2021010625 a9781538717318q(trade paperback) z9781538717301q(ebook) a24722-1 aDLCbengerdacDLCdDLC apcc00aPR9619.4.L48bR59 202100a823/.922231 aLester, Natasha,d1973-eauthor.14aC402769 The Riviera house /cNatasha Lester. aFirst Forever edition. 1aNew York :bForever,c2021. a463 pages ;c21 cm atextbtxt2rdacontent aunmediatedbn2rdamedia avolumebnc2rdacarrier aIncludes Club Car reading group discussion questions and guide (pages 457-463). a"Paris, 1939: The Nazis think Éliane can't understand German. They're wrong. They think she's merely cataloging the art collection in The Louvre while they steal national treasures for their private collections. They have no idea she's carefully decoding their notes to ensure every painting can be recovered after the war. But Éliane is playing a very dangerous game. Does she dare trust the man she once loved, or will he only betray her once again? She can't know for sure...until a visit to a stunning home on the Riviera dramatically changes the course of her life. Present Day: Seventy years after the end of WWII, Remy heads to a home she's mysteriously inherited on the French Riviera, wanting to forget the tragedy that has left her life in shambles and taken away those she loved most. But when she discovers a painting known to have been stolen decades ago, she begins to question everything she ever knew about her heritage. Maybe the Riviera house holds more secrets than she's ready to deal with. Or maybe, to find the answers she needs, she'll have to learn to open her heart once again"--cProvided by publisher. 7aHistorical fiction.2gsafd 7aHistorical fiction.2lcgft 7aNovels.2lcgft a7bcbccorignewd1eecipf20gy-gencatlg0 aacquireb1 shelf copyxpolicy default bxk12 2021-03-05ixk12 2021-03-05 (telework) to CIPaxn18 2021-10-18 1 copy rec'd., to CIP ver.fxk18 2022-07-20 to LOAN \ No newline at end of file From ca8e2ff50f2d988afde93f628126be91498013bb Mon Sep 17 00:00:00 2001 From: Yauhen Viazau Date: Tue, 2 Jan 2024 22:07:54 +0500 Subject: [PATCH 2/2] FAT-10432: steps added --- ...rive-from-shared-marc-bib-in-central.cy.js | 156 ++++++++++++++++++ ...erive-from-shared-marc-bib-in-member.cy.js | 156 ------------------ cypress/fixtures/marcBibFileC402767.mrc | 1 + .../fragments/inventory/inventoryInstance.js | 15 ++ 4 files changed, 172 insertions(+), 156 deletions(-) create mode 100644 cypress/e2e/consortia/derive-from-shared-marc-bib-in-central.cy.js delete mode 100644 cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js create mode 100644 cypress/fixtures/marcBibFileC402767.mrc diff --git a/cypress/e2e/consortia/derive-from-shared-marc-bib-in-central.cy.js b/cypress/e2e/consortia/derive-from-shared-marc-bib-in-central.cy.js new file mode 100644 index 0000000000..770c2aa637 --- /dev/null +++ b/cypress/e2e/consortia/derive-from-shared-marc-bib-in-central.cy.js @@ -0,0 +1,156 @@ +import Permissions from '../../support/dictionary/permissions'; +import Affiliations, { tenantNames } from '../../support/dictionary/affiliations'; +import Users from '../../support/fragments/users/users'; +import TopMenu from '../../support/fragments/topMenu'; +import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; +import TestTypes from '../../support/dictionary/testTypes'; +import DevTeams from '../../support/dictionary/devTeams'; +import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; +import InventoryViewSource from '../../support/fragments/inventory/inventoryViewSource'; +import QuickMarcEditor from '../../support/fragments/quickMarcEditor'; +import ConsortiumManager from '../../support/fragments/settings/consortium-manager/consortium-manager'; +import DataImport from '../../support/fragments/data_import/dataImport'; +import { JOB_STATUS_NAMES } from '../../support/constants'; +import JobProfiles from '../../support/fragments/data_import/job_profiles/jobProfiles'; +import Logs from '../../support/fragments/data_import/logs/logs'; +import getRandomPostfix from '../../support/utils/stringTools'; + +describe('MARC -> MARC Bibliographic -> Derive MARC bib -> Consortia', () => { + const testData = { + tag245: '245', + tag245DerivedContent: '$a C402767 Variations (derived record) / $c Ludwig Van Beethoven.', + tag245EditedContent: + '$a C402767 Variations (derived and edited record) / $c Ludwig Van Beethoven.', + instanceTitle: 'C402767 Variations / Ludwig Van Beethoven.', + instanceDerivedTitle: 'C402767 Variations (derived record) / Ludwig Van Beethoven.', + instanceEditedTitle: 'C402767 Variations (derived and edited record) / Ludwig Van Beethoven.', + deriveSharedPaneheaderText: 'Derive a new shared MARC bib record', + sourceViewSharedText: 'Shared MARC bibliographic record', + }; + + const marcFile = { + marc: 'marcBibFileC402767.mrc', + fileNameImported: `testMarcFileC402767.${getRandomPostfix()}.mrc`, + jobProfileToRun: 'Default - Create instance and SRS MARC Bib', + }; + + const users = {}; + + const createdInstanceIDs = []; + + before('Create user, data', () => { + cy.getAdminToken(); + cy.createTempUser([ + Permissions.uiInventoryViewInstances.gui, + Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, + Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, + ]) + .then((userProperties) => { + users.userProperties = userProperties; + + cy.assignAffiliationToUser(Affiliations.College, users.userProperties.userId); + cy.setTenant(Affiliations.College); + cy.assignPermissionsToExistingUser(users.userProperties.userId, [ + Permissions.uiInventoryViewInstances.gui, + Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, + ]); + }) + .then(() => { + cy.resetTenant(); + cy.loginAsAdmin().then(() => { + cy.visit(TopMenu.dataImportPath); + DataImport.verifyUploadState(); + DataImport.uploadFileAndRetry(marcFile.marc, marcFile.fileNameImported); + JobProfiles.waitLoadingList(); + JobProfiles.search(marcFile.jobProfileToRun); + JobProfiles.runImportFile(); + JobProfiles.waitFileIsImported(marcFile.fileNameImported); + Logs.checkStatusOfJobProfile(JOB_STATUS_NAMES.COMPLETED); + Logs.openFileDetails(marcFile.fileNameImported); + Logs.getCreatedItemsID().then((link) => { + createdInstanceIDs.push(link.split('/')[5]); + }); + }); + + cy.login(users.userProperties.username, users.userProperties.password, { + path: TopMenu.inventoryPath, + waiter: InventoryInstances.waitContentLoading, + }).then(() => { + ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central); + }); + }); + }); + + after('Delete user, data', () => { + cy.resetTenant(); + cy.getAdminToken(); + Users.deleteViaApi(users.userProperties.userId); + createdInstanceIDs.forEach((instanceID) => { + InventoryInstance.deleteInstanceViaApi(instanceID); + }); + }); + + it( + 'C402767 Derive new Shared MARC bib record from Shared Instance in Central tenant (consortia) (spitfire)', + { tags: [TestTypes.criticalPath, DevTeams.spitfire] }, + () => { + cy.visit(`${TopMenu.inventoryPath}/view/${createdInstanceIDs[0]}`); + InventoryInstance.waitLoading(); + InventoryInstance.checkPresentedText(testData.instanceTitle); + + InventoryInstance.deriveNewMarcBib(); + QuickMarcEditor.checkPaneheaderContains(testData.deriveSharedPaneheaderText); + QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245DerivedContent); + QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245DerivedContent); + QuickMarcEditor.pressSaveAndClose(); + QuickMarcEditor.checkAfterSaveAndCloseDerive(); + InventoryInstance.checkSharedTextInDetailView(); + InventoryInstance.checkExpectedMARCSource(); + InventoryInstance.checkPresentedText(testData.instanceDerivedTitle); + InventoryInstance.verifyLastUpdatedSource( + users.userProperties.firstName, + users.userProperties.lastName, + ); + InventoryInstance.verifyLastUpdatedDate(); + InventoryInstance.verifyRecordCreatedSource( + users.userProperties.firstName, + users.userProperties.lastName, + ); + InventoryInstance.getId().then((id) => { + createdInstanceIDs.push(id); + + InventoryInstance.editMarcBibliographicRecord(); + QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245DerivedContent); + QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245EditedContent); + QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245EditedContent); + QuickMarcEditor.pressSaveAndClose(); + QuickMarcEditor.checkAfterSaveAndClose(); + InventoryInstance.checkSharedTextInDetailView(); + InventoryInstance.checkExpectedMARCSource(); + InventoryInstance.checkPresentedText(testData.instanceEditedTitle); + + ConsortiumManager.switchActiveAffiliation(tenantNames.college); + InventoryInstances.waitContentLoading(); + ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college); + + InventoryInstance.searchByTitle(createdInstanceIDs[1]); + InventoryInstances.selectInstance(); + InventoryInstance.checkPresentedText(testData.instanceEditedTitle); + InventoryInstance.checkExpectedMARCSource(); + InventoryInstance.verifyLastUpdatedSource( + users.userProperties.firstName, + users.userProperties.lastName, + ); + InventoryInstance.verifyLastUpdatedDate(); + InventoryInstance.verifyRecordCreatedSource( + users.userProperties.firstName, + users.userProperties.lastName, + ); + + InventoryInstance.viewSource(); + InventoryViewSource.contains(testData.tag245EditedContent); + InventoryViewSource.contains(testData.sourceViewSharedText); + }); + }, + ); +}); diff --git a/cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js b/cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js deleted file mode 100644 index 629742c7fa..0000000000 --- a/cypress/e2e/consortia/derive-from-shared-marc-bib-in-member.cy.js +++ /dev/null @@ -1,156 +0,0 @@ -import Permissions from '../../support/dictionary/permissions'; -import Affiliations, { tenantNames } from '../../support/dictionary/affiliations'; -import Users from '../../support/fragments/users/users'; -import TopMenu from '../../support/fragments/topMenu'; -import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; -import TestTypes from '../../support/dictionary/testTypes'; -import DevTeams from '../../support/dictionary/devTeams'; -import InventoryInstance from '../../support/fragments/inventory/inventoryInstance'; -import InventoryViewSource from '../../support/fragments/inventory/inventoryViewSource'; -import QuickMarcEditor from '../../support/fragments/quickMarcEditor'; -import ConsortiumManager from '../../support/fragments/settings/consortium-manager/consortium-manager'; -import MarcAuthority from '../../support/fragments/marcAuthority/marcAuthority'; -import DataImport from '../../support/fragments/data_import/dataImport'; -import { JOB_STATUS_NAMES } from '../../support/constants'; -import JobProfiles from '../../support/fragments/data_import/job_profiles/jobProfiles'; -import Logs from '../../support/fragments/data_import/logs/logs'; -import getRandomPostfix from '../../support/utils/stringTools'; - -describe('MARC -> MARC Bibliographic -> Derive MARC bib -> Consortia', () => { - const testData = { - tags: { - // tag245: '245', - // tagLDR: 'LDR', - }, - fieldContents: { - // tag245Content: 'C405547 Created Shared Instance', - // tagLDRContent: '00000naa\\a2200000uu\\4500', - }, - // contributor: 'Dante Alighieri 1265-1321', - instanceTitle: 'C402769 The Riviera house / Natasha Lester.', - }; - - const marcFile = { - marc: 'marcBibFileC402769.mrc', - fileNameImported: `testMarcFileC402769.${getRandomPostfix()}.mrc`, - jobProfileToRun: 'Default - Create instance and SRS MARC Bib', - }; - - const users = {}; - - let createdInstanceID; - - before('Create user, data', () => { - cy.getAdminToken(); - cy.createTempUser([ - Permissions.uiInventoryViewInstances.gui, - Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, - ]) - .then((userProperties) => { - users.userProperties = userProperties; - }) - .then(() => { - cy.assignAffiliationToUser(Affiliations.College, users.userProperties.userId); - cy.assignAffiliationToUser(Affiliations.University, users.userProperties.userId); - cy.setTenant(Affiliations.College); - cy.assignPermissionsToExistingUser(users.userProperties.userId, [ - Permissions.uiInventoryViewInstances.gui, - Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, - Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, - ]); - }) - .then(() => { - cy.setTenant(Affiliations.University); - cy.assignPermissionsToExistingUser(users.userProperties.userId, [ - Permissions.uiInventoryViewInstances.gui, - Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, - Permissions.uiQuickMarcQuickMarcEditorDuplicate.gui, - ]); - }) - .then(() => { - cy.resetTenant(); - cy.loginAsAdmin().then(() => { - cy.visit(TopMenu.dataImportPath); - DataImport.verifyUploadState(); - DataImport.uploadFileAndRetry(marcFile.marc, marcFile.fileNameImported); - JobProfiles.waitLoadingList(); - JobProfiles.search(marcFile.jobProfileToRun); - JobProfiles.runImportFile(); - JobProfiles.waitFileIsImported(marcFile.fileNameImported); - Logs.checkStatusOfJobProfile(JOB_STATUS_NAMES.COMPLETED); - Logs.openFileDetails(marcFile.fileNameImported); - Logs.getCreatedItemsID().then((link) => { - createdInstanceID = link.split('/')[5]; - }); - }); - - cy.login(users.userProperties.username, users.userProperties.password, { - path: TopMenu.inventoryPath, - waiter: InventoryInstances.waitContentLoading, - }).then(() => { - ConsortiumManager.switchActiveAffiliation(tenantNames.college); - InventoryInstances.waitContentLoading(); - ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college); - }); - }); - }); - - after('Delete user, data', () => { - cy.resetTenant(); - cy.getAdminToken(); - Users.deleteViaApi(users.userProperties.userId); - InventoryInstance.deleteInstanceViaApi(createdInstanceID); - }); - - it( - 'C402769 Derive new Local MARC bib record from Shared Instance in Member tenant (consortia) (spitfire)', - { tags: [TestTypes.criticalPath, DevTeams.spitfire] }, - () => { - InventoryInstance.searchByTitle(createdInstanceID); - InventoryInstances.selectInstance(); - - InventoryInstance.checkPresentedText(testData.instanceTitle); - - // InventoryInstance.newMarcBibRecord(); - // QuickMarcEditor.updateExistingField( - // testData.tags.tag245, - // `$a ${testData.fieldContents.tag245Content}`, - // ); - // QuickMarcEditor.updateExistingField( - // testData.tags.tagLDR, - // testData.fieldContents.tagLDRContent, - // ); - // MarcAuthority.addNewField(4, newField.tag, newField.content); - // QuickMarcEditor.updateIndicatorValue(newField.tag, '2', 0); - // QuickMarcEditor.updateIndicatorValue(newField.tag, '0', 1); - // QuickMarcEditor.pressSaveAndClose(); - // QuickMarcEditor.checkAfterSaveAndClose(); - // InventoryInstance.getId().then((id) => { - // createdInstanceID.push(id); - // }); - // InventoryInstance.checkPresentedText(testData.fieldContents.tag245Content); - // InventoryInstance.checkExpectedMARCSource(); - // InventoryInstance.checkContributor(testData.contributor); - - // cy.login(users.userBProperties.username, users.userBProperties.password, { - // path: TopMenu.inventoryPath, - // waiter: InventoryInstances.waitContentLoading, - // }); - // ConsortiumManager.switchActiveAffiliation(tenantNames.college); - // InventoryInstance.searchByTitle(testData.fieldContents.tag245Content); - // InventoryInstances.selectInstance(); - // InventoryInstance.verifySharedIcon(); - // InventoryInstance.checkPresentedText(testData.fieldContents.tag245Content); - // InventoryInstance.checkExpectedMARCSource(); - // InventoryInstance.checkContributor(testData.contributor); - - // InventoryInstance.viewSource(); - // InventoryViewSource.contains( - // `\t${testData.tags.tag245}\t \t$a ${testData.fieldContents.tag245Content}`, - // ); - // InventoryViewSource.contains( - // `\t${newField.tag}\t2 0\t$a Dante Alighieri $d 1265-1321 $e Poet, Writer, Philosopher`, - // ); - }, - ); -}); diff --git a/cypress/fixtures/marcBibFileC402767.mrc b/cypress/fixtures/marcBibFileC402767.mrc new file mode 100644 index 0000000000..c2a0b86e55 --- /dev/null +++ b/cypress/fixtures/marcBibFileC402767.mrc @@ -0,0 +1 @@ +03576cjm 2200733 i 4500001001500000008004100015007001500056005001700071035002400088040009000112024001700202028002000219028002300239033003300262035002200295041002300317042000800340050002200348082001900370100005000389240003600439245004800475264003200523264001200555300003800567306001100605336003700616337002300653338003100676344001900707344001900726344001200745347002200757347001300779370004600792386003000838386002600868386003300894386002900927511002600956518006500982546012101047505041101168650001701579650002301596650002301619650002301642650004201665650004901707655004901756655003001805655003201835700008701867700010101954700010102055700012002156700012602276700011602402700010702518700010402625938005402729994001402783948004502797nin00009530351200724p20202020enkvrnn efi n zxx csd fu|gnn|m|eu20221219103441.0 a(OCoLC)on1182808100 aTDFbengerdacTDFdOCLCQdOCLCOdTEFdOCLCFdUIUdCLOdOCLCOdWAUdOCLCQdOCLCOdOCL10a03457128346302a68346bHyperion02aCDA68346bHyperion20a20200127a20200130b6299cB3 a(OCoLC)11828081000 genggfreggermeng apcc 4aM27.B44bV37 202004a786.2/18252231 aBeethoven, Ludwig van,d1770-1827,ecomposer.10aVariations,mpiano.kSelections10aC402767 Variations /cLudwig Van Beethoven. 1aLondon :bHyperion,c[2020] 4c℗2020 a1 audio disc (79:43) ;c4 3/4 in. a011943 aperformed musicbprm2rdacontent aaudiobs2rdamedia aaudio discbsd2rdacarrier adigital2rdatr boptical2rdarm c1.4 m/s aaudio file2rdaft bCD audio iPlace of capture:fBerliln (Germany)2naf iComposer:aGermans2lcdgt iComposer:aMen2lcdgt iPerformer:aCanadians2lcdgt iPerformer:aWomen2lcdgt0 aAngela Hewitt, piano. oRecordedd2020 January 27-30pJesus-Christus-Kirche, Berlin. aProgram notes by Angela Hewitt in English, with French and German translations (15 pages : illustrations) on insert.0 a32 variations on an original theme in C minor (13:00) -- 6 variations on an original theme in F major, op. 34 (14:27) -- 15 variations and a fugue on an original theme 'Eroica', op. 35 (24:54) -- 9 variations on the aria 'Quant'è più bello' (6:30) -- 6 variations on the duet 'Nel cor più non mi sento' (5:51) -- 7 variations on 'God save the King' (9:27) -- 5 variations on 'Rule, Britannia' (5:31). 0aPiano music. 0aVariations (Piano) 6aPiano, Musique de. 6aVariations (Piano) 7aPiano music2fast0(OCoLC)fst01063403 7aVariations (Piano)2fast0(OCoLC)fst01164335 7aVariations (Music)2fast0(OCoLC)fst01726509 7aVariations (Music)2lcgft 7aVariations (Musique)2rvmgf1 aHewitt, Angela,d1958-einstrumentalist,ewriter of supplementary textual content.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariations,mpiano,nWoO 80,rC minor.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariations,mpiano,nop. 34,rF major.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariationen mit einer Fuge,mpiano,nop. 35,rE♭ major.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariazioni della thema Quant' è più bello l'amor contadino.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariazioni sopra il duetto Nel cor più no mi sento.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariations sur le thême God save the King.12iContainer of (work):aBeethoven, Ludwig van,d1770-1827.tVariations sur le thême Rule Britannia. aTheodore Front Musical LiteraturebTFRTnTF499010 aZ0bPAOLF hNO HOLDINGS IN PAOLF - 37 OTHER HOLDINGS \ No newline at end of file diff --git a/cypress/support/fragments/inventory/inventoryInstance.js b/cypress/support/fragments/inventory/inventoryInstance.js index cd7696d97e..95a8108ef8 100644 --- a/cypress/support/fragments/inventory/inventoryInstance.js +++ b/cypress/support/fragments/inventory/inventoryInstance.js @@ -139,6 +139,7 @@ const itemBarcodeField = TextField({ name: 'barcode' }); const itemStatusKeyValue = KeyValue('Item status'); const viewHoldingsButtonByID = (holdingsID) => Section({ id: holdingsID }).find(viewHoldingsButton); const marcAuthorityAppIcon = Link({ href: including('/marc-authorities/authorities/') }); +const detailsViewPaneheader = PaneHeader({ id: 'paneHeaderpane-instancedetails' }); const messages = { itemMovedSuccessfully: '1 item has been successfully moved.', @@ -163,6 +164,9 @@ const validOCLC = { }, }; +const sharedTextInDetailView = 'Shared instance • '; +const localTextInDetailView = 'Local instance • '; + const pressAddHoldingsButton = () => { cy.do(addHoldingButton.click()); HoldingsRecordEdit.waitLoading(); @@ -1192,4 +1196,15 @@ export default { .find('a') .should('include.text', `${userLastName}, ${userFirsttName}`); }, + + verifyRecordCreatedSource: (userFirsttName, userLastName) => { + cy.get('div[data-test-created-by="true"]') + .find('a') + .should('include.text', `${userLastName}, ${userFirsttName}`); + }, + + checkSharedTextInDetailView(isShared = true) { + const expectedText = isShared ? sharedTextInDetailView : localTextInDetailView; + cy.expect(detailsViewPaneheader.has({ title: including(expectedText) })); + }, };