Skip to content

Commit

Permalink
okapi test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherzod-Kenjaev committed Dec 26, 2024
1 parent c119716 commit a3cd3b0
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,20 @@ describe('Data Import', () => {
];
const linkingTagAndValues = [
{
rowIndex: 21,
rowIndex: 20,
value: 'C411802 Marvel comics',
tag: '630',
content:
'$a C411802 Marvel comics $t Comiket $v Periodicals. $z United States $w 830 $0 800269554076962001 $2 fast',
},
{
rowIndex: 22,
rowIndex: 21,
value: 'C411802 Speaking Oratory',
tag: '650',
content: '$a C411802 Speaking Oratory $b debating $2 fast',
},
{
rowIndex: 27,
rowIndex: 26,
value: 'C411802 Radio "Vaticana".',
tag: '710',
boxFourth: '$a C411802 Radio "Vaticana". $b Hrvatski program',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ describe('Inventory', () => {
Permissions.inventoryAll.gui,
]);

cy.loginAsAdmin().then(() => {
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central);
cy.visit(TopMenu.dataImportPath);
cy.loginAsAdmin({ path: TopMenu.dataImportPath, waiter: DataImport.waitLoading }).then(() => {
DataImport.verifyUploadState();
DataImport.uploadFileAndRetry(marcFiles[0].marc, marcFiles[0].fileNameImported);
JobProfiles.waitFileIsUploaded();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ describe('Inventory', () => {
Permissions.inventoryAll.gui,
]);

cy.loginAsAdmin().then(() => {
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central);
cy.visit(TopMenu.dataImportPath);
cy.loginAsAdmin({ path: TopMenu.dataImportPath, waiter: DataImport.waitLoading }).then(() => {
DataImport.verifyUploadState();
DataImport.uploadFileAndRetry(marcFiles[0].marc, marcFiles[0].fileNameImported);
JobProfiles.waitFileIsUploaded();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ describe('Inventory', () => {
Permissions.uiInventoryViewInstances.gui,
]);

cy.loginAsAdmin().then(() => {
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central);
cy.visit(TopMenu.dataImportPath);
cy.loginAsAdmin({ path: TopMenu.dataImportPath, waiter: DataImport.waitLoading }).then(() => {
DataImport.verifyUploadState();
DataImport.uploadFileAndRetry(marcFiles[0].marc, marcFiles[0].fileNameImported);
JobProfiles.waitFileIsUploaded();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ describe('Inventory', () => {
InventorySearchAndFilter.verifyAccordionByNameExpanded(Dropdowns.HELD_BY, true);
InventorySearchAndFilter.verifyCheckboxInAccordion(Dropdowns.HELD_BY, 'University');

InventorySearchAndFilter.selectBrowseOption(BROWSE_CALL_NUMBER_OPTIONS.LIBRARY_OF_CONGRESS);
InventorySearchAndFilter.selectBrowseOptionFromCallNumbersGroup(BROWSE_CALL_NUMBER_OPTIONS.LIBRARY_OF_CONGRESS);
InventorySearchAndFilter.browseSearch(testData.value);
InventorySearchAndFilter.verifyAccordionExistance(Dropdowns.HELD_BY);
InventorySearchAndFilter.clickResetAllButton();
BrowseContributors.checkBrowseQueryText('');
InventorySearchAndFilter.filtersIsAbsent();
InventorySearchAndFilter.selectBrowseOption(BROWSE_CALL_NUMBER_OPTIONS.LIBRARY_OF_CONGRESS);
InventorySearchAndFilter.selectBrowseOptionFromCallNumbersGroup(BROWSE_CALL_NUMBER_OPTIONS.LIBRARY_OF_CONGRESS);
InventorySearchAndFilter.browseSearch(testData.value);
InventorySearchAndFilter.verifyAccordionExistance(Dropdowns.HELD_BY);
InventorySearchAndFilter.clickAccordionByName(Dropdowns.HELD_BY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ describe('Inventory', () => {
InventorySearchAndFilter.verifyAccordionByNameExpanded(Dropdowns.EFFECTIVE_LOCATION, true);
InventorySearchAndFilter.verifyTextFieldInAccordion(Dropdowns.EFFECTIVE_LOCATION, '');

InventorySearchAndFilter.selectBrowseOption(BROWSE_CALL_NUMBER_OPTIONS.DEWEY_DECIMAL);
InventorySearchAndFilter.selectBrowseOptionFromCallNumbersGroup(BROWSE_CALL_NUMBER_OPTIONS.DEWEY_DECIMAL);
InventorySearchAndFilter.browseSearch(testData.value);
InventorySearchAndFilter.verifyAccordionExistance(Dropdowns.SHARED);
InventorySearchAndFilter.verifyAccordionExistance(Dropdowns.HELD_BY);
InventorySearchAndFilter.verifyAccordionExistance(Dropdowns.EFFECTIVE_LOCATION);
InventorySearchAndFilter.clickResetAllButton();
BrowseContributors.checkBrowseQueryText('');
InventorySearchAndFilter.filtersIsAbsent();
InventorySearchAndFilter.selectBrowseOption(BROWSE_CALL_NUMBER_OPTIONS.DEWEY_DECIMAL);
InventorySearchAndFilter.selectBrowseOptionFromCallNumbersGroup(BROWSE_CALL_NUMBER_OPTIONS.DEWEY_DECIMAL);
InventorySearchAndFilter.browseSearch(testData.value);
InventorySearchAndFilter.verifyAccordionExistance(Dropdowns.SHARED);
InventorySearchAndFilter.clickAccordionByName(Dropdowns.SHARED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ describe('MARC', () => {
QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245DerivedContent);
QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245DerivedContent);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndCloseDerive();
InventoryInstance.checkSharedTextInDetailView(false);
InventoryInstance.checkExpectedMARCSource();
Expand All @@ -129,6 +131,8 @@ describe('MARC', () => {
QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245EditedContent);
QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245EditedContent);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndClose();
InventoryInstance.checkSharedTextInDetailView(false);
InventoryInstance.checkExpectedMARCSource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ describe('MARC', () => {
QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245DerivedContent);
QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245DerivedContent);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndCloseDerive();
InventoryInstance.checkSharedTextInDetailView();
InventoryInstance.checkExpectedMARCSource();
Expand All @@ -118,6 +120,8 @@ describe('MARC', () => {
QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245EditedContent);
QuickMarcEditor.checkContentByTag(testData.tag245, testData.tag245EditedContent);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndClose();
InventoryInstance.checkSharedTextInDetailView();
InventoryInstance.checkExpectedMARCSource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('MARC', () => {
'1',
'0',
'$a Johnson, Samuel, $d 1709-1784',
'$x Criticism and interpretation.',
'',
'$0 http://id.loc.gov/authorities/names/n78095825C400663',
'',
],
Expand Down Expand Up @@ -177,6 +177,8 @@ describe('MARC', () => {
QuickMarcEditor.verifyTagFieldAfterLinking(...testData.linked600Field_2);
QuickMarcEditor.verifyTagFieldAfterLinking(...testData.linked650Field);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndClose();
InventoryInstance.checkExpectedMARCSource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ describe('MARC', () => {
linkingTagAndValues.seventhBox,
);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndClose();
InventoryInstance.checkInstanceTitle(testData.instanceTitle);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ describe('MARC', () => {
linkingTagAndValues.seventhBox,
);
QuickMarcEditor.pressSaveAndClose();
cy.wait(2000);
QuickMarcEditor.pressSaveAndClose();
QuickMarcEditor.checkAfterSaveAndClose();
InventoryInstance.checkInstanceTitle(testData.instanceTitle);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@ describe('Data Import', () => {
Logs.openFileDetails(nameForUpdatedMarcFile);
Logs.verifyInstanceStatus(0, 3, RECORD_STATUSES.UPDATED);

TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.INVENTORY);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY);
InventoryInstances.searchByTitle(createdAuthorityIDs[0]);
InventoryInstances.selectInstance();
InventoryInstance.checkValueAbsenceInDetailView(testData.accordion, testData.deletedValue);
InventoryInstance.editMarcBibliographicRecord();
QuickMarcEditor.verifyNoFieldWithContent(testData.naturalId);

TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.MARC_AUTHORITY);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.MARC_AUTHORITY);
MarcAuthorities.searchBy(testData.searchOption, linkingTagAndValues.value);
MarcAuthorities.verifyEmptyNumberOfTitles();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe('Data Import', () => {
Logs.openFileDetails(nameForUpdatedMarcFile);
Logs.verifyInstanceStatus(0, 3, RECORD_STATUSES.UPDATED);

TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.INVENTORY);
TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY);
InventoryInstances.searchByTitle('C375098 Paradise of other side (updated title)');
InventoryInstances.selectInstance();
InventoryInstance.checkExistanceOfAuthorityIconInInstanceDetailPane('Contributor');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ describe('Inventory', () => {
cy.createTempUser([Permissions.inventoryAll.gui]).then((userProperties) => {
testData.user = userProperties;
});
cy.logout();
});

after('Delete test data', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ describe('Inventory', () => {
cy.createTempUser([Permissions.inventoryAll.gui]).then((userProperties) => {
testData.user = userProperties;
});
cy.logout();
});

after('Delete test data', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('MARC', () => {
'Linked to MARC authority\n\t100\t \t$a C388568 Robertson, Peter, $d 1950-2022 $c Inspector Banks series ; $0 3052007C388568 $9',
);
InventoryViewSource.contains(
'Linked to MARC authority\n\t711\t \t$a C388568 Roma Council $c Basilica di San Pietro in Roma) $d 1962-1965 : $n (2nd : $0 http://id.loc.gov/authorities/names/n79084169C388568 $9',
'Linked to MARC authority\n\t711\t \t$a C388568 Roma Council $n (2nd : $d 1962-1965 : $c Basilica di San Pietro in Roma) $0 http://id.loc.gov/authorities/names/n79084169C388568 $9',
);
InventoryViewSource.contains(
'Linked to MARC authority\n\t830\t \t$a C388568 Robinson eminent scholar lecture series $0 http://id.loc.gov/authorities/names/no2011188426C388568 $9',
Expand Down

0 comments on commit a3cd3b0

Please sign in to comment.