Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/folio-org/stripes-testing
Browse files Browse the repository at this point in the history
…into FAT-17285-C594483
  • Loading branch information
TetianaParanich committed Jan 28, 2025
2 parents eba34e6 + eb55b33 commit d7038d5
Show file tree
Hide file tree
Showing 41 changed files with 803 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.waitFileUploading();

BulkEditSearchPane.verifyMatchedResults(testData.user.username);
BulkEditSearchPane.verifyPaneRecordsCount(1);
BulkEditSearchPane.verifyPaneRecordsCount('1 user');
BulkEditSearchPane.isDragAndDropAreaDisabled(true);

BulkEditSearchPane.selectRecordIdentifier('User Barcodes');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.checkForUploading(userUUIDsFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyErrorLabel(userUUIDsFileName, 1, 1);
BulkEditSearchPane.verifyPaneRecordsCount(1);
BulkEditSearchPane.verifyPaneRecordsCount('1 user');
BulkEditSearchPane.verifyMatchedResults(user.username);
BulkEditSearchPane.verifyNonMatchedResults(invalidUserUUID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,16 @@ describe('bulk-edit', () => {
BulkEditActions.verifyOptionsDropdown();
BulkEditActions.isSelectActionAbsent();
BulkEditActions.selectOption('URL Relationship');
let possibleActions = ['Clear field', 'Find', 'Replace with'];
let possibleActions = ['Clear field', 'Find (full field search)', 'Replace with'];
BulkEditActions.verifyPossibleActions(possibleActions);
BulkEditActions.selectSecondAction('Clear field');
BulkEditActions.addNewBulkEditFilterString();
BulkEditActions.verifyNewBulkEditRow();
BulkEditActions.verifyOptionAbsentInNewRow('URL Relationship');
BulkEditActions.deleteRow(1);
BulkEditActions.findValue('URL Relationship');
BulkEditActions.selectOption('URL Relationship');
BulkEditActions.selectSecondAction('Find (full field search)');
BulkEditActions.verifyActionSelected('Find (full field search)');
possibleActions = ['Replace with', 'Remove'];
BulkEditActions.verifyPossibleActions(possibleActions);
BulkEditActions.selectSecondAction('Remove');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ describe('bulk-edit', () => {
);
BulkEditSearchPane.verifyElectronicAccessElementByIndex(4, electronicAccess[0].publicNote);
BulkEditActions.openInAppStartBulkEditFrom();
BulkEditActions.electronicAccessReplaceWith(
'URL Relationship',
BulkEditActions.urlRelationshipReplaceWith(
electronicAccessRelationshipName.RESOURCE,
electronicAccessRelationshipName.VERSION_OF_RESOURCE,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ describe('bulk-edit', () => {
`${notes.exhibitionsNote} (staff only)`,
);

BulkEditSearchPane.verifyErrorLabelInErrorAccordion(instanceUUIDsFileName, 2, 2, 3);
BulkEditSearchPane.verifyNonMatchedResults(marcInstance.instanceId);
BulkEditSearchPane.verifyErrorLabel(3);
BulkEditSearchPane.verifyNonMatchedResults(marcInstance.instanceId, `${reasonForError} `);
BulkEditSearchPane.verifyReasonForError(reasonForError);

BulkEditActions.openActions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('bulk-edit', () => {

const instanceNoteColumnNames = Object.values(
BULK_EDIT_TABLE_COLUMN_HEADERS.INVENTORY_INSTANCES,
).slice(22);
).slice(23);

BulkEditSearchPane.verifyInstanceNoteColumns(instanceNoteColumnNames);
BulkEditSearchPane.changeShowColumnCheckboxIfNotYet(
Expand Down Expand Up @@ -261,7 +261,7 @@ describe('bulk-edit', () => {
BulkEditActions.commitChanges();
BulkEditSearchPane.waitFileUploading();
BulkEditActions.verifySuccessBanner(1);
BulkEditSearchPane.verifyPaneRecordsChangedCount(1);
BulkEditSearchPane.verifyPaneRecordsChangedCount('1 instance');
BulkEditSearchPane.verifyExactChangesUnderColumnsByIdentifierInChangesAccordion(
instance.hrid,
BULK_EDIT_TABLE_COLUMN_HEADERS.INVENTORY_INSTANCES.ADMINISTRATIVE_NOTE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.uploadFile(instanceUUIDsFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyPaneTitleFileName(instanceUUIDsFileName);
BulkEditSearchPane.verifyPaneRecordsCount(`${numberOfRecords}`);
BulkEditSearchPane.verifyPaneRecordsCount(`${numberOfRecords} instance`);
BulkEditSearchPane.verifyFileNameHeadLine(instanceUUIDsFileName);

createdInstanceHrids.forEach((instanceHrid, index) => {
Expand All @@ -112,11 +112,11 @@ describe('bulk-edit', () => {
);
});

BulkEditSearchPane.verifyErrorLabel(
instanceUUIDsFileName,
numberOfRecords,
numberOfRecords,
);
BulkEditSearchPane.verifyErrorLabel(10);

invalidInstanceIds.forEach((invalidInstanceId) => {
BulkEditSearchPane.verifyNonMatchedResults(invalidInstanceId);
});

createdInstanceHrids.forEach((instanceHrid) => {
BulkEditSearchPane.verifyExactChangesUnderColumnsByIdentifierInResultsAccordion(
Expand Down Expand Up @@ -146,12 +146,6 @@ describe('bulk-edit', () => {
);
});

BulkEditSearchPane.verifyNonMatchedResults();

invalidInstanceIds.forEach((invalidInstanceId) => {
BulkEditSearchPane.verifyReasonForErrorByIdentifier(invalidInstanceId, 'No match found ');
});

BulkEditSearchPane.verifyActionsAfterConductedInAppUploading(true, true);
BulkEditSearchPane.verifyInstanceActionShowColumns();
BulkEditSearchPane.uncheckShowColumnCheckbox(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.uploadFile(instanceUUIDsFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyPaneTitleFileName(instanceUUIDsFileName);
BulkEditSearchPane.verifyPaneRecordsCount('6');
BulkEditSearchPane.verifyPaneRecordsCount('6 instance');
BulkEditSearchPane.verifyFileNameHeadLine(instanceUUIDsFileName);

createdInstanceHrids.forEach((instanceHrid) => {
Expand All @@ -281,7 +281,7 @@ describe('bulk-edit', () => {
);
});

BulkEditSearchPane.verifyErrorLabel(instanceUUIDsFileName, 6, 5);
BulkEditSearchPane.verifyErrorLabel(5);
BulkEditActions.openActions();
BulkEditSearchPane.changeShowColumnCheckboxIfNotYet(
BULK_EDIT_TABLE_COLUMN_HEADERS.INVENTORY_INSTANCES.SUPPRESS_FROM_DISCOVERY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.uploadFile(instanceUUIDsFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyPaneTitleFileName(instanceUUIDsFileName);
BulkEditSearchPane.verifyPaneRecordsCount('6');
BulkEditSearchPane.verifyPaneRecordsCount('6 instance');
BulkEditSearchPane.verifyFileNameHeadLine(instanceUUIDsFileName);

createdInstanceHrids.forEach((instanceHrid) => {
Expand All @@ -273,7 +273,7 @@ describe('bulk-edit', () => {
);
});

BulkEditSearchPane.verifyErrorLabel(instanceUUIDsFileName, 6, 5);
BulkEditSearchPane.verifyErrorLabel(5);
BulkEditActions.openActions();
BulkEditSearchPane.changeShowColumnCheckboxIfNotYet(
BULK_EDIT_TABLE_COLUMN_HEADERS.INVENTORY_INSTANCES.SUPPRESS_FROM_DISCOVERY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ describe('bulk-edit', () => {
BulkEditActions.commitChanges();
BulkEditSearchPane.waitFileUploading();
BulkEditActions.verifySuccessBanner(1);
BulkEditSearchPane.verifyPaneRecordsChangedCount(1);
BulkEditSearchPane.verifyPaneRecordsChangedCount('1 item');

updatedNotesHeaderValueSets.forEach((updatedNoteHeaderValue) => {
BulkEditSearchPane.verifyExactChangesUnderColumnsByIdentifierInChangesAccordion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.waitFileUploading();

BulkEditSearchPane.verifyErrorLabel(invalidHoldingUUIDsFileName, 0, 1);
BulkEditSearchPane.verifyPaneRecordsCount(0);
BulkEditSearchPane.verifyPaneRecordsCount('0 holding');
BulkEditSearchPane.verifyNonMatchedResults();
BulkEditActions.openActions();
BulkEditActions.downloadMatchedRecordsAbsent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('bulk-edit', () => {
// Download matched records
BulkEditActions.downloadMatchedResults();
BulkEditSearchPane.verifyMatchedResults(item.firstBarcode);
BulkEditSearchPane.verifyPaneRecordsCount(1);
BulkEditSearchPane.verifyPaneRecordsCount('1 item');
BulkEditActions.openInAppStartBulkEditFrom();
BulkEditActions.verifyRowIcons();
// Select "Temporary item location" from "Options" dropdown and "Replace with" option from "Select option" dropdown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.checkForUploading(usernamesFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyErrorLabel(usernamesFileName, 1, 1);
BulkEditSearchPane.verifyPaneRecordsCount(1);
BulkEditSearchPane.verifyPaneRecordsCount('1 user');
BulkEditSearchPane.verifyMatchedResults(user.username);

// Click "Actions" menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.uploadFile(instanceHRIDFileName);
BulkEditSearchPane.checkForUploading(instanceHRIDFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyPaneRecordsCount(2);
BulkEditSearchPane.verifyPaneRecordsCount('2 holding');

BulkEditActions.downloadMatchedResults();
BulkEditFiles.verifyMatchedResultFileContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.waitFileUploading();
// Check the result of uploading the .csv file with Items barcodes
BulkEditSearchPane.verifyMatchedResults(item.itemBarcode);
BulkEditSearchPane.verifyPaneRecordsCount(1);
BulkEditSearchPane.verifyPaneRecordsCount('1 item');
// Click "Actions" menu => Select "Start Bulk edit" option
BulkEditActions.openActions();
BulkEditActions.openInAppStartBulkEditFrom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ describe('bulk-edit', () => {
]);
BulkEditActions.commitChanges();
BulkEditActions.verifySuccessBanner(0);
BulkEditSearchPane.verifyErrorLabelAfterChanges(instanceHRIDFileName, 0, 2);
BulkEditSearchPane.verifyErrorLabel(2);

[hridValues.folioHrid, hridValues.marcHrid].forEach((hrid) => {
BulkEditSearchPane.verifyErrorByIdentifier(hrid, 'No change in value required');
});

BulkEditActions.openActions();
BulkEditActions.downloadErrors();
ExportFile.verifyFileIncludes(errorsFromCommittingFileName, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('bulk-edit', () => {
`${folioItem.instanceId},false,true,`,
`${marcInstances[0].instanceId},false,true,`,
`${unsuppressedFolioItem.instanceId},false,false,`,
`${marcInstances[1].instanceId},false,,`,
`${marcInstances[1].instanceId},false,false,`,
]);
BulkEditActions.openStartBulkEditInstanceForm();
BulkEditActions.verifyModifyLandingPageBeforeModifying();
Expand Down Expand Up @@ -152,11 +152,13 @@ describe('bulk-edit', () => {
unsuppressedFolioItem.instanceId,
marcInstances[1].instanceId,
);
BulkEditSearchPane.verifyNonMatchedResults(
folioItem.instanceId,
marcInstances[0].instanceId,
);
BulkEditSearchPane.verifyErrorLabelAfterChanges(instanceUUIDsFileName, 2, 2);

BulkEditSearchPane.verifyErrorLabel(2);

[folioItem.instanceId, marcInstances[0].instanceId].forEach((instanceId) => {
BulkEditSearchPane.verifyErrorByIdentifier(instanceId, 'No change in value required');
});

BulkEditActions.openActions();
BulkEditActions.downloadChangedCSV();
BulkEditActions.downloadErrors();
Expand Down Expand Up @@ -187,7 +189,7 @@ describe('bulk-edit', () => {
`${folioItem.instanceId},false,true,`,
`${marcInstances[0].instanceId},false,true,`,
`${unsuppressedFolioItem.instanceId},false,false,`,
`${marcInstances[1].instanceId},false,,`,
`${marcInstances[1].instanceId},false,false,`,
]);

BulkEditLogs.downloadFileWithProposedChanges();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('bulk-edit', () => {
BulkEditSearchPane.uploadFile(userUUIDsFileName);
BulkEditSearchPane.waitFileUploading();
BulkEditSearchPane.verifyErrorLabel(userUUIDsFileName, 0, 1);
BulkEditSearchPane.verifyPaneRecordsCount(0);
BulkEditSearchPane.verifyPaneRecordsCount('0 user');
BulkEditSearchPane.verifyNonMatchedResults();

// Navigate to the "Export manager" app
Expand Down
Loading

0 comments on commit d7038d5

Please sign in to comment.