diff --git a/cypress.config.js b/cypress.config.js index e2c869ecc1..29f92760aa 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -20,7 +20,6 @@ const reportportalOptions = { }; module.exports = defineConfig({ - watchForFileChanges: false, retries: { runMode: 0, openMode: 0, @@ -39,6 +38,8 @@ module.exports = defineConfig({ OKAPI_TENANT: 'diku', diku_login: 'diku_admin', diku_password: 'admin', + z3950_login: 'z3950Admin', + z3950_password: 'password', is_kiwi_release: false, downloadTimeout: 2000, allure: true, diff --git a/cypress/e2e/marc/marc-bibliographic/import-marc-bib/export-import-marcbib-record-with-linked-fields.cy.js b/cypress/e2e/marc/marc-bibliographic/import-marc-bib/export-import-marcbib-record-with-linked-fields.cy.js index fad1abc998..7206defb9c 100644 --- a/cypress/e2e/marc/marc-bibliographic/import-marc-bib/export-import-marcbib-record-with-linked-fields.cy.js +++ b/cypress/e2e/marc/marc-bibliographic/import-marc-bib/export-import-marcbib-record-with-linked-fields.cy.js @@ -59,22 +59,9 @@ describe('MARC', () => { permissions.uiMarcAuthoritiesAuthorityRecordView.gui, permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, permissions.inventoryAll.gui, + permissions.dataExportUploadExportDownloadFileViewLogs.gui, ]).then((userProperties) => { testData.userProperties = userProperties; - }); - }); - - after(() => { - cy.getAdminToken(); - InventoryInstances.deleteInstanceByTitleViaApi('C369080'); - MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C369080'); - if (testData?.userProperties?.userId) Users.deleteViaApi(testData.userProperties.userId); - }); - - it( - 'C369080 Export and Import "MARC Bibliographic" record with linked fields (which have $9 with UUID) (spitfire)', - { tags: ['criticalPath', 'spitfire', 'C369080'] }, - () => { cy.loginAsAdmin({ path: TopMenu.inventoryPath, waiter: InventoryInstances.waitContentLoading, @@ -93,7 +80,30 @@ describe('MARC', () => { cy.wait(3000); QuickMarcEditor.pressSaveAndClose(); QuickMarcEditor.checkAfterSaveAndClose(); - InventoryInstance.waitLoading(); + cy.logout(); + }); + }); + + after(() => { + cy.getAdminToken(); + InventoryInstances.deleteInstanceByTitleViaApi('C369080'); + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C369080'); + if (testData?.userProperties?.userId) Users.deleteViaApi(testData.userProperties.userId); + FileManager.deleteFileFromDownloadsByMask('C369080*'); + FileManager.deleteFile(`cypress/fixtures/${exportedInstanceFileName}`); + FileManager.deleteFile(`cypress/fixtures/${updatedInstanceFileName}`); + }); + + it( + 'C369080 Export and Import "MARC Bibliographic" record with linked fields (which have $9 with UUID) (spitfire)', + { tags: ['criticalPath', 'spitfire', 'C369080'] }, + () => { + cy.login(testData.userProperties.username, testData.userProperties.password, { + path: TopMenu.inventoryPath, + waiter: InventoryInstances.waitContentLoading, + }); + + InventoryInstances.searchByTitle(testData.createdInstanceIDs[0]); InventoryInstances.selectInstanceCheckboxByIndex(0); InventoryInstances.exportInstanceMarc(); @@ -122,13 +132,13 @@ describe('MARC', () => { DataImport.waitLoading(); DataImport.uploadFilesViaApi(markfileWithout999Field).then(({ createdInstanceIDs }) => { - TopMenuNavigation.openAppFromDropdown(APPLICATION_NAMES.INVENTORY); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.INVENTORY); InventoryInstances.searchByTitle(createdInstanceIDs[0]); InventoryInstance.checkAbsenceOfAuthorityIconInInstanceDetailPane('Contributor'); InventoryInstance.editMarcBibliographicRecord(); - QuickMarcEditor.checkLinkButtonExist('100'); - QuickMarcEditor.checkLinkButtonExist('650'); + QuickMarcEditor.checkLinkButtonDontExist('100'); + QuickMarcEditor.checkLinkButtonDontExist('650'); }); }, );