From a3cd3b015e886a2cb33daa29207765ada2bceca6 Mon Sep 17 00:00:00 2001 From: Sherzod Kenjaev Date: Thu, 26 Dec 2024 19:25:59 +0500 Subject: [PATCH] okapi test fixes --- ...e-$0-in-linked-fileds-of-shared-marcBib-in-central.cy.js | 6 +++--- .../browse-call-numbers-heldby-facet-member.cy.js | 4 +--- .../browse-call-numbers-heldby-shared-facets-member.cy.js | 4 +--- .../browse-same-call-number-shared-facet.cy.js | 4 +--- ...acet-options-shown-by-performing-search-in-central.cy.js | 4 ++-- ...facet-options-shown-by-performing-search-in-member.cy.js | 4 ++-- .../derive-from-local-marc-bib-in-member.cy.js | 4 ++++ .../derive-from-shared-marc-bib-in-central.cy.js | 4 ++++ ...ing-shared-marcBib-with-shared-marcAuth-on-central.cy.js | 4 +++- .../marc-bib-shared-link-shared-central.cy.js | 2 ++ .../manual-linking/marc-bib-shared-link-shared-member.cy.js | 2 ++ ...ete-repeatable-linked-field-controlled-by-marcAuth.cy.js | 4 ++-- .../update-controlled-and-not-controlled-subfields.cy.js | 2 +- .../search-by-alternative-title-of-linked-record.cy.js | 1 - ...-same-values-in-subject-field-and-linked-to-record.cy.js | 1 - ...linked-fields-manual-link-edit-and-auto-link-again.cy.js | 2 +- 16 files changed, 29 insertions(+), 23 deletions(-) diff --git a/cypress/e2e/consortia/data-import/importing-marcBib-files/update-$0-in-linked-fileds-of-shared-marcBib-in-central.cy.js b/cypress/e2e/consortia/data-import/importing-marcBib-files/update-$0-in-linked-fileds-of-shared-marcBib-in-central.cy.js index df3f4453bd..71e9bc1069 100644 --- a/cypress/e2e/consortia/data-import/importing-marcBib-files/update-$0-in-linked-fileds-of-shared-marcBib-in-central.cy.js +++ b/cypress/e2e/consortia/data-import/importing-marcBib-files/update-$0-in-linked-fileds-of-shared-marcBib-in-central.cy.js @@ -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', diff --git a/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-facet-member.cy.js b/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-facet-member.cy.js index 94f7f413e9..f3a0f4b503 100644 --- a/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-facet-member.cy.js +++ b/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-facet-member.cy.js @@ -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(); diff --git a/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-shared-facets-member.cy.js b/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-shared-facets-member.cy.js index 7b67ab0f02..fe1c291948 100644 --- a/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-shared-facets-member.cy.js +++ b/cypress/e2e/consortia/inventory/call-number-browse/browse-call-numbers-heldby-shared-facets-member.cy.js @@ -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(); diff --git a/cypress/e2e/consortia/inventory/call-number-browse/browse-same-call-number-shared-facet.cy.js b/cypress/e2e/consortia/inventory/call-number-browse/browse-same-call-number-shared-facet.cy.js index 234c0c391f..ba24c4a617 100644 --- a/cypress/e2e/consortia/inventory/call-number-browse/browse-same-call-number-shared-facet.cy.js +++ b/cypress/e2e/consortia/inventory/call-number-browse/browse-same-call-number-shared-facet.cy.js @@ -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(); diff --git a/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-central.cy.js b/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-central.cy.js index 45182df628..25d826b18e 100644 --- a/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-central.cy.js +++ b/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-central.cy.js @@ -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); diff --git a/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-member.cy.js b/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-member.cy.js index 7dfb8f75a9..cf23545075 100644 --- a/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-member.cy.js +++ b/cypress/e2e/consortia/inventory/call-number-browse/facet-options-shown-by-performing-search-in-member.cy.js @@ -120,7 +120,7 @@ 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); @@ -128,7 +128,7 @@ describe('Inventory', () => { 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); diff --git a/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-local-marc-bib-in-member.cy.js b/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-local-marc-bib-in-member.cy.js index e05346f5f1..9c2cc1c051 100644 --- a/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-local-marc-bib-in-member.cy.js +++ b/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-local-marc-bib-in-member.cy.js @@ -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(); @@ -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(); diff --git a/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-shared-marc-bib-in-central.cy.js b/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-shared-marc-bib-in-central.cy.js index ec7519aab1..a2fc994a09 100644 --- a/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-shared-marc-bib-in-central.cy.js +++ b/cypress/e2e/consortia/marc/marc-bibliographic/derive-marcBib/derive-from-shared-marc-bib-in-central.cy.js @@ -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(); @@ -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(); diff --git a/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/automated-linking/auto-linking-shared-marcBib-with-shared-marcAuth-on-central.cy.js b/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/automated-linking/auto-linking-shared-marcBib-with-shared-marcAuth-on-central.cy.js index 83eec9f7b1..80a6d524ae 100644 --- a/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/automated-linking/auto-linking-shared-marcBib-with-shared-marcAuth-on-central.cy.js +++ b/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/automated-linking/auto-linking-shared-marcBib-with-shared-marcAuth-on-central.cy.js @@ -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', '', ], @@ -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(); diff --git a/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-central.cy.js b/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-central.cy.js index b8e687c1b3..ab2edfdab4 100644 --- a/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-central.cy.js +++ b/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-central.cy.js @@ -132,6 +132,8 @@ describe('MARC', () => { linkingTagAndValues.seventhBox, ); QuickMarcEditor.pressSaveAndClose(); + cy.wait(2000); + QuickMarcEditor.pressSaveAndClose(); QuickMarcEditor.checkAfterSaveAndClose(); InventoryInstance.checkInstanceTitle(testData.instanceTitle); diff --git a/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-member.cy.js b/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-member.cy.js index 4422b6b6d1..4eb1e6c391 100644 --- a/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-member.cy.js +++ b/cypress/e2e/consortia/marc/marc-bibliographic/manual-linking/marc-bib-shared-link-shared-member.cy.js @@ -150,6 +150,8 @@ describe('MARC', () => { linkingTagAndValues.seventhBox, ); QuickMarcEditor.pressSaveAndClose(); + cy.wait(2000); + QuickMarcEditor.pressSaveAndClose(); QuickMarcEditor.checkAfterSaveAndClose(); InventoryInstance.checkInstanceTitle(testData.instanceTitle); diff --git a/cypress/e2e/data-import/importing-marc-bib-files/delete-repeatable-linked-field-controlled-by-marcAuth.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/delete-repeatable-linked-field-controlled-by-marcAuth.cy.js index 5eba8472e7..cc2bad7f60 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/delete-repeatable-linked-field-controlled-by-marcAuth.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/delete-repeatable-linked-field-controlled-by-marcAuth.cy.js @@ -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(); }, diff --git a/cypress/e2e/data-import/importing-marc-bib-files/update-controlled-and-not-controlled-subfields.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/update-controlled-and-not-controlled-subfields.cy.js index 86063928f3..3d9486d6c2 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/update-controlled-and-not-controlled-subfields.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/update-controlled-and-not-controlled-subfields.cy.js @@ -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'); diff --git a/cypress/e2e/inventory/search-in-inventory/search-by-alternative-title-of-linked-record.cy.js b/cypress/e2e/inventory/search-in-inventory/search-by-alternative-title-of-linked-record.cy.js index d98879fe58..3011bf6fb9 100644 --- a/cypress/e2e/inventory/search-in-inventory/search-by-alternative-title-of-linked-record.cy.js +++ b/cypress/e2e/inventory/search-in-inventory/search-by-alternative-title-of-linked-record.cy.js @@ -116,7 +116,6 @@ describe('Inventory', () => { cy.createTempUser([Permissions.inventoryAll.gui]).then((userProperties) => { testData.user = userProperties; }); - cy.logout(); }); after('Delete test data', () => { diff --git a/cypress/e2e/inventory/subject-browse/display-records-with-same-values-in-subject-field-and-linked-to-record.cy.js b/cypress/e2e/inventory/subject-browse/display-records-with-same-values-in-subject-field-and-linked-to-record.cy.js index 38c3cd18bc..2a21a98c4e 100644 --- a/cypress/e2e/inventory/subject-browse/display-records-with-same-values-in-subject-field-and-linked-to-record.cy.js +++ b/cypress/e2e/inventory/subject-browse/display-records-with-same-values-in-subject-field-and-linked-to-record.cy.js @@ -111,7 +111,6 @@ describe('Inventory', () => { cy.createTempUser([Permissions.inventoryAll.gui]).then((userProperties) => { testData.user = userProperties; }); - cy.logout(); }); after('Delete test data', () => { diff --git a/cypress/e2e/marc/marc-bibliographic/edit-marc-bib/automated-linking/unlink-auto-linked-fields-manual-link-edit-and-auto-link-again.cy.js b/cypress/e2e/marc/marc-bibliographic/edit-marc-bib/automated-linking/unlink-auto-linked-fields-manual-link-edit-and-auto-link-again.cy.js index 5dc3c424da..b971241b18 100644 --- a/cypress/e2e/marc/marc-bibliographic/edit-marc-bib/automated-linking/unlink-auto-linked-fields-manual-link-edit-and-auto-link-again.cy.js +++ b/cypress/e2e/marc/marc-bibliographic/edit-marc-bib/automated-linking/unlink-auto-linked-fields-manual-link-edit-and-auto-link-again.cy.js @@ -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',