Skip to content

Commit

Permalink
adjustments for ramsons tests (#4671)
Browse files Browse the repository at this point in the history
  • Loading branch information
eremv authored Jan 27, 2025
1 parent 81d3ab2 commit 95fe119
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 20 deletions.
2 changes: 0 additions & 2 deletions cypress/e2e/checkout/checkout.notes.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'] },
Expand All @@ -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'] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
{
Expand Down Expand Up @@ -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',
'',
Expand Down Expand Up @@ -348,7 +348,7 @@ describe('Data Import', () => {
'',
);
QuickMarcEditor.verifyTagFieldAfterLinking(
50,
51,
'700',
'1',
'2',
Expand All @@ -358,7 +358,7 @@ describe('Data Import', () => {
'',
);
QuickMarcEditor.verifyTagFieldAfterUnlinking(
51,
50,
'700',
'1',
'\\',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ describe('Inventory', () => {
InventorySearchAndFilter.switchToBrowseTab();
InventorySearchAndFilter.verifyKeywordsAsDefault();
BrowseContributors.select();
BrowseContributors.waitForContributorToAppear(testData.contributorName);
BrowseContributors.browse(testData.contributorName);
BrowseContributors.checkAuthorityIconAndValueDisplayed(testData.contributorName);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('MARC', () => {
};

before('Creating data', () => {
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C357549');
cy.createTempUser([
Permissions.settingsDataImportView.gui,
Permissions.moduleDataImportEnabled.gui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('MARC', () => {

before('Create users, data', () => {
cy.getAdminToken();
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C423528');
cy.createTempUser([
Permissions.uiMarcAuthoritiesAuthorityRecordView.gui,
Permissions.uiQuickMarcQuickMarcAuthorityCreate.gui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/marc/marc-authority/marc-authority-sort.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('MARC', () => {
};

before(() => {
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('Type of heading test');
cy.createTempUser([Permissions.uiMarcAuthoritiesAuthorityRecordView.gui]).then(
(createdUserProperties) => {
testData.userProperties = createdUserProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -37,6 +37,7 @@ describe('MARC', () => {
const createdAuthorityIDs = [];

before('Creating user', () => {
MarcAuthorities.deleteMarcAuthorityByTitleViaAPI('C358994');
cy.createTempUser([
Permissions.moduleDataImportEnabled.gui,
Permissions.uiMarcAuthoritiesAuthorityRecordView.gui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
25 changes: 25 additions & 0 deletions cypress/support/fragments/inventory/search/browseContributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
},
Expand Down

0 comments on commit 95fe119

Please sign in to comment.