Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spitfire bf nonECS fixes 1/22 #4660

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('Data Import', () => {
.then(() => {
TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.INVENTORY);
InventoryInstances.searchByTitle(createdAuthorityIDs[0]);
InventoryInstances.selectInstance();
InventoryInstances.selectInstanceById(createdAuthorityIDs[0]);
InventoryInstance.editMarcBibliographicRecord();
linkingTagAndValues.forEach((linking) => {
QuickMarcEditor.clickLinkIconInTagField(linking.rowIndex);
Expand Down Expand Up @@ -245,7 +245,7 @@ describe('Data Import', () => {
{ tags: ['extendedPath', 'spitfire', 'C374189'] },
() => {
InventoryInstances.searchByTitle(createdAuthorityIDs[0]);
InventoryInstances.selectInstance();
InventoryInstances.selectInstanceById(createdAuthorityIDs[0]);
// download .csv file
InventorySearchAndFilter.saveUUIDs();
ExportFile.downloadCSVFile(nameForCSVFile, 'SearchInstanceUUIDs*');
Expand Down Expand Up @@ -278,8 +278,8 @@ describe('Data Import', () => {
Logs.verifyInstanceStatus(0, 3, RECORD_STATUSES.UPDATED);

TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY);
InventoryInstances.searchByTitle(testData.instanceTitle);
InventoryInstances.selectInstance();
InventoryInstances.searchByTitle(createdAuthorityIDs[0]);
InventoryInstances.selectInstanceById(createdAuthorityIDs[0]);
InventoryInstance.checkAbsenceOfAuthorityIconInInstanceDetailPane('Contributor');
InventoryInstance.editMarcBibliographicRecord();
QuickMarcEditor.verifyTagFieldAfterUnlinking(...testData.updated110Field);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ describe('eHoldings', () => {
before('Creating usera and creating data', () => {
cy.createTempUser([
Permissions.uiAgreementsAgreementsEdit.gui,
Permissions.uiAgreementsSearchAndView,
Permissions.uiAgreementsSearchAndView.gui,
Permissions.uieHoldingsRecordsEdit.gui,
Permissions.uiAgreementsSearch,
Permissions.uiAgreementsSearch.gui,
])
.then((createdUserProperties) => {
testData.userProperties = createdUserProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ describe('MARC', () => {
MarcAuthority.contains(newFields[0].content);
MarcAuthorities.closeMarcViewPane();
MarcAuthorities.verifyMarcViewPaneIsOpened(false);
// workaround for an issue when detailed view is not opened when using a filter after record creation - team won't fix it
cy.reload();
MarcAuthorities.checkRecordsResultListIsAbsent();
MarcAuthorities.searchBy(testData.searchOption, testData.marcValue);
MarcAuthorities.checkAfterSearch(testData.AUTHORIZED, testData.marcValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ describe('MARC', () => {
// 7 Close the detail view pane by clicking on "X" icon placed in the left upper corner of the pane
MarcAuthorities.closeMarcViewPane();
MarcAuthorities.verifyMarcViewPaneIsOpened(false);

// workaround for an issue when detailed view is not opened when using a filter after record creation - team won't fix it
cy.reload();
// 8 Click on the "Authority source" multi select element in "Authority source" accordion placed on "Search & filter" pane
MarcAuthorities.clickMultiSelectToggleButtonInAccordion('Authority source');
MarcAuthorities.checkAuthoritySourceDropdownHasOption(localAuthFile.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ describe('MARC', () => {
// 7 Close the detail view pane by clicking on "X" icon placed in the left upper corner of the pane
MarcAuthorities.closeMarcViewPane();
MarcAuthorities.verifyMarcViewPaneIsOpened(false);
// workaround for an issue when detailed view is not opened when using a filter after record creation - team won't fix it
cy.reload();

// 8 Click on the "Authority source" multi select element in "Authority source" accordion placed on "Search & filter" pane
MarcAuthorities.clickMultiSelectToggleButtonInAccordion('Authority source');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('MARC', () => {
keyword: 'Keyword',
nameTitle: 'C376936 Roberts',
},
errorMessage: 'Cannot remove 010 $a for this record.',
errorMessage: 'Cannot delete 010. It is required.',
bib700AfterLinkingToAuth100: [
56,
'700',
Expand Down Expand Up @@ -152,12 +152,11 @@ describe('MARC', () => {
QuickMarcEditor.pressSaveAndClose();
cy.wait(1500);
QuickMarcEditor.pressSaveAndClose();

QuickMarcEditor.checkErrorMessage(4, testData.errorMessage);
QuickMarcEditor.checkCallout(testData.errorMessage);
QuickMarcEditor.clickSaveAndKeepEditingButton();
cy.wait(1500);
QuickMarcEditor.clickSaveAndKeepEditingButton();
QuickMarcEditor.checkErrorMessage(4, testData.errorMessage);
QuickMarcEditor.checkCallout(testData.errorMessage);
QuickMarcEditor.pressCancel();
MarcAuthorities.checkDetailViewIncludesText(
`${testData.subfieldPrefix} ${testData.tag010content}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ describe('MARC', () => {
tag010.inputContent.field010_2,
);
QuickMarcEditor.checkButtonsEnabled();
QuickMarcEditor.clickSaveAndKeepEditingButton();
cy.wait(1500);
QuickMarcEditor.pressSaveAndKeepEditing(testData.calloutMessage);
QuickMarcEditor.checkContent(tag010.expectedContent.field010_2, tag010.rowIndex);

Expand All @@ -172,16 +170,12 @@ describe('MARC', () => {
);
QuickMarcEditor.checkContent(tag010.expectedContent.field010_3, tag010.rowIndex);
QuickMarcEditor.checkButtonsEnabled();
QuickMarcEditor.clickSaveAndKeepEditingButton();
cy.wait(1500);
QuickMarcEditor.pressSaveAndKeepEditing(testData.calloutMessage);
QuickMarcEditor.checkContent(tag010.expectedContent.field010_3, tag010.rowIndex);
cy.wait(3000);

QuickMarcEditor.updateExistingFieldContent(4, tag010.inputContent.field010_4);
QuickMarcEditor.checkButtonsEnabled();
QuickMarcEditor.clickSaveAndKeepEditingButton();
cy.wait(1500);
QuickMarcEditor.pressSaveAndKeepEditing(testData.calloutMessage);
QuickMarcEditor.checkContent(tag010.expectedContent.field010_1, tag010.rowIndex);

Expand All @@ -191,8 +185,6 @@ describe('MARC', () => {
);
QuickMarcEditor.checkButtonsEnabled();
QuickMarcEditor.checkContent(tag010.expectedContent.field010_4, tag010.rowIndex);
QuickMarcEditor.clickSaveAndKeepEditingButton();
cy.wait(1500);
QuickMarcEditor.pressSaveAndKeepEditing(testData.calloutMessage);
QuickMarcEditor.checkContent(tag010.expectedContent.field010_4, tag010.rowIndex);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ describe('MARC', () => {
const viewSourceData = [
'Linked to MARC authority',
'100',
'$0 http://id.loc.gov/authorities/names/n80036674 $9 26daa178-09b0-4a44-ac23-d76c2eda0091 $a C422066 Kerouac, Jack (001 has valid prefix), $d 1922-1969 $e author.',
'$0 http://id.loc.gov/authorities/names/n80036674',
'$a C422066 Kerouac, Jack (001 has valid prefix), $d 1922-1969 $e author.',
];

const marcFiles = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('MARC', () => {
tagsForChanging: ['100', '101', '110', '111', '130', '150', '151', '155'],
createdRecordIDs: [],
searchOption: 'Keyword',
marcValue: 'Best, Pete,',
marcValue: 'C374139 Best, Pete,',
errorMessageAfterChangingTag:
'Cannot change the saved MARC authority field 110 because it controls a bibliographic field(s). To change this 1XX, you must unlink all controlled bibliographic fields.',
errorMessageAfterSaving: 'Record cannot be saved without 1XX field.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ describe('MARC', () => {
`Linked to MARC authority\n${marcFiles[1].valueAfterSave}`,
);
InventoryInstance.viewSource();
InventoryViewSource.contains(
'Linked to MARC authority\n\t700\t1 \t$a C374157 Roberts, Julia, $d 1967- $e Actor. $0 http://id.loc.gov/authorities/names/n91074081',
);
InventoryViewSource.contains('Linked to MARC authority\n\t700\t1 \t');
InventoryViewSource.contains('$a C374157 Roberts, Julia, $d 1967- $e Actor.');
InventoryViewSource.contains('$0 http://id.loc.gov/authorities/names/n91074081');
},
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ describe('MARC', () => {
tag100: '100',
tag010: '010',
tag010NewValue: '$a 00000912 $z n 2005070769',
authority100FieldValue: 'Erbil, H. Yıldırım',
authority100FieldValue: 'C376595 Auto Erbil, H. Yıldırım',
searchOption: 'Keyword',
linked100Field: [
16,
'100',
'1',
'\\',
'$a Erbil, H. Yıldırım',
'$a C376595 Auto Erbil, H. Yıldırım',
'',
'$0 http://id.loc.gov/authorities/names/n00000912',
'',
Expand All @@ -34,7 +34,7 @@ describe('MARC', () => {
'100',
'1',
'\\',
'$a Erbil, H. Yıldırım',
'$a C376595 Auto Erbil, H. Yıldırım',
'',
'$0 http://id.loc.gov/authorities/names/n00000911',
'',
Expand All @@ -58,7 +58,7 @@ describe('MARC', () => {
fileName: `C376595 testMarcFileC376595${getRandomPostfix()}.mrc`,
jobProfileToRun: DEFAULT_JOB_PROFILE_NAMES.CREATE_AUTHORITY,
propertyName: 'authority',
authorityHeading: 'Erbil, H. Yıldırım',
authorityHeading: 'C376595 Auto Erbil, H. Yıldırım',
},
];

Expand All @@ -67,6 +67,7 @@ describe('MARC', () => {
before('Create test data', () => {
cy.createTempUser([Permissions.moduleDataImportEnabled.gui]).then((userProperties) => {
testData.preconditionUserId = userProperties.userId;
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C376595*');

marcFiles.forEach((marcFile) => {
DataImport.uploadFileViaApi(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('MARC', () => {
updatedTag100Value:
'$a C357220 Beethoven, Ludwig the Greatest, $d 1770-1827. $t Variations, $m piano, violin, cello, $n op. 44, $r E♭ major',
title:
'Beethoven, Ludwig van, 1770-1827. Variations, piano, violin, cello, op. 44, E♭ major',
'C375220 Beethoven, Ludwig van, 1770-1827. Variations, piano, violin, cello, op. 44, E♭ major',
};
const today = DateTools.getFormattedDate({ date: new Date() }, 'MM/DD/YYYY');
const todayWithoutPaddingZero = DateTools.clearPaddingZero(today);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('MARC', () => {
QuickMarcEditor.deleteField(32);
QuickMarcEditor.afterDeleteNotification(testData.tag100);
QuickMarcEditor.pressSaveAndClose();
cy.wait(1500);
cy.wait(2000);
QuickMarcEditor.clickSaveAndCloseThenCheck(1);
QuickMarcEditor.checkDeletingFieldsModal();
QuickMarcEditor.clickRestoreDeletedField();
Expand All @@ -153,6 +153,8 @@ describe('MARC', () => {
QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245content);
QuickMarcEditor.checkButtonSaveAndCloseEnable();
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkCallout('Record created.');
InstanceRecordView.verifyInstancePaneExists();
InventoryInstance.verifyContributor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ describe('MARC', () => {
QuickMarcEditor.checkCallout(testData.errorMessage);
InventoryInstance.verifySelectMarcAuthorityModal();
MarcAuthorities.closeAuthoritySourceOption();
MarcAuthorities.verifyNoSourceOptionsSelected();
});
},
);
Expand Down
Loading
Loading