From 3f36a2ff140269c82e27b28fdd2a331e2de51621 Mon Sep 17 00:00:00 2001 From: Sviatlana Stsiapanava <152482600+sviatlana-stsiapanava@users.noreply.github.com> Date: Tue, 24 Dec 2024 11:13:10 +0500 Subject: [PATCH 1/3] Adjust the test cases (#4579) --- .../logs/csv/bulk-edit-logs-csv-users-barcodes.cy.js | 1 + cypress/e2e/bulk-edit/query/bulk-edit-query-enum.cy.js | 4 ++-- cypress/e2e/settings/tenant/service-points.cy.js | 5 +++-- .../fragments/settings/tenant/servicePoints/servicePoints.js | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/bulk-edit/logs/csv/bulk-edit-logs-csv-users-barcodes.cy.js b/cypress/e2e/bulk-edit/logs/csv/bulk-edit-logs-csv-users-barcodes.cy.js index 6fa5866c25..0b71029d2f 100644 --- a/cypress/e2e/bulk-edit/logs/csv/bulk-edit-logs-csv-users-barcodes.cy.js +++ b/cypress/e2e/bulk-edit/logs/csv/bulk-edit-logs-csv-users-barcodes.cy.js @@ -27,6 +27,7 @@ describe('bulk-edit', () => { describe('logs', () => { describe('csv approach', () => { before('create test data', () => { + cy.clearLocalStorage(); cy.createTempUser([]).then((userProperties) => { userWithoutPermissions = userProperties; }); diff --git a/cypress/e2e/bulk-edit/query/bulk-edit-query-enum.cy.js b/cypress/e2e/bulk-edit/query/bulk-edit-query-enum.cy.js index 8d89ac7615..c46665ee65 100644 --- a/cypress/e2e/bulk-edit/query/bulk-edit-query-enum.cy.js +++ b/cypress/e2e/bulk-edit/query/bulk-edit-query-enum.cy.js @@ -74,9 +74,9 @@ describe('bulk-edit', () => { QueryModal.testQueryDisabled(); QueryModal.runQueryDisabled(); QueryModal.chooseFromValueMultiselect(ITEM_STATUS_NAMES.AVAILABLE); - QueryModal.chooseFromValueMultiselect(ITEM_STATUS_NAMES.MISSING); + QueryModal.chooseFromValueMultiselect(ITEM_STATUS_NAMES.ON_ORDER); QueryModal.verifyQueryAreaContent( - `(items.status_name not in ("${ITEM_STATUS_NAMES.AVAILABLE}","${ITEM_STATUS_NAMES.MISSING}"))`, + `(items.status_name not in ("${ITEM_STATUS_NAMES.AVAILABLE}","${ITEM_STATUS_NAMES.ON_ORDER}"))`, ); QueryModal.testQueryDisabled(false); QueryModal.runQueryDisabled(); diff --git a/cypress/e2e/settings/tenant/service-points.cy.js b/cypress/e2e/settings/tenant/service-points.cy.js index c61ff540c2..0aad13e9c0 100644 --- a/cypress/e2e/settings/tenant/service-points.cy.js +++ b/cypress/e2e/settings/tenant/service-points.cy.js @@ -1,8 +1,9 @@ import permissions from '../../../support/dictionary/permissions'; import ServicePoints from '../../../support/fragments/settings/tenant/servicePoints/servicePoints'; -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'; let user; const newServicePoint = { @@ -19,7 +20,7 @@ describe('Settings: Tenant', () => { user = userProperties; cy.login(user.username, user.password); cy.wait(2000); - cy.visit(TopMenu.settingsPath); + TopMenuNavigation.navigateToApp(APPLICATION_NAMES.SETTINGS); ServicePoints.goToServicePointsTab(); }, ); diff --git a/cypress/support/fragments/settings/tenant/servicePoints/servicePoints.js b/cypress/support/fragments/settings/tenant/servicePoints/servicePoints.js index c58649e378..93c62926cc 100644 --- a/cypress/support/fragments/settings/tenant/servicePoints/servicePoints.js +++ b/cypress/support/fragments/settings/tenant/servicePoints/servicePoints.js @@ -133,6 +133,7 @@ export default { ]); if (newCode) cy.do(TextField({ name: 'code' }).fillIn(newCode)); if (newDisplayName) cy.do(TextField({ name: 'discoveryDisplayName' }).fillIn(newDisplayName)); + cy.wait(3000); cy.do(saveAndCloseButton.click()); }, From 2082f0b7171496be39065dec79466cb30fc2a7e9 Mon Sep 17 00:00:00 2001 From: Sviatlana Stsiapanava <152482600+sviatlana-stsiapanava@users.noreply.github.com> Date: Wed, 25 Dec 2024 11:54:35 +0500 Subject: [PATCH 2/3] Adjust the test case C405520 according to the Test rail (#4582) --- .../edit-marc-bib/marc-bib-edit-in-central.cy.js | 11 ++++------- .../support/fragments/inventory/inventoryInstance.js | 5 +++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/marc-bib-edit-in-central.cy.js b/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/marc-bib-edit-in-central.cy.js index cbf26dada4..bdbd9721b4 100644 --- a/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/marc-bib-edit-in-central.cy.js +++ b/cypress/e2e/consortia/marc/marc-bibliographic/edit-marc-bib/marc-bib-edit-in-central.cy.js @@ -97,7 +97,7 @@ describe('MARC', () => { QuickMarcEditor.checkPaneheaderContains(testData.sharedPaneheaderText); QuickMarcEditor.updateExistingField(testData.tag245, testData.tag245UpdatedValue); QuickMarcEditor.updateExistingField(testData.tag500, testData.tag500UpdatedValue); - QuickMarcEditor.moveFieldUp(18); + QuickMarcEditor.moveFieldUp(17); QuickMarcEditor.pressSaveAndClose(); cy.wait(1500); QuickMarcEditor.pressSaveAndClose(); @@ -119,10 +119,7 @@ describe('MARC', () => { InventoryInstances.searchByTitle(createdInstanceID); InventoryInstances.selectInstance(); InventoryInstance.checkInstanceTitle(testData.updatedTitle); - InventoryInstance.verifyLastUpdatedSource( - users.userAProperties.firstName, - users.userAProperties.lastName, - ); + InventoryInstance.verifyLastUpdatedSourceByUnknownUser(); InventoryInstance.viewSource(); InventoryViewSource.verifyFieldInMARCBibSource( testData.tag245, @@ -140,8 +137,8 @@ describe('MARC', () => { users.userAProperties.firstName, users.userAProperties.lastName, ); - QuickMarcEditor.verifyTagValue(17, testData.tag504); - QuickMarcEditor.verifyTagValue(18, testData.tag500); + QuickMarcEditor.verifyTagValue(16, testData.tag504); + QuickMarcEditor.verifyTagValue(17, testData.tag500); }, ); }); diff --git a/cypress/support/fragments/inventory/inventoryInstance.js b/cypress/support/fragments/inventory/inventoryInstance.js index 746eda2eae..1edb741200 100644 --- a/cypress/support/fragments/inventory/inventoryInstance.js +++ b/cypress/support/fragments/inventory/inventoryInstance.js @@ -1618,6 +1618,11 @@ export default { .should('include.text', `${userLastName}, ${userFirsttName}`); }, + verifyLastUpdatedSourceByUnknownUser: () => { + cy.do(Accordion('Administrative data').click()); + cy.get('div[data-test-updated-by="true"]').should('include.text', 'Unknown user'); + }, + verifyRecordCreatedSource: (userFirsttName, userLastName) => { cy.get('div[data-test-created-by="true"]') .find('a') From e437b92e73acc7f018614a7fbcd9241d06536410 Mon Sep 17 00:00:00 2001 From: Sviatlana Stsiapanava <152482600+sviatlana-stsiapanava@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:00:24 +0500 Subject: [PATCH 3/3] Stabilize the test case C368013 (#4586) --- .../permissions/bulk-edit-with-logs-permissions.cy.js | 5 +++++ cypress/support/fragments/bulk-edit/bulk-edit-logs.js | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/cypress/e2e/bulk-edit/permissions/bulk-edit-with-logs-permissions.cy.js b/cypress/e2e/bulk-edit/permissions/bulk-edit-with-logs-permissions.cy.js index 512130f292..5aff15ee12 100644 --- a/cypress/e2e/bulk-edit/permissions/bulk-edit-with-logs-permissions.cy.js +++ b/cypress/e2e/bulk-edit/permissions/bulk-edit-with-logs-permissions.cy.js @@ -44,6 +44,11 @@ describe('bulk-edit', () => { BulkEditLogs.checkHoldingsCheckbox(); BulkEditLogs.checkUsersCheckbox(); BulkEditLogs.checkItemsCheckbox(); + // steps have been added to stabilize the test case on the bugfest environment because there are many records there that are no longer available for download + cy.wait(5000); + BulkEditLogs.sortLogsTableByColumnHeader('Started'); + BulkEditLogs.sortLogsTableByColumnHeader('Started'); + cy.wait(5000); BulkEditLogs.clickActionsOnTheRow(); BulkEditLogs.verifyTriggerLogsAction(); }, diff --git a/cypress/support/fragments/bulk-edit/bulk-edit-logs.js b/cypress/support/fragments/bulk-edit/bulk-edit-logs.js index 24103b8aea..f0fa43bde4 100644 --- a/cypress/support/fragments/bulk-edit/bulk-edit-logs.js +++ b/cypress/support/fragments/bulk-edit/bulk-edit-logs.js @@ -501,6 +501,10 @@ export default { ]); }, + sortLogsTableByColumnHeader(columnHeader) { + cy.do(MultiColumnListHeader(columnHeader).click()); + }, + fillLogsDate(accordion, dataPicker, value) { cy.do(Accordion(accordion).find(TextField(dataPicker)).fillIn(value)); },