diff --git a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-drag-and-drop.cy.js b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-drag-and-drop.cy.js index 5de131d5aa..4cd7385d87 100644 --- a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-drag-and-drop.cy.js +++ b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-drag-and-drop.cy.js @@ -5,6 +5,8 @@ import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; import BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-search-pane'; import FileManager from '../../../support/utils/fileManager'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; describe('bulk-edit', () => { describe('csv approach', () => { @@ -64,7 +66,7 @@ describe('bulk-edit', () => { 'C353538 Verify link record identifier with the drag and drop area on the landing page (firebird) (TaaS)', { tags: ['extendedPath', 'firebird'] }, () => { - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.verifyDefaultFilterState(); BulkEditSearchPane.checkUsersRadio(); BulkEditSearchPane.isDragAndDropAreaDisabled(true); diff --git a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-recent.cy.js b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-recent.cy.js index c895eaca23..03d6bc315d 100644 --- a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-recent.cy.js +++ b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-recent.cy.js @@ -9,6 +9,8 @@ import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; import CustomFields from '../../../support/fragments/settings/users/customFields'; import SettingsMenu from '../../../support/fragments/settingsMenu'; import UserEdit from '../../../support/fragments/users/userEdit'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const customFieldData = { @@ -43,10 +45,10 @@ describe('bulk-edit', () => { }); FileManager.createFile(`cypress/fixtures/${userBarcodesFileName}`, user.barcode); CustomFields.addMultiSelectCustomField(customFieldData); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.USERS); UsersSearchPane.searchByUsername(user.username); UserEdit.addMultiSelectCustomField(customFieldData); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); }); }); @@ -62,7 +64,7 @@ describe('bulk-edit', () => { 'C389569 Local | Verify bulk edit Users records with recently updated Custom fields (firebird) (TaaS)', { tags: ['extendedPath', 'firebird'] }, () => { - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.checkUsersRadio(); BulkEditSearchPane.selectRecordIdentifier('User Barcodes'); BulkEditSearchPane.uploadFile(userBarcodesFileName); @@ -88,7 +90,8 @@ describe('bulk-edit', () => { `${customFieldData.fieldLabel}:${customFieldData.label1};${customFieldData.label2}`, ); - cy.visit(SettingsMenu.customFieldsPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); + CustomFields.openTabFromInventorySettingsList(); CustomFields.editMultiSelectCustomField(customFieldData, updatedCustomFieldData); cy.login(user.username, user.password, { path: TopMenu.bulkEditPath, diff --git a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-semicolon.cy.js b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-semicolon.cy.js index e6023006fc..78249a2cf6 100644 --- a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-semicolon.cy.js +++ b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-user-custom-fields-semicolon.cy.js @@ -9,6 +9,8 @@ import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; import CustomFields from '../../../support/fragments/settings/users/customFields'; import SettingsMenu from '../../../support/fragments/settingsMenu'; import UserEdit from '../../../support/fragments/users/userEdit'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const customFieldData = { @@ -38,7 +40,7 @@ describe('bulk-edit', () => { waiter: CustomFields.waitLoading, }); CustomFields.addMultiSelectCustomField(customFieldData); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.USERS); UsersSearchPane.searchByUsername(user.username); UserEdit.addMultiSelectCustomField(customFieldData); @@ -88,7 +90,7 @@ describe('bulk-edit', () => { `${customFieldData.fieldLabel}:${customFieldData.label1};${customFieldData.label2}`, ); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.USERS); UsersSearchPane.searchByUsername(user.username); Users.verifyFirstNameOnUserDetailsPane(newFirstName); }, diff --git a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-address-type.cy.js b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-address-type.cy.js index 0d1ace5af9..7b60b86a25 100644 --- a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-address-type.cy.js +++ b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-address-type.cy.js @@ -9,6 +9,8 @@ import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; import UserEdit from '../../../support/fragments/users/userEdit'; import ExportFile from '../../../support/fragments/data-export/exportFile'; import BulkEditLogs from '../../../support/fragments/bulk-edit/bulk-edit-logs'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; let addressTypeId; @@ -75,7 +77,7 @@ describe('bulk-edit', () => { addressType = body.addressType; }) .then(() => { - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.checkUsersRadio(); BulkEditSearchPane.selectRecordIdentifier('User Barcodes'); @@ -119,7 +121,7 @@ describe('bulk-edit', () => { BulkEditLogs.downloadFileWithUpdatedRecords(); ExportFile.verifyFileIncludes(updatedRecordsFileName, [newFirstName]); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.USERS); UsersSearchPane.searchByUsername(user.username); Users.verifyFirstNameOnUserDetailsPane(newFirstName); }); diff --git a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-preview.cy.js b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-preview.cy.js index cf7bc37f49..432b911d2f 100644 --- a/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-preview.cy.js +++ b/cypress/e2e/bulk-edit/csv/bulk-edit-csv-users-preview.cy.js @@ -6,6 +6,8 @@ import getRandomPostfix from '../../../support/utils/stringTools'; import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-actions'; import Users from '../../../support/fragments/users/users'; import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; +import { APPLICATION_NAMES } from '../../../support/constants'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; let user; const newFirstName = `testNewFirstName_${getRandomPostfix()}`; @@ -76,7 +78,7 @@ describe('bulk-edit', () => { BulkEditActions.downloadMatchedRecordsAbsent(); BulkEditActions.startBulkEditAbsent(); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.USERS); UsersSearchPane.searchByUsername(user.username); Users.verifyFirstNameOnUserDetailsPane(newFirstName); }, diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-download-matched-records-is-hidden.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-download-matched-records-is-hidden.cy.js index 49b0408f19..84c8317bb6 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-download-matched-records-is-hidden.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-download-matched-records-is-hidden.cy.js @@ -1,10 +1,11 @@ import permissions from '../../../support/dictionary/permissions'; import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-actions'; import BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-search-pane'; -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'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const userUUIDsFileName = `userUUIDs_${getRandomPostfix()}.csv`; @@ -38,7 +39,7 @@ describe('bulk-edit', () => { { tags: ['extendedPath', 'firebird'] }, () => { // Navigate to the Bulk edit app => Select Inventory-Items - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.waitLoading(); // Select "Item UUIDs" from the "Select record-identifier" dropdown BulkEditSearchPane.checkItemsRadio(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-body-special-chars.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-body-special-chars.cy.js index 97525fb428..f8297e5b29 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-body-special-chars.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-body-special-chars.cy.js @@ -12,6 +12,8 @@ import HoldingsRecordEdit from '../../../support/fragments/inventory/holdingsRec import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; import UserEdit from '../../../support/fragments/users/userEdit'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; let noteTypeId; @@ -67,7 +69,7 @@ describe('bulk-edit', () => { HoldingsRecordView.edit(); HoldingsRecordEdit.addHoldingsNotes(holdingsNote, noteType); HoldingsRecordEdit.saveAndClose(); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); }); }); @@ -105,7 +107,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.waitFileUploading(); BulkEditSearchPane.verifyChangedResults(location); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.searchInstanceByTitle(item.instanceName); InventoryInstances.selectInstance(); InventoryInstance.waitLoading(); @@ -117,7 +119,7 @@ describe('bulk-edit', () => { InventoryInstances.deleteHoldingsNoteTypeViaApi(noteTypeId); cy.getToken(user.username, user.password); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.checkHoldingsRadio(); BulkEditSearchPane.selectRecordIdentifier('Holdings HRIDs'); BulkEditSearchPane.uploadFile(holdingsHRIDFileName); @@ -136,7 +138,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.waitFileUploading(); BulkEditSearchPane.verifyChangedResults(newLocation); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.searchInstanceByTitle(item.instanceName); InventoryInstances.selectInstance(); InventoryInstance.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-with-null.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-with-null.cy.js index b0b9e2722e..331d92569f 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-with-null.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-with-null.cy.js @@ -8,6 +8,8 @@ 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'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const item = { @@ -76,7 +78,7 @@ describe('bulk-edit', () => { BulkEditActions.verifySuccessBanner(1); BulkEditSearchPane.verifyChangedResults(newLocation); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToHoldings(); InventorySearchAndFilter.searchByParameter('Holdings HRID', item.holdingHRID); InventorySearchAndFilter.selectSearchResultItem(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-without-uri.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-without-uri.cy.js index bd372cb789..c6ebf3811d 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-without-uri.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-without-uri.cy.js @@ -10,6 +10,8 @@ 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'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const item = { @@ -89,7 +91,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.waitFileUploading(); BulkEditActions.verifySuccessBanner(1); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.itemBarcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-body-special-chars.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-body-special-chars.cy.js index 46405f4a6b..a25e775782 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-body-special-chars.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-body-special-chars.cy.js @@ -13,6 +13,8 @@ import InventoryItems from '../../../support/fragments/inventory/item/inventoryI import ItemNoteTypes from '../../../support/fragments/settings/inventory/items/itemNoteTypes'; import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; import UserEdit from '../../../support/fragments/users/userEdit'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; let noteTypeId; @@ -62,7 +64,7 @@ describe('bulk-edit', () => { InventoryItems.edit(); ItemRecordEdit.addItemsNotes(itemNote, noteType); ItemRecordEdit.saveAndClose({ itemSaved: true }); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); }); }); @@ -94,7 +96,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.waitFileUploading(); BulkEditSearchPane.verifyChangedResults(location); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.barcode); ItemRecordView.waitLoading(); @@ -105,7 +107,7 @@ describe('bulk-edit', () => { ItemNoteTypes.deleteItemNoteTypeViaApi(noteTypeId); cy.getToken(user.username, user.password); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.checkItemsRadio(); BulkEditSearchPane.selectRecordIdentifier('Item HRIDs'); BulkEditSearchPane.uploadFile(itemHRIDsFileName); @@ -124,7 +126,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.waitFileUploading(); BulkEditSearchPane.verifyChangedResults(newLocation); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.barcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-call-number-semicolon.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-call-number-semicolon.cy.js index 358e9659c6..bd877eaee4 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-call-number-semicolon.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-call-number-semicolon.cy.js @@ -8,6 +8,8 @@ import Users from '../../../support/fragments/users/users'; import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-actions'; import ItemRecordView from '../../../support/fragments/inventory/item/itemRecordView'; import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`; @@ -69,7 +71,7 @@ describe('bulk-edit', () => { BulkEditActions.commitChanges(); BulkEditSearchPane.waitFileUploading(); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.barcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-manual-refresh.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-manual-refresh.cy.js index 29759bb4cf..0f242aa358 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-manual-refresh.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-manual-refresh.cy.js @@ -8,6 +8,8 @@ import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-acti import Users from '../../../support/fragments/users/users'; import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter'; import ItemRecordView from '../../../support/fragments/inventory/item/itemRecordView'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const holdingUUIDsFileName = `validHoldingUUIDs_${getRandomPostfix()}.csv`; @@ -84,7 +86,7 @@ describe('bulk-edit', () => { ); [item.itemBarcode, `secondBarcode_${item.itemBarcode}`].forEach((barcode) => { - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', barcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-wildcard.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-wildcard.cy.js index e39511232f..8609cd6571 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-wildcard.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-no-wildcard.cy.js @@ -9,6 +9,8 @@ import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-acti import ExportFile from '../../../support/fragments/data-export/exportFile'; import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter'; import ItemRecordView from '../../../support/fragments/inventory/item/itemRecordView'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; @@ -118,7 +120,7 @@ describe('bulk-edit', () => { ExportFile.verifyFileIncludes(changedRecordsFileName, itemsToEdit); itemsToEdit.forEach((item) => { - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-permanent-location.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-permanent-location.cy.js index bfa2b9bb2b..d438d5c434 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-permanent-location.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-permanent-location.cy.js @@ -8,6 +8,8 @@ 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'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const item = { @@ -63,7 +65,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.waitFileUploading(); BulkEditSearchPane.verifyChangesUnderColumns('Item permanent location', newLocation); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.itemBarcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-location.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-location.cy.js index b27fe0ea4d..da80ae98ca 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-location.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-location.cy.js @@ -9,7 +9,8 @@ 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'; -import { LOCATION_IDS } from '../../../support/constants'; +import { APPLICATION_NAMES, LOCATION_IDS } from '../../../support/constants'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; let user; const item = { @@ -78,7 +79,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.verifyChangesUnderColumns('Item temporary location', location); BulkEditSearchPane.verifyChangesUnderColumns('Status', status); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.itemBarcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-negative.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-negative.cy.js index 616aefb03e..9de2f9ded3 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-negative.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-item-status-negative.cy.js @@ -13,6 +13,8 @@ import Checkout from '../../../support/fragments/checkout/checkout'; import CheckInActions from '../../../support/fragments/check-in-actions/checkInActions'; import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; import ExportFile from '../../../support/fragments/data-export/exportFile'; +import { APPLICATION_NAMES } from '../../../support/constants'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; let user; let servicePointId; @@ -87,7 +89,7 @@ describe('bulk-edit', () => { 'New status value "Available" is not allowed', ]); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.barcode); ItemRecordView.verifyItemStatus('Checked out'); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-items-locations-clear.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-items-locations-clear.cy.js index c1e9d7af17..1be3d59274 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-items-locations-clear.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-items-locations-clear.cy.js @@ -9,7 +9,8 @@ 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'; -import { LOCATION_IDS } from '../../../support/constants'; +import { APPLICATION_NAMES, LOCATION_IDS } from '../../../support/constants'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; let user; const item = { @@ -73,7 +74,7 @@ describe('bulk-edit', () => { BulkEditActions.commitChanges(); BulkEditSearchPane.waitFileUploading(); - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.itemBarcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-location-contains-char.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-location-contains-char.cy.js index 6b699e008d..fd3e062bdb 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-location-contains-char.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-location-contains-char.cy.js @@ -13,6 +13,8 @@ import DateTools from '../../../support/utils/dateTools'; import Location from '../../../support/fragments/settings/tenant/locations/newLocation'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; +import { APPLICATION_NAMES } from '../../../support/constants'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; describe('bulk-edit', () => { describe('in-app approach', () => { @@ -128,7 +130,7 @@ describe('bulk-edit', () => { 'Item temporary location', ]); // Go to the "Inventory" app => Search for the updated Items - cy.visit(TopMenu.inventoryPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventorySearchAndFilter.switchToItem(); InventorySearchAndFilter.searchByParameter('Barcode', item.barcode); ItemRecordView.waitLoading(); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-users-address-type.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-users-address-type.cy.js index 9c829b901c..320f3d9b91 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-users-address-type.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-users-address-type.cy.js @@ -10,6 +10,8 @@ import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; import FileManager from '../../../support/utils/fileManager'; import getRandomPostfix from '../../../support/utils/stringTools'; import BulkEditLogs from '../../../support/fragments/bulk-edit/bulk-edit-logs'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; let addressTypeId; @@ -73,7 +75,7 @@ describe('bulk-edit', () => { addressType = body.addressType; }) .then(() => { - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.checkUsersRadio(); BulkEditSearchPane.selectRecordIdentifier('User Barcodes'); @@ -111,7 +113,7 @@ describe('bulk-edit', () => { BulkEditLogs.downloadFileWithUpdatedRecords(); ExportFile.verifyFileIncludes(updatedRecordsFileName, ['graduate']); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.USERS); UsersSearchPane.searchByKeywords(user.username); UsersSearchPane.openUser(user.username); UsersCard.verifyExpirationDate(todayDate); diff --git a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-verify-errors-accordion-correct-identifier.cy.js b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-verify-errors-accordion-correct-identifier.cy.js index 2c224b1189..05c1a17b5e 100644 --- a/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-verify-errors-accordion-correct-identifier.cy.js +++ b/cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-verify-errors-accordion-correct-identifier.cy.js @@ -12,7 +12,8 @@ import InventorySearchAndFilter from '../../../support/fragments/inventory/inven import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance'; import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; import Location from '../../../support/fragments/settings/tenant/locations/newLocation'; -import { LOCATION_IDS } from '../../../support/constants'; +import { APPLICATION_NAMES, LOCATION_IDS } from '../../../support/constants'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; // TODO: optimize creation of holdings @@ -107,7 +108,7 @@ describe('bulk-edit', () => { InventoryInstance.getAssignedHRID().then((initialInstanceHrId) => { instanceHRID = initialInstanceHrId; }); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); }); }); diff --git a/cypress/e2e/bulk-edit/permissions/bulk-edit-in-app-query-tab-holdings-permissions.cy.js b/cypress/e2e/bulk-edit/permissions/bulk-edit-in-app-query-tab-holdings-permissions.cy.js index 5fb511e345..52de75da9d 100644 --- a/cypress/e2e/bulk-edit/permissions/bulk-edit-in-app-query-tab-holdings-permissions.cy.js +++ b/cypress/e2e/bulk-edit/permissions/bulk-edit-in-app-query-tab-holdings-permissions.cy.js @@ -5,6 +5,8 @@ import BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-s import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; import UserEdit from '../../../support/fragments/users/userEdit'; import UsersCard from '../../../support/fragments/users/usersCard'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; @@ -39,7 +41,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.verifySetCriteriaPaneSpecificTabs('Identifier'); BulkEditSearchPane.verifySetCriteriaPaneSpecificTabsHidden('Query', 'Logs'); - cy.visit(TopMenu.usersPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.USERS); UsersSearchPane.searchByUsername(user.username); UsersSearchPane.openUser(user.username); // Add bulkEditQueryView permission and remove next three diff --git a/cypress/e2e/bulk-edit/permissions/bulk-edit-invalid-users-identifiers.cy.js b/cypress/e2e/bulk-edit/permissions/bulk-edit-invalid-users-identifiers.cy.js index bf6e378757..02bba224e3 100644 --- a/cypress/e2e/bulk-edit/permissions/bulk-edit-invalid-users-identifiers.cy.js +++ b/cypress/e2e/bulk-edit/permissions/bulk-edit-invalid-users-identifiers.cy.js @@ -6,6 +6,8 @@ import FileManager from '../../../support/utils/fileManager'; import Users from '../../../support/fragments/users/users'; import ExportManagerSearchPane from '../../../support/fragments/exportManager/exportManagerSearchPane'; import BulkEditFiles from '../../../support/fragments/bulk-edit/bulk-edit-files'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const userUUIDsFileName = `userUUIDs_${getRandomPostfix()}.csv`; @@ -54,7 +56,7 @@ describe('bulk-edit', () => { BulkEditSearchPane.verifyNonMatchedResults(); // Navigate to the "Export manager" app - cy.visit(TopMenu.exportManagerPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.EXPORT_MANAGER); ExportManagerSearchPane.waitLoading(); ExportManagerSearchPane.searchByBulkEdit(); ExportManagerSearchPane.getElementByTextAndVerify(user.username, 1, 0); diff --git a/cypress/e2e/bulk-edit/permissions/bulk-edit-verify-filter-for-jobs-in-export-manager.cy.js b/cypress/e2e/bulk-edit/permissions/bulk-edit-verify-filter-for-jobs-in-export-manager.cy.js index 7309c0b1d8..a0e0edef3c 100644 --- a/cypress/e2e/bulk-edit/permissions/bulk-edit-verify-filter-for-jobs-in-export-manager.cy.js +++ b/cypress/e2e/bulk-edit/permissions/bulk-edit-verify-filter-for-jobs-in-export-manager.cy.js @@ -5,6 +5,8 @@ import Users from '../../../support/fragments/users/users'; import ExportManagerSearchPane from '../../../support/fragments/exportManager/exportManagerSearchPane'; import getRandomPostfix from '../../../support/utils/stringTools'; import FileManager from '../../../support/utils/fileManager'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const userUUIDsFileName = `userUUIDs_${getRandomPostfix()}.csv`; @@ -52,7 +54,7 @@ describe('bulk-edit', () => { 'C366546 Verify filter for bulk edit jobs in Export Manager (firebird) (TaaS)', { tags: ['extendedPath', 'firebird'] }, () => { - cy.visit(TopMenu.exportManagerPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.EXPORT_MANAGER); ExportManagerSearchPane.waitLoading(); ExportManagerSearchPane.checkFilterOptions(jobTypeAccordionOptions); diff --git a/cypress/e2e/bulk-edit/permissions/bulk-edit-without-permissions.cy.js b/cypress/e2e/bulk-edit/permissions/bulk-edit-without-permissions.cy.js index 70532229f4..3c26cb3ffa 100644 --- a/cypress/e2e/bulk-edit/permissions/bulk-edit-without-permissions.cy.js +++ b/cypress/e2e/bulk-edit/permissions/bulk-edit-without-permissions.cy.js @@ -2,6 +2,8 @@ import permissions from '../../../support/dictionary/permissions'; import BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-search-pane'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; let userWithQueryView; @@ -36,7 +38,7 @@ describe('bulk-edit', () => { { tags: ['extendedPath', 'firebird'] }, () => { cy.login(user.username, user.password); - cy.visit(TopMenu.bulkEditPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.BULK_EDIT); BulkEditSearchPane.verifyNoPermissionWarning(); }, ); diff --git a/cypress/e2e/circulation-log/loan-date-and-time.cy.js b/cypress/e2e/circulation-log/loan-date-and-time.cy.js index e5668e5a4e..457bcdfaa5 100644 --- a/cypress/e2e/circulation-log/loan-date-and-time.cy.js +++ b/cypress/e2e/circulation-log/loan-date-and-time.cy.js @@ -13,6 +13,8 @@ import ServicePoints from '../../support/fragments/settings/tenant/servicePoints import TopMenu from '../../support/fragments/topMenu'; import UserEdit from '../../support/fragments/users/userEdit'; import Users from '../../support/fragments/users/users'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; describe('Circulation log', () => { const testData = { @@ -77,7 +79,7 @@ describe('Circulation log', () => { const navigateToCircLogAndSearchItem = (barcode) => { // Select the Circulation log app - cy.visit(TopMenu.circulationLogPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.CIRCULATION_LOG); // "Loan" accordion => Expand "Loan" accordion and Select "Checked Out" and "Checked In" => Search for an item SearchPane.searchByCheckedOut(); SearchPane.findResultRowIndexByContent(barcode).then((rowIndex) => { diff --git a/cypress/e2e/data-export/data-export-errors-accordion.cy.js b/cypress/e2e/data-export/data-export-errors-accordion.cy.js index 1603ddb979..ee681c3543 100644 --- a/cypress/e2e/data-export/data-export-errors-accordion.cy.js +++ b/cypress/e2e/data-export/data-export-errors-accordion.cy.js @@ -2,11 +2,12 @@ import permissions from '../../support/dictionary/permissions'; import DataExportViewAllLogs from '../../support/fragments/data-export/dataExportViewAllLogs'; import ExportFileHelper from '../../support/fragments/data-export/exportFile'; import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; -import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import FileManager from '../../support/utils/fileManager'; import generateItemBarcode from '../../support/utils/generateItemBarcode'; import getRandomPostfix from '../../support/utils/stringTools'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; let user; const item = { @@ -29,7 +30,7 @@ describe('Data Export', () => { item.itemBarcode, ); cy.login(user.username, user.password); - cy.visit(TopMenu.dataExportPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_EXPORT); FileManager.createFile(`cypress/fixtures/${validFile}`, instanceID); FileManager.createFile(`cypress/fixtures/${invalidFile}`, 'not a valid id'); FileManager.createFile( diff --git a/cypress/e2e/export-manager/bulk-edit-csv-users-hyperlinks.cy.js b/cypress/e2e/export-manager/bulk-edit-csv-users-hyperlinks.cy.js index d4b4634553..dda2f8c5d3 100644 --- a/cypress/e2e/export-manager/bulk-edit-csv-users-hyperlinks.cy.js +++ b/cypress/e2e/export-manager/bulk-edit-csv-users-hyperlinks.cy.js @@ -8,6 +8,8 @@ import FileManager from '../../support/utils/fileManager'; import BulkEditFiles from '../../support/fragments/bulk-edit/bulk-edit-files'; import BulkEditActions from '../../support/fragments/bulk-edit/bulk-edit-actions'; import ExportDetails from '../../support/fragments/exportManager/exportDetails'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; let user; const userBarcodesFileName = `userBarcodes_${getRandomPostfix()}.csv`; @@ -62,7 +64,7 @@ describe('Export Manager', () => { BulkEditSearchPane.waitFileUploading(); BulkEditActions.clickNext(); BulkEditActions.commitChanges(); - cy.visit(TopMenu.exportManagerPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.EXPORT_MANAGER); ExportManagerSearchPane.waitLoading(); ExportManagerSearchPane.searchByBulkEdit(); ExportManagerSearchPane.selectJob(user.username); diff --git a/cypress/e2e/export-manager/bulk-edit-in-app-holdings-hyperlinks.cy.js b/cypress/e2e/export-manager/bulk-edit-in-app-holdings-hyperlinks.cy.js index 3afa458a4d..f44eff919a 100644 --- a/cypress/e2e/export-manager/bulk-edit-in-app-holdings-hyperlinks.cy.js +++ b/cypress/e2e/export-manager/bulk-edit-in-app-holdings-hyperlinks.cy.js @@ -8,6 +8,8 @@ import FileManager from '../../support/utils/fileManager'; import ExportDetails from '../../support/fragments/exportManager/exportDetails'; import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; import ExportFile from '../../support/fragments/data-export/exportFile'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; let user; let userWithPermissions; @@ -68,7 +70,7 @@ describe('Export Manager', () => { BulkEditSearchPane.waitFileUploading(); BulkEditSearchPane.waitFileUploading(); cy.login(user.username, user.password); - cy.visit(TopMenu.exportManagerPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.EXPORT_MANAGER); ExportManagerSearchPane.waitLoading(); ExportManagerSearchPane.searchByBulkEdit(); ExportManagerSearchPane.selectJob(userWithPermissions.username); diff --git a/cypress/e2e/export-manager/bulk-edit-in-app-items-hyperlinks.cy.js b/cypress/e2e/export-manager/bulk-edit-in-app-items-hyperlinks.cy.js index c50c3827aa..e339c5d2bc 100644 --- a/cypress/e2e/export-manager/bulk-edit-in-app-items-hyperlinks.cy.js +++ b/cypress/e2e/export-manager/bulk-edit-in-app-items-hyperlinks.cy.js @@ -8,6 +8,8 @@ import FileManager from '../../support/utils/fileManager'; import ExportDetails from '../../support/fragments/exportManager/exportDetails'; import InventoryInstances from '../../support/fragments/inventory/inventoryInstances'; import ExportFile from '../../support/fragments/data-export/exportFile'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; let user; let userWithPermissions; @@ -58,7 +60,7 @@ describe('Export Manager', () => { BulkEditSearchPane.uploadFile(itemBarcodesFileName); BulkEditSearchPane.waitFileUploading(); cy.login(user.username, user.password); - cy.visit(TopMenu.exportManagerPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.EXPORT_MANAGER); ExportManagerSearchPane.waitLoading(); ExportManagerSearchPane.searchByBulkEdit(); ExportManagerSearchPane.selectJob(userWithPermissions.username); diff --git a/cypress/e2e/export-manager/bulk-edit-in-app-users-hyperlinks.cy.js b/cypress/e2e/export-manager/bulk-edit-in-app-users-hyperlinks.cy.js index c216c125c0..9e229114bb 100644 --- a/cypress/e2e/export-manager/bulk-edit-in-app-users-hyperlinks.cy.js +++ b/cypress/e2e/export-manager/bulk-edit-in-app-users-hyperlinks.cy.js @@ -8,6 +8,8 @@ import FileManager from '../../support/utils/fileManager'; import BulkEditFiles from '../../support/fragments/bulk-edit/bulk-edit-files'; import BulkEditActions from '../../support/fragments/bulk-edit/bulk-edit-actions'; import ExportDetails from '../../support/fragments/exportManager/exportDetails'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; let user; const userBarcodesFileName = `userBarcodes_${getRandomPostfix()}.csv`; @@ -53,7 +55,7 @@ describe('Export Manager', () => { BulkEditActions.confirmChanges(); BulkEditActions.commitChanges(); BulkEditSearchPane.waitFileUploading(); - cy.visit(TopMenu.exportManagerPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.EXPORT_MANAGER); ExportManagerSearchPane.waitLoading(); ExportManagerSearchPane.searchByBulkEdit(); ExportManagerSearchPane.selectJob(user.username); diff --git a/cypress/e2e/inventory/filter-result-list-uncheck-instances.cy.js b/cypress/e2e/inventory/filter-result-list-uncheck-instances.cy.js index a02577a57a..ed4d77a750 100644 --- a/cypress/e2e/inventory/filter-result-list-uncheck-instances.cy.js +++ b/cypress/e2e/inventory/filter-result-list-uncheck-instances.cy.js @@ -5,6 +5,8 @@ import InventorySearchAndFilter from '../../support/fragments/inventory/inventor import TopMenu from '../../support/fragments/topMenu'; import Users from '../../support/fragments/users/users'; import getRandomPostfix from '../../support/utils/stringTools'; +import TopMenuNavigation from '../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../support/constants'; describe('Inventory', () => { let userId; @@ -78,7 +80,7 @@ describe('Inventory', () => { InventoryInstances.verifySelectAllInstancesCheckbox(); InventorySearchAndFilter.exportInstanceAsMarc(); - cy.visit(TopMenu.dataExportPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.DATA_EXPORT); DataExportResults.verifyLastItemCount('99'); }, ); diff --git a/cypress/e2e/settings/data-export/search-mapping-profiles.cy.js b/cypress/e2e/settings/data-export/search-mapping-profiles.cy.js index 690442597d..854b6216cf 100644 --- a/cypress/e2e/settings/data-export/search-mapping-profiles.cy.js +++ b/cypress/e2e/settings/data-export/search-mapping-profiles.cy.js @@ -1,9 +1,10 @@ import { Permissions } from '../../../support/dictionary'; import ExportFieldMappingProfiles from '../../../support/fragments/data-export/exportMappingProfile/exportFieldMappingProfiles'; import SettingsPane from '../../../support/fragments/settings/settingsPane'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; import TopMenu from '../../../support/fragments/topMenu'; import Users from '../../../support/fragments/users/users'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; describe('Data Export', () => { describe('Mapping profile - setup', () => { @@ -32,7 +33,8 @@ describe('Data Export', () => { 'C345410 Search mapping profiles (firebird) (TaaS)', { tags: ['extendedPath', 'firebird'] }, () => { - cy.visit(SettingsMenu.exportMappingProfilePath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); + ExportFieldMappingProfiles.openTabFromDataExportSettingsList(); ExportFieldMappingProfiles.verifyFieldMappingProfilesPane(); ExportFieldMappingProfiles.searchFieldMappingProfile(searchText); ExportFieldMappingProfiles.verifySearchButtonEnabled(true); diff --git a/cypress/e2e/settings/remote-storage/remote-storage-callout.cy.js b/cypress/e2e/settings/remote-storage/remote-storage-callout.cy.js index 90f742c939..347f2d3ef0 100644 --- a/cypress/e2e/settings/remote-storage/remote-storage-callout.cy.js +++ b/cypress/e2e/settings/remote-storage/remote-storage-callout.cy.js @@ -1,9 +1,10 @@ import { Permissions } from '../../../support/dictionary'; import { Configurations } from '../../../support/fragments/settings/remote-storage'; import RemoteStorage from '../../../support/fragments/settings/remote-storage/remoteStorage'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const caiaSoft = Configurations.configurations.CaiaSoft; @@ -30,7 +31,7 @@ describe('remote-storage-configuration', () => { const name = `AutotestConfigurationName${getRandomPostfix()}`; // #1 Go to the "Settings" app // #2 Select "Remote storage" - cy.visit(SettingsMenu.remoteStoragePath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS, 'Remote storage'); // The "Remote storage" pane is appears and contains of: "Configurations", "Accession tables" RemoteStorage.checkSettingItems(); @@ -84,7 +85,7 @@ describe('remote-storage-configuration', () => { }; // #1 Go to the "Settings" app // #2 Select "Remote storage" - cy.visit(SettingsMenu.remoteStoragePath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS, 'Remote storage'); // #3 Select "Configurations" on the "Remote storage" pane by clicking on it RemoteStorage.goToConfigurations(); diff --git a/cypress/e2e/settings/remote-storage/remote-storage-provider-name.cy.js b/cypress/e2e/settings/remote-storage/remote-storage-provider-name.cy.js index 1e30555a00..de03fee4f2 100644 --- a/cypress/e2e/settings/remote-storage/remote-storage-provider-name.cy.js +++ b/cypress/e2e/settings/remote-storage/remote-storage-provider-name.cy.js @@ -1,9 +1,10 @@ import { Permissions } from '../../../support/dictionary'; import { Configurations } from '../../../support/fragments/settings/remote-storage'; import RemoteStorage from '../../../support/fragments/settings/remote-storage/remoteStorage'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; let user; const name = `AutotestConfigurationName${getRandomPostfix()}`; @@ -28,7 +29,8 @@ describe('remote-storage-configuration', () => { () => { // #1 Open the "Settings" app // #2 Select "Remote storage" - cy.visit(SettingsMenu.remoteStoragePath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); + Configurations.openConfigurationsTabFromSettings(); // #3 Select "Configurations" in the "Remote storage" pane by clicking on it RemoteStorage.goToConfigurations(); // #4 Select the "New" button diff --git a/cypress/e2e/settings/tenant/hyperlinks-libraries.cy.js b/cypress/e2e/settings/tenant/hyperlinks-libraries.cy.js index a005ecfdfd..56de130961 100644 --- a/cypress/e2e/settings/tenant/hyperlinks-libraries.cy.js +++ b/cypress/e2e/settings/tenant/hyperlinks-libraries.cy.js @@ -5,9 +5,10 @@ import Campuses from '../../../support/fragments/settings/tenant/location-setup/ import Institutions from '../../../support/fragments/settings/tenant/location-setup/institutions'; import Libraries from '../../../support/fragments/settings/tenant/location-setup/libraries'; import TenantPane, { TENANTS } from '../../../support/fragments/settings/tenant/tenantPane'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; describe('Settings: Tenant', () => { const testData = { @@ -127,7 +128,8 @@ describe('Settings: Tenant', () => { { tags: ['extendedPath', 'firebird'] }, () => { cy.intercept('/location-units/institutions*', { locinsts: testData.institutions }); - cy.visit(SettingsMenu.tenantCampusesPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); + Campuses.openCampusesTabFromSettingsList(); // #1 Select **"Institution AB"** from Preconditions #1 in "Institution" dropdown on "Campuses" pane Campuses.selectOption('Institution', testData.institutions[0]); diff --git a/cypress/e2e/settings/tenant/hyperlinks-locations.cy.js b/cypress/e2e/settings/tenant/hyperlinks-locations.cy.js index 4f0d308e2d..583a2ced91 100644 --- a/cypress/e2e/settings/tenant/hyperlinks-locations.cy.js +++ b/cypress/e2e/settings/tenant/hyperlinks-locations.cy.js @@ -5,9 +5,10 @@ import Campuses from '../../../support/fragments/settings/tenant/location-setup/ import Institutions from '../../../support/fragments/settings/tenant/location-setup/institutions'; import Libraries from '../../../support/fragments/settings/tenant/location-setup/libraries'; import TenantPane, { TENANTS } from '../../../support/fragments/settings/tenant/tenantPane'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; describe('Settings: Tenant', () => { const testData = { @@ -137,7 +138,8 @@ describe('Settings: Tenant', () => { { tags: ['extendedPath', 'firebird'] }, () => { cy.intercept('/location-units/institutions*', { locinsts: testData.institutions }); - cy.visit(SettingsMenu.tenantLibrariesPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); + Libraries.openLibrariesTabFromSettingsList(); // #1 Select **"Institution AB"** from Preconditions #1 in "Institution" dropdown on "Libraries" pane Libraries.selectOption('Institution', testData.institutions[0]); // Select **"Campus AB"** from Preconditions #2 in "Campus" dropdown diff --git a/cypress/e2e/settings/tenant/settings-remain-for-location.cy.js b/cypress/e2e/settings/tenant/settings-remain-for-location.cy.js index 1c25c58ba2..eee0b576ad 100644 --- a/cypress/e2e/settings/tenant/settings-remain-for-location.cy.js +++ b/cypress/e2e/settings/tenant/settings-remain-for-location.cy.js @@ -7,7 +7,6 @@ import Campuses from '../../../support/fragments/settings/tenant/location-setup/ import Institutions from '../../../support/fragments/settings/tenant/location-setup/institutions'; import Libraries from '../../../support/fragments/settings/tenant/location-setup/libraries'; import TenantPane, { TENANTS } from '../../../support/fragments/settings/tenant/tenantPane'; -import SettingsMenu from '../../../support/fragments/settingsMenu'; import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; @@ -106,7 +105,8 @@ describe('Settings: Tenant', () => { { tags: ['extendedPath', 'firebird'] }, () => { cy.intercept('/location-units/institutions*', { locinsts: testData.institutions }); - cy.visit(SettingsMenu.tenantLocationsPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); + Locations.openLTabFromSettingsList(); // #1 Select **"Institution A"** from Preconditions #1 in "Institution" dropdown on "Locations" pane Locations.selectOption('Institution', testData.institutions[0]); Locations.checkEmptyTableContent(); diff --git a/cypress/e2e/settings/tenant/tenant-view-general.cy.js b/cypress/e2e/settings/tenant/tenant-view-general.cy.js index 8836cfe95c..c638af1db4 100644 --- a/cypress/e2e/settings/tenant/tenant-view-general.cy.js +++ b/cypress/e2e/settings/tenant/tenant-view-general.cy.js @@ -7,6 +7,8 @@ import TenantPane, { TENANTS } from '../../../support/fragments/settings/tenant/ import SettingsMenu from '../../../support/fragments/settingsMenu'; import Users from '../../../support/fragments/users/users'; import getRandomPostfix from '../../../support/utils/stringTools'; +import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; +import { APPLICATION_NAMES } from '../../../support/constants'; describe('Settings: Tenant', () => { const testData = { @@ -59,7 +61,7 @@ describe('Settings: Tenant', () => { Addresses.openLastUpdated(testData.newAddress.name); Addresses.verifyNoPermissionWarning(); - cy.visit(SettingsMenu.tenantPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS, 'Tenant'); TenantPane.waitLoading(); // Click on "Language and localization" in the General subsection. TenantPane.selectTenant(TENANTS.LANGUAGE_AND_LOCALIZATION); diff --git a/cypress/support/fragments/settings/tenant/baseTenantPane.js b/cypress/support/fragments/settings/tenant/baseTenantPane.js index c4c54d39a3..2428468ce6 100644 --- a/cypress/support/fragments/settings/tenant/baseTenantPane.js +++ b/cypress/support/fragments/settings/tenant/baseTenantPane.js @@ -1,6 +1,6 @@ import uuid from 'uuid'; import SettingsPane, { rootPane } from '../settingsPane'; -import { Select, including } from '../../../../../interactors'; +import { Select, NavListItem, including } from '../../../../../interactors'; import getRandomPostfix from '../../../utils/stringTools'; export const getDefaultTenant = ({ id, name, code, ...props } = {}) => ({ @@ -13,6 +13,14 @@ export const getDefaultTenant = ({ id, name, code, ...props } = {}) => ({ export default { ...SettingsPane, rootPane, + openLibrariesTabFromSettingsList() { + cy.do(NavListItem('Tenant').click()); + cy.do(NavListItem('Libraries').click()); + }, + openCampusesTabFromSettingsList() { + cy.do(NavListItem('Tenant').click()); + cy.do(NavListItem('Campuses').click()); + }, checkNoActionButtons() { SettingsPane.checkAddNewBtnAbsent(); SettingsPane.checkColumnAbsent('Actions'); diff --git a/cypress/support/fragments/settings/tenant/location-setup/locations.js b/cypress/support/fragments/settings/tenant/location-setup/locations.js index b16d6fd641..d1f866b8d3 100644 --- a/cypress/support/fragments/settings/tenant/location-setup/locations.js +++ b/cypress/support/fragments/settings/tenant/location-setup/locations.js @@ -75,6 +75,10 @@ const table = MultiColumnList({ id: 'locations-list' }); export default { ...TenantPane, + openLTabFromSettingsList() { + cy.do(NavListItem('Tenant').click()); + cy.do(NavListItem('Locations').click()); + }, waitLoading() { TenantPane.waitLoading('Locations'); },