Skip to content

Commit

Permalink
FAT-13331 (#3591)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayimovag committed May 8, 2024
1 parent b9e06ee commit 70071e0
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('bulk-edit', () => {

BulkEditActions.selectOption('Temporary item location');
BulkEditSearchPane.verifyInputLabel('Temporary item location');
BulkEditActions.selectAction('Replace with', 0);
BulkEditActions.selectSecondAction('Replace with', 0);
BulkEditActions.locationLookupExists();
BulkEditSearchPane.verifyInputLabel('Replace with');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ for (let i = 0; i < 5; i++) {
const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`;
let fileContent = '';

describe('bulk-edit', () => {
// Test cannot be automated after test case update
describe.skip('bulk-edit', () => {
describe('in-app approach', () => {
before('create test data', () => {
cy.createTempUser([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`;
const matchedRecordsFileName = `*Matched-Records-${itemBarcodesFileName}`;
const errorsFromMatchingFileName = `*-Matching-Records-Errors-${itemBarcodesFileName}`;

describe('bulk-edit', () => {
// Test cannot be automated after test case update
describe.skip('bulk-edit', () => {
describe('in-app approach', () => {
before('create test data', () => {
cy.createTempUser([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ for (let i = 0; i < 5; i++) {
const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`;
let fileContent = '';

describe('bulk-edit', () => {
// Test cannot be automated after test case update
describe.skip('bulk-edit', () => {
describe('in-app approach', () => {
before('create test data', () => {
cy.createTempUser([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('bulk-edit', () => {
// Select "Temporary item location" from "Options" dropdown and "Replace with" option from "Select option" dropdown;
const newLocation1 = 'Online';
BulkEditActions.selectOption('Temporary item location');
BulkEditActions.selectAction('Replace with', 0);
BulkEditActions.selectSecondAction('Replace with', 0);
BulkEditActions.locationLookupExists();
BulkEditActions.selectLocation(newLocation1, 0);
// Click on the "Plus" icon
Expand All @@ -100,7 +100,7 @@ describe('bulk-edit', () => {
// Select "Item status" from "Options" dropdown and select item status in "Select item status" dropdown
const newLocation2 = 'Online';
BulkEditActions.selectOption('Permanent item location', 1);
BulkEditActions.selectAction('Replace with', 1);
BulkEditActions.selectSecondAction('Replace with', 1);
BulkEditActions.selectLocation(newLocation2, 1);
BulkEditActions.locationLookupExists();
BulkEditActions.clickLocationLookup(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('bulk-edit', () => {

const newLocation = 'Annex';
BulkEditActions.selectOption('Temporary holdings location');
BulkEditActions.selectAction('Replace with', 0);
BulkEditActions.selectSecondAction('Replace with', 0);
BulkEditActions.clickSelectedLocation('Select location', newLocation);
BulkEditActions.confirmChanges();
BulkEditActions.verifyAreYouSureForm(2, newLocation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('bulk-edit', () => {
});

it(
'C365617 Verify that In app bulk edit form for holdings records contains "Select option" placeholder for Options dropdown (firebird) (TaaS)',
'C365617 Verify that In app bulk edit form for holdings records contains "Select option" placeholder for Options dropdown (firebird) (TaaS)',
{ tags: ['extendedPath', 'firebird'] },
() => {
BulkEditSearchPane.verifyDragNDropRecordTypeIdentifierArea('Holdings', 'Item barcodes');
Expand All @@ -66,7 +66,7 @@ describe('bulk-edit', () => {
BulkEditActions.isSelectActionAbsent();

BulkEditActions.selectOption('Temporary holdings location');
BulkEditActions.selectAction('Clear field', 0);
BulkEditActions.selectSecondAction('Clear field', 0);
BulkEditActions.addNewBulkEditFilterString();
BulkEditSearchPane.isConfirmButtonDisabled(true);
BulkEditActions.verifyNewBulkEditRow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('bulk-edit', () => {
BulkEditActions.verifyItemOptions();

BulkEditActions.verifyItemAdminstrativeNoteActions(0);
BulkEditActions.selectAction('Remove all', 0);
BulkEditActions.selectSecondAction('Remove all', 0);
BulkEditSearchPane.isConfirmButtonDisabled(false);
cy.wait(1000);
function performBulkEditOptionActions(option) {
Expand All @@ -98,7 +98,7 @@ describe('bulk-edit', () => {
BulkEditActions.isDisabledRowIcons(false);
// Click "Select option" dropdown on the added row
BulkEditActions.verifyTheOptionsAfterSelectedOption(option[i], i);
BulkEditActions.selectAction('Mark as staff only', i);
BulkEditActions.selectSecondAction('Mark as staff only', i);
BulkEditSearchPane.isConfirmButtonDisabled(false);
}
removeItem(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('bulk-edit', () => {

const newLocation = 'Annex';
BulkEditActions.selectOption('Permanent item location');
BulkEditActions.selectAction('Replace with', 0);
BulkEditActions.selectSecondAction('Replace with', 0);
BulkEditActions.selectLocation(newLocation, 0);

BulkEditActions.clickSelectedLocation(newLocation, 'Select location');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import BulkEditActions from '../../../../support/fragments/bulk-edit/bulk-edit-a
import DateTools from '../../../../support/utils/dateTools';
import BulkEditFiles from '../../../../support/fragments/bulk-edit/bulk-edit-files';
import UsersSearchPane from '../../../../support/fragments/users/usersSearchPane';
import ExportFile from '../../../../support/fragments/data-export/exportFile';

let user;
const afterThreeMonthsDate = DateTools.getAfterThreeMonthsDateObj();
Expand Down Expand Up @@ -89,32 +90,16 @@ describe('Bulk Edit - Logs', () => {
);

BulkEditSearchPane.downloadFileWithProposedChanges();
BulkEditFiles.verifyMatchedResultFileContent(
previewOfProposedChangesFileName,
['graduate'],
'patronGroup',
true,
);
BulkEditFiles.verifyMatchedResultFileContent(
previewOfProposedChangesFileName,
[newExpirationDate.dateWithDashes],
'expirationDate',
true,
);
ExportFile.verifyFileIncludes(previewOfProposedChangesFileName, [
'graduate',
newExpirationDate.dateWithDashes,
]);

BulkEditSearchPane.downloadFileWithUpdatedRecords();
BulkEditFiles.verifyMatchedResultFileContent(
updatedRecordsFileName,
['graduate'],
'patronGroup',
true,
);
BulkEditFiles.verifyMatchedResultFileContent(
updatedRecordsFileName,
[newExpirationDate.dateWithDashes],
'expirationDate',
true,
);
ExportFile.verifyFileIncludes(updatedRecordsFileName, [
'graduate',
newExpirationDate.dateWithDashes,
]);

cy.visit(TopMenu.usersPath);
UsersSearchPane.searchByUsername(user.username);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ describe('bulk-edit', () => {
BulkEditSearchPane.isDragAndDropAreaDisabled(true);
BulkEditSearchPane.verifyDragNDropRecordTypeIdentifierArea('Instances', 'Instance HRIDs');
BulkEditSearchPane.uploadFile(instanceHRIDFileName);
BulkEditSearchPane.checkForUploading(instanceHRIDFileName);
BulkEditSearchPane.verifyMatchedResults(item.instanceHRID);
BulkEditSearchPane.verifyPaneRecordsCount(1);
BulkEditActions.openActions();
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/data-export/data-export-errors-accordion.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ describe('data-export', () => {
DataExportViewAllLogs.verifyErrorsInExportCheckbox('Yes', false);
DataExportViewAllLogs.verifyStatusIncludesAll();
DataExportViewAllLogs.checkErrorsInExportOption('No');
DataExportViewAllLogs.verifyStatusAllCompleted();
DataExportViewAllLogs.checkErrorsInExportOption('Yes');
DataExportViewAllLogs.verifyStatusIncludesAll();
DataExportViewAllLogs.resetAll();
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/settings/users/fee&Fine/schedule-time.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe('Settings (Users): verifying time picker', () => {
});

it(
'C350699 Verify the schedule time -- AM/PM format (firebird)',
{ tags: ['extendedPath', 'firebird'] },
'C350699 Verify the schedule time -- AM/PM format (BAMA)',
{ tags: ['extendedPath', 'BAMA'] },
() => {
TransferFeeFine.selectTransferCriteriaSchedulePeriod('Days');

Expand Down
2 changes: 1 addition & 1 deletion cypress/support/fragments/bulk-edit/bulk-edit-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ export default {
},

noteReplaceWith(noteType, oldNote, newNote, rowIndex = 0) {
this.findValue(noteType);
this.findValue(noteType, rowIndex);
this.fillInFirstTextArea(oldNote, rowIndex);
this.selectSecondAction('Replace with', rowIndex);
this.fillInSecondTextArea(newNote, rowIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,7 @@ export default {

clickJobIdInThirdPane() {
this.verifyThirdPaneExportJobExist();
cy.window()
.document()
.then((doc) => {
doc.addEventListener('click', () => {
// this adds a listener that reloads your page
// after 5 seconds from clicking the download button
setTimeout(() => {
doc.location.reload();
}, 5000);
});
cy.do(KeyValue('Job ID').clickLink());
});
cy.do(KeyValue('Job ID').clickLink());
// Wait for the file to download
cy.wait(5000);
},
Expand Down

0 comments on commit 70071e0

Please sign in to comment.