diff --git a/cypress/e2e/checkout/checkout.notes.cy.js b/cypress/e2e/checkout/checkout.notes.cy.js index 001f386baf..bb47f9ba4c 100644 --- a/cypress/e2e/checkout/checkout.notes.cy.js +++ b/cypress/e2e/checkout/checkout.notes.cy.js @@ -81,7 +81,6 @@ describe('Check out', () => { Users.deleteViaApi(testData.userId); }); - // May be failing because of this bug (https://issues.folio.org/browse/STSMACOM-783) it( 'C356781 Verify that all notes assigned to user pop up when user scan patron card (“Delete” option) (Spitfire) (TaaS)', { tags: ['criticalPath', 'spitfire', 'C356781'] }, @@ -108,7 +107,6 @@ describe('Check out', () => { }, ); - // May be failing because of this bug (https://issues.folio.org/browse/STSMACOM-783) it( 'C380512 Verify that all notes assigned to user pop up when user scan patron card (“Close” option) (Spitfire) (TaaS)', { tags: ['extendedPath', 'spitfire', 'C380512'] }, diff --git a/cypress/e2e/data-import/importing-marc-authority-files/marc-authority-update-1XX-tag-value-which-controls-2-marc-bib-records.cy.js b/cypress/e2e/data-import/importing-marc-authority-files/marc-authority-update-1XX-tag-value-which-controls-2-marc-bib-records.cy.js index 75462d55e7..93f72e1c88 100644 --- a/cypress/e2e/data-import/importing-marc-authority-files/marc-authority-update-1XX-tag-value-which-controls-2-marc-bib-records.cy.js +++ b/cypress/e2e/data-import/importing-marc-authority-files/marc-authority-update-1XX-tag-value-which-controls-2-marc-bib-records.cy.js @@ -126,7 +126,8 @@ describe('Data Import', () => { before('Create test data and login', () => { cy.getAdminToken(); // make sure there are no duplicate authority records in the system - MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C374167*'); + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C374167'); + InventoryInstances.deleteInstanceByTitleViaApi('C374167'); // create Match profile NewMatchProfile.createMatchProfileWithIncomingAndExistingRecordsViaApi(matchProfile) diff --git a/cypress/e2e/data-import/importing-marc-bib-files/edit-protected-and-linked-fields-using-update-marcbib-profile.cy.js b/cypress/e2e/data-import/importing-marc-bib-files/edit-protected-and-linked-fields-using-update-marcbib-profile.cy.js index e5c6d56971..580540f869 100644 --- a/cypress/e2e/data-import/importing-marc-bib-files/edit-protected-and-linked-fields-using-update-marcbib-profile.cy.js +++ b/cypress/e2e/data-import/importing-marc-bib-files/edit-protected-and-linked-fields-using-update-marcbib-profile.cy.js @@ -93,7 +93,7 @@ describe('Data Import', () => { const linkingTagAndValues = [ { rowIndex: 16, - value: 'C380511 Ludwig one, Beethoven, 1770-1827.', + value: 'C380511 Ludwig v. Beethoven, 1770-1827.', tag: '100', }, { @@ -312,7 +312,7 @@ describe('Data Import', () => { '100', '1', '\\', - '$a C380511 Ludwig van, Beethoven, $d 1770-1827', + '$a C380511 Ludwig v., Beethoven, $d 1770-1827', '$e composer.', '$0 http://id.loc.gov/authorities/names/n79107741', '', @@ -348,7 +348,7 @@ describe('Data Import', () => { '', ); QuickMarcEditor.verifyTagFieldAfterLinking( - 50, + 51, '700', '1', '2', @@ -358,7 +358,7 @@ describe('Data Import', () => { '', ); QuickMarcEditor.verifyTagFieldAfterUnlinking( - 51, + 50, '700', '1', '\\', diff --git a/cypress/e2e/inventory/contributors-browse/browse-in-inventory.cy.js b/cypress/e2e/inventory/contributors-browse/browse-in-inventory.cy.js index 072f0853dd..d7100ccaff 100644 --- a/cypress/e2e/inventory/contributors-browse/browse-in-inventory.cy.js +++ b/cypress/e2e/inventory/contributors-browse/browse-in-inventory.cy.js @@ -112,6 +112,7 @@ describe('Inventory', () => { InventorySearchAndFilter.switchToBrowseTab(); InventorySearchAndFilter.verifyKeywordsAsDefault(); BrowseContributors.select(); + BrowseContributors.waitForContributorToAppear(testData.contributorName); BrowseContributors.browse(testData.contributorName); BrowseContributors.checkAuthorityIconAndValueDisplayed(testData.contributorName); }, diff --git a/cypress/e2e/inventory/search-in-inventory/search-for-instance-by-contributor-case-insensitive.cy.js b/cypress/e2e/inventory/search-in-inventory/search-for-instance-by-contributor-case-insensitive.cy.js index 6fb324534c..cf76280a87 100644 --- a/cypress/e2e/inventory/search-in-inventory/search-for-instance-by-contributor-case-insensitive.cy.js +++ b/cypress/e2e/inventory/search-in-inventory/search-for-instance-by-contributor-case-insensitive.cy.js @@ -67,17 +67,9 @@ describe('Inventory', () => { describe('Case-insensitive checks', () => { before('Create test data, login', () => { cy.getAdminToken(); - InventoryInstances.getInstancesViaApi({ - limit: 100, - query: 'title="C464068 MSEARCH-696 Instance"', - }).then((instances) => { - if (instances) { - instances.forEach(({ id }) => { - InventoryInstance.deleteInstanceViaApi(id); - }); - } + ['C464068', 'C380454 '].forEach((instanceTitle) => { + InventoryInstances.deleteInstanceByTitleViaApi(instanceTitle); }); - cy.createTempUser([Permissions.uiInventoryViewInstances.gui]).then((userProperties) => { testData.user = userProperties; diff --git a/cypress/e2e/inventory/subject-browse/browse-subjects-linked.cy.js b/cypress/e2e/inventory/subject-browse/browse-subjects-linked.cy.js index a34b03e565..1c4c150424 100644 --- a/cypress/e2e/inventory/subject-browse/browse-subjects-linked.cy.js +++ b/cypress/e2e/inventory/subject-browse/browse-subjects-linked.cy.js @@ -41,6 +41,8 @@ describe('Inventory', () => { const createdRecordIDs = []; before('Creating data', () => { + InventoryInstances.deleteInstanceByTitleViaApi('C375163'); + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C375163'); cy.createTempUser([ Permissions.inventoryAll.gui, Permissions.uiMarcAuthoritiesAuthorityRecordView.gui, diff --git a/cypress/e2e/marc/marc-authority/browse-authority-records/marc-authority-delete.cy.js b/cypress/e2e/marc/marc-authority/browse-authority-records/marc-authority-delete.cy.js index c97f5ce9a1..70e49e79b1 100644 --- a/cypress/e2e/marc/marc-authority/browse-authority-records/marc-authority-delete.cy.js +++ b/cypress/e2e/marc/marc-authority/browse-authority-records/marc-authority-delete.cy.js @@ -26,6 +26,7 @@ describe('MARC', () => { }; before('Creating data', () => { + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C357549'); cy.createTempUser([ Permissions.settingsDataImportView.gui, Permissions.moduleDataImportEnabled.gui, diff --git a/cypress/e2e/marc/marc-authority/create-marc-authority/create-new-marcAuth-record-with-local-authority-file.cy.js b/cypress/e2e/marc/marc-authority/create-marc-authority/create-new-marcAuth-record-with-local-authority-file.cy.js index 874859f365..287ce8478a 100644 --- a/cypress/e2e/marc/marc-authority/create-marc-authority/create-new-marcAuth-record-with-local-authority-file.cy.js +++ b/cypress/e2e/marc/marc-authority/create-marc-authority/create-new-marcAuth-record-with-local-authority-file.cy.js @@ -31,6 +31,7 @@ describe('MARC', () => { before('Create users, data', () => { cy.getAdminToken(); + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C423528'); cy.createTempUser([ Permissions.uiMarcAuthoritiesAuthorityRecordView.gui, Permissions.uiQuickMarcQuickMarcAuthorityCreate.gui, diff --git a/cypress/e2e/marc/marc-authority/delete-two-marc-bib-linked-marc-authority.cy.js b/cypress/e2e/marc/marc-authority/delete-two-marc-bib-linked-marc-authority.cy.js index 6ba3400891..9aa422d0a1 100644 --- a/cypress/e2e/marc/marc-authority/delete-two-marc-bib-linked-marc-authority.cy.js +++ b/cypress/e2e/marc/marc-authority/delete-two-marc-bib-linked-marc-authority.cy.js @@ -80,8 +80,8 @@ describe('MARC', () => { before('Creating user', () => { cy.getAdminToken(); // make sure there are no duplicate authority records in the system - MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('*C369084'); - InventoryInstances.deleteInstanceByTitleViaApi('C369084Crossfire*'); + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C369084'); + InventoryInstances.deleteInstanceByTitleViaApi('C369084'); cy.createTempUser([ Permissions.inventoryAll.gui, Permissions.uiMarcAuthoritiesAuthorityRecordView.gui, diff --git a/cypress/e2e/marc/marc-authority/marc-authority-sort.cy.js b/cypress/e2e/marc/marc-authority/marc-authority-sort.cy.js index 0912f9d8b5..98a1052666 100644 --- a/cypress/e2e/marc/marc-authority/marc-authority-sort.cy.js +++ b/cypress/e2e/marc/marc-authority/marc-authority-sort.cy.js @@ -72,6 +72,7 @@ describe('MARC', () => { }; before(() => { + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('Type of heading test'); cy.createTempUser([Permissions.uiMarcAuthoritiesAuthorityRecordView.gui]).then( (createdUserProperties) => { testData.userProperties = createdUserProperties; diff --git a/cypress/e2e/marc/marc-authority/modify-marc-auth-record-of-deleted-user.cy.js b/cypress/e2e/marc/marc-authority/modify-marc-auth-record-of-deleted-user.cy.js index 8da5d9f355..d13081294d 100644 --- a/cypress/e2e/marc/marc-authority/modify-marc-auth-record-of-deleted-user.cy.js +++ b/cypress/e2e/marc/marc-authority/modify-marc-auth-record-of-deleted-user.cy.js @@ -28,7 +28,7 @@ describe('MARC', () => { const marcFiles = [ { marc: 'marcAuthFileForC358994.mrc', - fileName: `testMarcFile.${getRandomPostfix()}.mrc`, + fileName: `C358994testMarcFile.${getRandomPostfix()}.mrc`, jobProfileToRun: DEFAULT_JOB_PROFILE_NAMES.CREATE_AUTHORITY, numOfRecords: 1, }, @@ -37,6 +37,7 @@ describe('MARC', () => { const createdAuthorityIDs = []; before('Creating user', () => { + MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C358994'); cy.createTempUser([ Permissions.moduleDataImportEnabled.gui, Permissions.uiMarcAuthoritiesAuthorityRecordView.gui, diff --git a/cypress/e2e/marc/marc-bibliographic/create-new-marc-bib/search-created-marc-bib-record-by-title-OCLC-number.cy.js b/cypress/e2e/marc/marc-bibliographic/create-new-marc-bib/search-created-marc-bib-record-by-title-OCLC-number.cy.js index 59d4c47dd4..3b645ca21d 100644 --- a/cypress/e2e/marc/marc-bibliographic/create-new-marc-bib/search-created-marc-bib-record-by-title-OCLC-number.cy.js +++ b/cypress/e2e/marc/marc-bibliographic/create-new-marc-bib/search-created-marc-bib-record-by-title-OCLC-number.cy.js @@ -23,6 +23,7 @@ describe('MARC', () => { describe('MARC Bibliographic', () => { describe('Create new MARC bib', () => { before(() => { + InventoryInstances.deleteInstanceByTitleViaApi(testData.instanceTitle); cy.createTempUser([ Permissions.inventoryAll.gui, Permissions.uiQuickMarcQuickMarcBibliographicEditorCreate.gui, diff --git a/cypress/support/fragments/inventory/search/browseContributors.js b/cypress/support/fragments/inventory/search/browseContributors.js index ec5733572a..19877faf73 100644 --- a/cypress/support/fragments/inventory/search/browseContributors.js +++ b/cypress/support/fragments/inventory/search/browseContributors.js @@ -290,6 +290,31 @@ export default { }); }, + waitForContributorToAppear(contributorName, isPresent = true) { + return cy.recurse( + () => { + return cy.okapiRequest({ + method: 'GET', + path: 'browse/contributors/instances', + searchParams: { + query: `(name>="${contributorName}")`, + }, + isDefaultSearchParamsRequired: false, + }); + }, + (response) => { + const foundContributors = response.body.items.filter((item) => { + return item.name === contributorName; + }); + return isPresent ? foundContributors.length > 0 : foundContributors.length === 0; + }, + { + limit: 10, + delay: 5000, + }, + ); + }, + openInstance(contributor) { cy.do(MultiColumnListCell(contributor.name).hrefClick()); },