From 97ab0abfa3aa5db81b34a9455c4ec03a1b8dd582 Mon Sep 17 00:00:00 2001 From: Tetiana_Paranich Date: Thu, 26 Dec 2024 09:08:37 +0200 Subject: [PATCH] fixed ecs tests --- .../action-for-creating-new-local-records-for-member.cy.js | 3 ++- .../edit-instance-button-on-central-instance-page.cy.js | 1 + ...-bibliographic-record-button-on-central-instance-page.cy.js | 2 -- ...data-is-not-lost-when-promoting-source-folio-instance.cy.js | 2 ++ .../shared-instance-is-updated-using-DI-from-member.cy.js | 1 - 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/consortia/inventory/instance/action-for-creating-new-local-records-for-member.cy.js b/cypress/e2e/consortia/inventory/instance/action-for-creating-new-local-records-for-member.cy.js index d9bce52faf..f54eef553d 100644 --- a/cypress/e2e/consortia/inventory/instance/action-for-creating-new-local-records-for-member.cy.js +++ b/cypress/e2e/consortia/inventory/instance/action-for-creating-new-local-records-for-member.cy.js @@ -18,7 +18,6 @@ describe('Inventory', () => { }; before('Create test data', () => { - cy.getAdminToken(); cy.createTempUser([Permissions.uiInventoryViewCreateEditInstances.gui]).then( (userProperties) => { user = userProperties; @@ -67,7 +66,9 @@ describe('Inventory', () => { verifySearchAndFilterPane(); const InventoryNewInstance = InventoryInstances.addNewInventory(); InventoryNewInstance.fillRequiredValues(testData.instanceTitle); + cy.wait(1500); InventoryNewInstance.clickSaveAndCloseButton(); + cy.wait(1500); InventoryInstance.checkInstanceDetails({ instanceInformation: [{ key: 'Source', value: INSTANCE_SOURCE_NAMES.FOLIO }], }); diff --git a/cypress/e2e/consortia/inventory/instance/edit-instance-button-on-central-instance-page.cy.js b/cypress/e2e/consortia/inventory/instance/edit-instance-button-on-central-instance-page.cy.js index e569586769..cd63604142 100644 --- a/cypress/e2e/consortia/inventory/instance/edit-instance-button-on-central-instance-page.cy.js +++ b/cypress/e2e/consortia/inventory/instance/edit-instance-button-on-central-instance-page.cy.js @@ -45,6 +45,7 @@ describe('Inventory', () => { cy.getAdminToken(); Users.deleteViaApi(testData.user.userId); InventoryInstance.deleteInstanceViaApi(testData.instance.instanceId); + cy.wait(10000); StatisticalCodes.deleteViaApi(testData.statisticalCodeId); }); diff --git a/cypress/e2e/consortia/inventory/instance/edit-marc-bibliographic-record-button-on-central-instance-page.cy.js b/cypress/e2e/consortia/inventory/instance/edit-marc-bibliographic-record-button-on-central-instance-page.cy.js index ad03f1d276..d8fec3661f 100644 --- a/cypress/e2e/consortia/inventory/instance/edit-marc-bibliographic-record-button-on-central-instance-page.cy.js +++ b/cypress/e2e/consortia/inventory/instance/edit-marc-bibliographic-record-button-on-central-instance-page.cy.js @@ -64,8 +64,6 @@ describe('Inventory', () => { InventoryInstance.editMarcBibliographicRecord(); QuickMarcEditor.addNewField(testData.tag010.tag, testData.tag010.content, 3); QuickMarcEditor.pressSaveAndClose(); - cy.wait(1000); - QuickMarcEditor.pressSaveAndClose(); InventoryInstance.waitLoading(); InventoryInstance.checkInstanceDetails({ instanceInformation: [{ key: 'Source', value: testData.source }], diff --git a/cypress/e2e/consortia/inventory/instance/instance-data-is-not-lost-when-promoting-source-folio-instance.cy.js b/cypress/e2e/consortia/inventory/instance/instance-data-is-not-lost-when-promoting-source-folio-instance.cy.js index 8edc7fc788..b944267eed 100644 --- a/cypress/e2e/consortia/inventory/instance/instance-data-is-not-lost-when-promoting-source-folio-instance.cy.js +++ b/cypress/e2e/consortia/inventory/instance/instance-data-is-not-lost-when-promoting-source-folio-instance.cy.js @@ -9,6 +9,7 @@ import ConsortiumManager from '../../../../support/fragments/settings/consortium import TopMenu from '../../../../support/fragments/topMenu'; import Users from '../../../../support/fragments/users/users'; import DateTools from '../../../../support/utils/dateTools'; +import InteractorsTools from '../../../../support/utils/interactorsTools'; import getRandomPostfix from '../../../../support/utils/stringTools'; describe('Inventory', () => { @@ -132,6 +133,7 @@ describe('Inventory', () => { }); cy.wait(3000); InventoryNewInstance.clickSaveAndCloseButton(); + InteractorsTools.closeCalloutMessage(); InventoryInstance.checkAllInstanceDetails( [ { key: 'Cataloged date', value: instanceData.today }, diff --git a/cypress/e2e/consortia/inventory/instance/shared-instance-is-updated-using-DI-from-member.cy.js b/cypress/e2e/consortia/inventory/instance/shared-instance-is-updated-using-DI-from-member.cy.js index 9efe33b998..92ebdc5c42 100644 --- a/cypress/e2e/consortia/inventory/instance/shared-instance-is-updated-using-DI-from-member.cy.js +++ b/cypress/e2e/consortia/inventory/instance/shared-instance-is-updated-using-DI-from-member.cy.js @@ -121,7 +121,6 @@ describe('Inventory', () => { cy.resetTenant(); }); - cy.getAdminToken(); cy.createTempUser([Permissions.uiInventoryViewCreateEditInstances.gui]) .then((userProperties) => { testData.user = userProperties;