-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,009 additions
and
6 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-holdings-grouped-options.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import permissions from '../../../support/dictionary/permissions'; | ||
import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-actions'; | ||
import BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-search-pane'; | ||
import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; | ||
import TopMenu from '../../../support/fragments/topMenu'; | ||
import Users from '../../../support/fragments/users/users'; | ||
import FileManager from '../../../support/utils/fileManager'; | ||
import getRandomPostfix from '../../../support/utils/stringTools'; | ||
|
||
let user; | ||
const holdingUUIDsFileName = `holdingUUIDs_${getRandomPostfix()}.csv`; | ||
const item = { | ||
instanceName: `testBulkEdit_${getRandomPostfix()}`, | ||
itemBarcode: getRandomPostfix(), | ||
}; | ||
|
||
describe('bulk-edit', () => { | ||
describe('in-app approach', () => { | ||
before('create test data', () => { | ||
cy.createTempUser([ | ||
permissions.bulkEditEdit.gui, | ||
permissions.inventoryCRUDHoldings.gui, | ||
permissions.inventoryCRUDHoldingsNoteTypes.gui, | ||
]).then((userProperties) => { | ||
user = userProperties; | ||
|
||
item.instanceId = InventoryInstances.createInstanceViaApi( | ||
item.instanceName, | ||
item.itemBarcode, | ||
); | ||
cy.getHoldings({ | ||
limit: 1, | ||
query: `"instanceId"="${item.instanceId}"`, | ||
}).then((holdings) => { | ||
FileManager.createFile(`cypress/fixtures/${holdingUUIDsFileName}`, holdings[0].id); | ||
}); | ||
cy.login(user.username, user.password, { | ||
path: TopMenu.bulkEditPath, | ||
waiter: BulkEditSearchPane.waitLoading, | ||
}); | ||
}); | ||
}); | ||
|
||
after('delete test data', () => { | ||
cy.getAdminToken(); | ||
Users.deleteViaApi(user.userId); | ||
InventoryInstances.deleteInstanceAndHoldingRecordAndAllItemsViaApi(item.itemBarcode); | ||
FileManager.deleteFile(`cypress/fixtures/${holdingUUIDsFileName}`); | ||
}); | ||
|
||
it( | ||
'C415368 Verify "Select option" dropdown includes grouped options for Holdings (firebird)', | ||
{ tags: ['smoke', 'firebird'] }, | ||
() => { | ||
BulkEditSearchPane.verifyDragNDropHoldingsUUIDsArea(); | ||
BulkEditSearchPane.uploadFile(holdingUUIDsFileName); | ||
BulkEditSearchPane.waitFileUploading(); | ||
|
||
BulkEditActions.openActions(); | ||
BulkEditActions.openInAppStartBulkEditFrom(); | ||
BulkEditActions.verifyHoldingsOptions(); | ||
}, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
cypress/e2e/marc/marc-authority/marc-authority-sort-with-heading.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import getRandomPostfix from '../../../support/utils/stringTools'; | ||
import Permissions from '../../../support/dictionary/permissions'; | ||
import TopMenu from '../../../support/fragments/topMenu'; | ||
import DataImport from '../../../support/fragments/data_import/dataImport'; | ||
import MarcAuthority from '../../../support/fragments/marcAuthority/marcAuthority'; | ||
import Users from '../../../support/fragments/users/users'; | ||
import JobProfiles from '../../../support/fragments/data_import/job_profiles/jobProfiles'; | ||
import Logs from '../../../support/fragments/data_import/logs/logs'; | ||
import MarcAuthorities from '../../../support/fragments/marcAuthority/marcAuthorities'; | ||
|
||
describe('MARC -> MARC Authority', () => { | ||
const testData = { | ||
authority: { | ||
title: 'Type of heading test', | ||
searchOption: 'Keyword', | ||
all: '*', | ||
}, | ||
|
||
columnHeaders: [ | ||
{ header: 'Authorized/Reference', index: 1 }, | ||
{ header: 'Heading/Reference', index: 2 }, | ||
{ header: 'Type of heading', index: 3 }, | ||
], | ||
}; | ||
const marcFiles = [ | ||
{ | ||
marc: 'marcFileForC353607.mrc', | ||
fileName: `testMarcFile.${getRandomPostfix()}.mrc`, | ||
jobProfileToRun: 'Default - Create SRS MARC Authority', | ||
numOfRecords: 19, | ||
}, | ||
]; | ||
|
||
const createdAuthorityIDs = []; | ||
|
||
before(() => { | ||
cy.createTempUser([Permissions.uiMarcAuthoritiesAuthorityRecordView.gui]).then( | ||
(createdUserProperties) => { | ||
testData.userProperties = createdUserProperties; | ||
}, | ||
); | ||
|
||
marcFiles.forEach((marcFile) => { | ||
cy.loginAsAdmin({ path: TopMenu.dataImportPath, waiter: DataImport.waitLoading }).then(() => { | ||
DataImport.verifyUploadState(); | ||
DataImport.uploadFileAndRetry(marcFile.marc, marcFile.fileName); | ||
JobProfiles.waitFileIsUploaded(); | ||
JobProfiles.waitLoadingList(); | ||
JobProfiles.search(marcFile.jobProfileToRun); | ||
JobProfiles.runImportFile(); | ||
JobProfiles.waitFileIsImported(marcFile.fileName); | ||
Logs.checkStatusOfJobProfile('Completed'); | ||
Logs.openFileDetails(marcFile.fileName); | ||
for (let i = 0; i < marcFile.numOfRecords; i++) { | ||
Logs.getCreatedItemsID(i).then((link) => { | ||
createdAuthorityIDs.push(link.split('/')[5]); | ||
}); | ||
} | ||
|
||
cy.login(testData.userProperties.username, testData.userProperties.password, { | ||
path: TopMenu.marcAuthorities, | ||
waiter: MarcAuthorities.waitLoading, | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
after(() => { | ||
cy.getAdminToken(); | ||
createdAuthorityIDs.forEach((id) => { | ||
MarcAuthority.deleteViaAPI(id); | ||
}); | ||
Users.deleteViaApi(testData.userProperties.userId); | ||
}); | ||
|
||
it( | ||
'C353607 The search result list is sorted by clicking on the titles of columns (TaaS) (spitfire)', | ||
{ tags: ['criticalPath', 'spitfire'] }, | ||
() => { | ||
MarcAuthorities.checkSearchOptions(); | ||
MarcAuthorities.searchBy(testData.authority.searchOption, testData.authority.all); | ||
|
||
MarcAuthorities.clickActionsButton(); | ||
MarcAuthorities.verifyActionsSortedBy('Relevance'); | ||
testData.columnHeaders.forEach(({ header, index }) => { | ||
MarcAuthorities.clickOnColumnHeader(header); | ||
// wait for result list to be sorted | ||
cy.wait(2000); | ||
MarcAuthorities.checkResultListSortedByColumn(index); | ||
MarcAuthorities.clickOnColumnHeader(header); | ||
// wait for result list to be sorted | ||
cy.wait(2000); | ||
MarcAuthorities.checkResultListSortedByColumn(index, false); | ||
MarcAuthorities.verifyActionsSortedBy(header); | ||
}); | ||
}, | ||
); | ||
}); |
131 changes: 131 additions & 0 deletions
131
...liographic/edit-marc-bib/008-field-existence-validation-when-edit-imported-marc-bib.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
import Permissions from '../../../../support/dictionary/permissions'; | ||
import DataImport from '../../../../support/fragments/data_import/dataImport'; | ||
import JobProfiles from '../../../../support/fragments/data_import/job_profiles/jobProfiles'; | ||
import Logs from '../../../../support/fragments/data_import/logs/logs'; | ||
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance'; | ||
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances'; | ||
import QuickMarcEditor from '../../../../support/fragments/quickMarcEditor'; | ||
import TopMenu from '../../../../support/fragments/topMenu'; | ||
import Users from '../../../../support/fragments/users/users'; | ||
import getRandomPostfix from '../../../../support/utils/stringTools'; | ||
import InventorySteps from '../../../../support/fragments/inventory/inventorySteps'; | ||
import DateTools from '../../../../support/utils/dateTools'; | ||
|
||
describe('MARC -> MARC Bibliographic -> Edit MARC bib', () => { | ||
const testData = { | ||
createdRecordIDs: [], | ||
tag245: '245', | ||
tag245content: | ||
'$aWicked :$bthe life and times of the wicked witch of the West : a novel /$cGregory Maguire ; illustrations by Douglas Smith. TEST', | ||
tag245RowIndex: 12, | ||
tag008: '008', | ||
tag008RowIndex: 3, | ||
tag00: '00', | ||
expected008BoxesSets: [ | ||
'DtSt', | ||
'Start date', | ||
'End date', | ||
'Ctry', | ||
'Ills', | ||
'Audn', | ||
'Form', | ||
'Cont', | ||
'GPub', | ||
'Conf', | ||
'Fest', | ||
'Indx', | ||
'LitF', | ||
'Biog', | ||
'Lang', | ||
'MRec', | ||
'Srce', | ||
], | ||
tag008BoxValues: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], | ||
calloutMessage: | ||
'This record has successfully saved and is in process. Changes may not appear immediately.', | ||
errorCalloutMessage: 'Record cannot be saved without 008 field', | ||
initial008EnteredValue: DateTools.getCurrentDateYYMMDD(), | ||
}; | ||
const marcFile = { | ||
marc: 'marcBibFileForC387451.mrc', | ||
fileName: `testMarcFile${getRandomPostfix()}.mrc`, | ||
jobProfileToRun: 'Default - Create instance and SRS MARC Bib', | ||
numOfRecords: 1, | ||
}; | ||
|
||
before('Creating user and data', () => { | ||
cy.createTempUser([ | ||
Permissions.inventoryAll.gui, | ||
Permissions.uiQuickMarcQuickMarcBibliographicEditorAll.gui, | ||
Permissions.moduleDataImportEnabled.gui, | ||
]).then((createdUserProperties) => { | ||
testData.userProperties = createdUserProperties; | ||
|
||
cy.loginAsAdmin({ path: TopMenu.dataImportPath, waiter: DataImport.waitLoading }).then(() => { | ||
DataImport.verifyUploadState(); | ||
DataImport.uploadFileAndRetry(marcFile.marc, marcFile.fileName); | ||
JobProfiles.waitFileIsUploaded(); | ||
JobProfiles.search(marcFile.jobProfileToRun); | ||
JobProfiles.runImportFile(); | ||
JobProfiles.waitFileIsImported(marcFile.fileName); | ||
Logs.checkStatusOfJobProfile('Completed'); | ||
Logs.openFileDetails(marcFile.fileName); | ||
for (let i = 0; i < marcFile.numOfRecords; i++) { | ||
Logs.getCreatedItemsID(i).then((link) => { | ||
testData.createdRecordIDs.push(link.split('/')[5]); | ||
}); | ||
} | ||
}); | ||
|
||
cy.login(testData.userProperties.username, testData.userProperties.password, { | ||
path: TopMenu.inventoryPath, | ||
waiter: InventoryInstances.waitContentLoading, | ||
}); | ||
}); | ||
}); | ||
|
||
after('Deleting created user and data', () => { | ||
cy.getAdminToken().then(() => { | ||
Users.deleteViaApi(testData.userProperties.userId); | ||
InventoryInstance.deleteInstanceViaApi(testData.createdRecordIDs[0]); | ||
}); | ||
}); | ||
|
||
it( | ||
'C387451 "008" field existence validation when edit imported "MARC bib" (spitfire) (TaaS)', | ||
{ tags: ['extendedPath', 'spitfire'] }, | ||
() => { | ||
InventoryInstances.waitContentLoading(); | ||
InventoryInstance.searchByTitle(testData.createdRecordIDs[0]); | ||
InventoryInstances.selectInstance(); | ||
InventoryInstance.editMarcBibliographicRecord(); | ||
QuickMarcEditor.checkEditableQuickMarcFormIsOpened(); | ||
QuickMarcEditor.updateExistingFieldContent(testData.tag245RowIndex, testData.tag245content); | ||
QuickMarcEditor.checkButtonsEnabled(); | ||
QuickMarcEditor.pressSaveAndClose(); | ||
QuickMarcEditor.checkCallout(testData.errorCalloutMessage); | ||
QuickMarcEditor.closeCallout(); | ||
QuickMarcEditor.clickSaveAndKeepEditingButton(); | ||
QuickMarcEditor.checkCallout(testData.errorCalloutMessage); | ||
QuickMarcEditor.closeCallout(); | ||
QuickMarcEditor.addNewField(testData.tag008, '', testData.tag008RowIndex); | ||
QuickMarcEditor.check008FieldLabels(testData.expected008BoxesSets); | ||
QuickMarcEditor.updateExistingTagValue(4, testData.tag00); | ||
QuickMarcEditor.verifyTagValue(4, testData.tag00); | ||
QuickMarcEditor.checkContent('', 4); | ||
QuickMarcEditor.checkDeleteButtonExist(4); | ||
QuickMarcEditor.updateExistingTagValue(4, testData.tag008); | ||
QuickMarcEditor.pressSaveAndKeepEditing(testData.calloutMessage); | ||
QuickMarcEditor.checkEditableQuickMarcFormIsOpened(); | ||
QuickMarcEditor.check008FieldContent(); | ||
QuickMarcEditor.updateValuesIn008Boxes(testData.tag008BoxValues); | ||
QuickMarcEditor.pressSaveAndClose(); | ||
QuickMarcEditor.checkAfterSaveAndClose(); | ||
InventorySteps.verifyHiddenFieldValueIn008( | ||
testData.createdRecordIDs[0], | ||
'Entered', | ||
testData.initial008EnteredValue, | ||
); | ||
}, | ||
); | ||
}); |
Oops, something went wrong.