-
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
214 changed files
with
9,601 additions
and
1,031 deletions.
There are no files selected for viewing
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
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
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
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
118 changes: 118 additions & 0 deletions
118
cypress/e2e/bulk-edit/in-app/bulk-edit-in-app-items-duplicate-checkout-note-checkin.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,118 @@ | ||
import TopMenu from '../../../support/fragments/topMenu'; | ||
import testTypes from '../../../support/dictionary/testTypes'; | ||
import permissions from '../../../support/dictionary/permissions'; | ||
import BulkEditSearchPane from '../../../support/fragments/bulk-edit/bulk-edit-search-pane'; | ||
import devTeams from '../../../support/dictionary/devTeams'; | ||
import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances'; | ||
import getRandomPostfix from '../../../support/utils/stringTools'; | ||
import FileManager from '../../../support/utils/fileManager'; | ||
import Users from '../../../support/fragments/users/users'; | ||
import BulkEditActions from '../../../support/fragments/bulk-edit/bulk-edit-actions'; | ||
import ExportFile from '../../../support/fragments/data-export/exportFile'; | ||
import TopMenuNavigation from '../../../support/fragments/topMenuNavigation'; | ||
import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter'; | ||
import ItemRecordView from '../../../support/fragments/inventory/item/itemRecordView'; | ||
|
||
let user; | ||
const notes = { | ||
checkInNote: 'CheckInNote', | ||
checkOutNote: 'CheckOutNote', | ||
}; | ||
|
||
const item = { | ||
barcode: getRandomPostfix(), | ||
instanceName: `instance-${getRandomPostfix()}`, | ||
}; | ||
const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`; | ||
const changedRecordsFileName = `*-Changed-Records-${itemBarcodesFileName}`; | ||
|
||
describe('bulk-edit', () => { | ||
describe('in-app approach', () => { | ||
before('create test data', () => { | ||
cy.createTempUser([ | ||
permissions.bulkEditView.gui, | ||
permissions.bulkEditEdit.gui, | ||
permissions.inventoryAll.gui, | ||
permissions.inventoryCRUDItemNoteTypes.gui, | ||
]).then((userProperties) => { | ||
user = userProperties; | ||
cy.login(user.username, user.password, { | ||
path: TopMenu.bulkEditPath, | ||
waiter: BulkEditSearchPane.waitLoading, | ||
}); | ||
InventoryInstances.createInstanceViaApi(item.instanceName, item.barcode); | ||
cy.getItems({ limit: 1, expandAll: true, query: `"barcode"=="${item.barcode}"` }).then( | ||
(res) => { | ||
const itemData = res; | ||
itemData.circulationNotes = [ | ||
{ noteType: 'Check in', note: notes.checkInNote, staffOnly: true }, | ||
{ noteType: 'Check in', note: notes.checkInNote, staffOnly: false }, | ||
{ noteType: 'Check out', note: notes.checkOutNote, staffOnly: true }, | ||
{ noteType: 'Check out', note: notes.checkOutNote, staffOnly: false }, | ||
]; | ||
cy.updateItemViaApi(itemData); | ||
FileManager.createFile(`cypress/fixtures/${itemBarcodesFileName}`, item.barcode); | ||
}, | ||
); | ||
}); | ||
}); | ||
|
||
after('delete test data', () => { | ||
InventoryInstances.deleteInstanceAndHoldingRecordAndAllItemsViaApi(item.barcode); | ||
Users.deleteViaApi(user.userId); | ||
FileManager.deleteFile(`cypress/fixtures/${itemBarcodesFileName}`); | ||
FileManager.deleteFileFromDownloadsByMask(changedRecordsFileName); | ||
}); | ||
|
||
it( | ||
'C405535 Verify Bulk Edit actions for Items notes - duplicate check out note to check in note (firebird)', | ||
{ tags: [testTypes.criticalPath, devTeams.firebird] }, | ||
() => { | ||
BulkEditSearchPane.checkItemsRadio(); | ||
BulkEditSearchPane.selectRecordIdentifier('Item barcode'); | ||
|
||
BulkEditSearchPane.uploadFile(itemBarcodesFileName); | ||
BulkEditSearchPane.waitFileUploading(); | ||
BulkEditSearchPane.verifyMatchedResults(item.barcode); | ||
BulkEditActions.openActions(); | ||
BulkEditSearchPane.changeShowColumnCheckbox('Circulation Notes'); | ||
BulkEditActions.openInAppStartBulkEditFrom(); | ||
|
||
BulkEditActions.verifyItemOptions(); | ||
BulkEditActions.verifyItemCheckInNoteActions(); | ||
BulkEditActions.duplicateCheckInNote('out'); | ||
|
||
BulkEditActions.confirmChanges(); | ||
const changes = [ | ||
`Check in;${notes.checkInNote};true`, | ||
`Check in;${notes.checkInNote};false`, | ||
`Check out;${notes.checkOutNote};true`, | ||
`Check out;${notes.checkOutNote};false`, | ||
`Check in;${notes.checkOutNote};true`, | ||
`Check in;${notes.checkOutNote};false`, | ||
]; | ||
BulkEditActions.verifyChangesInAreYouSureForm('Circulation Notes', changes); | ||
BulkEditActions.commitChanges(); | ||
BulkEditSearchPane.waitFileUploading(); | ||
BulkEditSearchPane.verifyChangedResults(item.barcode); | ||
BulkEditActions.openActions(); | ||
BulkEditActions.downloadChangedCSV(); | ||
ExportFile.verifyFileIncludes(changedRecordsFileName, changes); | ||
|
||
changes.forEach((value) => { | ||
BulkEditSearchPane.verifyChangesUnderColumns('Circulation Notes', value); | ||
}); | ||
|
||
TopMenuNavigation.navigateToApp('Inventory'); | ||
InventorySearchAndFilter.switchToItem(); | ||
InventorySearchAndFilter.searchByParameter('Barcode', item.barcode); | ||
ItemRecordView.waitLoading(); | ||
ItemRecordView.checkCheckInNote( | ||
`${notes.checkInNote}${notes.checkInNote}${notes.checkOutNote}${notes.checkOutNote}`, | ||
'Yes\nNo\nYes\nNo', | ||
); | ||
ItemRecordView.checkCheckOutNote(`${notes.checkOutNote}${notes.checkOutNote}`, 'Yes\nNo'); | ||
}, | ||
); | ||
}); | ||
}); |
157 changes: 157 additions & 0 deletions
157
cypress/e2e/bulk-edit/logs/in-app/bulk-edit-logs-in-app-suppressed-holdings-false.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,157 @@ | ||
import testTypes from '../../../../support/dictionary/testTypes'; | ||
import devTeams from '../../../../support/dictionary/devTeams'; | ||
import permissions from '../../../../support/dictionary/permissions'; | ||
import BulkEditSearchPane from '../../../../support/fragments/bulk-edit/bulk-edit-search-pane'; | ||
import BulkEditActions from '../../../../support/fragments/bulk-edit/bulk-edit-actions'; | ||
import BulkEditFiles from '../../../../support/fragments/bulk-edit/bulk-edit-files'; | ||
import TopMenu from '../../../../support/fragments/topMenu'; | ||
import FileManager from '../../../../support/utils/fileManager'; | ||
import getRandomPostfix from '../../../../support/utils/stringTools'; | ||
import Users from '../../../../support/fragments/users/users'; | ||
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances'; | ||
import HoldingsRecordView from '../../../../support/fragments/inventory/holdingsRecordView'; | ||
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter'; | ||
import ItemRecordView from '../../../../support/fragments/inventory/item/itemRecordView'; | ||
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance'; | ||
import TopMenuNavigation from '../../../../support/fragments/topMenuNavigation'; | ||
|
||
let user; | ||
const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`; | ||
const item = { | ||
itemBarcode: getRandomPostfix(), | ||
instanceName: `testBulkEdit_${getRandomPostfix()}`, | ||
}; | ||
const matchedRecordsFileName = `Matched-Records-${itemBarcodesFileName}`; | ||
const previewOfProposedChangesFileName = `*-Updates-Preview-${itemBarcodesFileName}`; | ||
const updatedRecordsFileName = `*-Changed-Records*-${itemBarcodesFileName}`; | ||
|
||
describe('Bulk Edit - Logs', () => { | ||
before('create test data', () => { | ||
cy.createTempUser([ | ||
permissions.bulkEditView.gui, | ||
permissions.bulkEditEdit.gui, | ||
permissions.inventoryAll.gui, | ||
permissions.bulkEditLogsView.gui, | ||
]).then((userProperties) => { | ||
user = userProperties; | ||
cy.login(user.username, user.password, { | ||
path: TopMenu.bulkEditPath, | ||
waiter: BulkEditSearchPane.waitLoading, | ||
}); | ||
|
||
item.instanceId = InventoryInstances.createInstanceViaApi( | ||
item.instanceName, | ||
item.itemBarcode, | ||
); | ||
|
||
FileManager.createFile(`cypress/fixtures/${itemBarcodesFileName}`, item.itemBarcode); | ||
|
||
cy.getItems({ limit: 1, expandAll: true, query: `"barcode"=="${item.itemBarcode}"` }).then( | ||
(res) => { | ||
res.discoverySuppress = true; | ||
cy.updateItemViaApi(res); | ||
}, | ||
); | ||
cy.getHoldings({ | ||
limit: 1, | ||
expandAll: true, | ||
query: `"instanceId"="${item.instanceId}"`, | ||
}).then((holdings) => { | ||
item.holdingsHRID = holdings[0].hrid; | ||
cy.updateHoldingRecord(holdings[0].id, { | ||
...holdings[0], | ||
discoverySuppress: true, | ||
permanentLocationId: 'b241764c-1466-4e1d-a028-1a3684a5da87', | ||
temporaryLocationId: 'b241764c-1466-4e1d-a028-1a3684a5da87', | ||
}); | ||
}); | ||
cy.getInstanceById(item.instanceId).then((instance) => { | ||
instance.discoverySuppress = true; | ||
cy.updateInstance(instance); | ||
}); | ||
}); | ||
}); | ||
|
||
after('delete test data', () => { | ||
Users.deleteViaApi(user.userId); | ||
InventoryInstances.deleteInstanceAndHoldingRecordAndAllItemsViaApi(item.itemBarcode); | ||
FileManager.deleteFile(`cypress/fixtures/${itemBarcodesFileName}`); | ||
FileManager.deleteFileFromDownloadsByMask( | ||
itemBarcodesFileName, | ||
`*${matchedRecordsFileName}`, | ||
previewOfProposedChangesFileName, | ||
updatedRecordsFileName, | ||
); | ||
}); | ||
|
||
it( | ||
'C399063 Verify generated Logs files for Holdings suppressed from discovery (Set false) (firebird) (TaaS)', | ||
{ tags: [testTypes.extendedPath, devTeams.firebird] }, | ||
() => { | ||
BulkEditSearchPane.verifyDragNDropHoldingsItemBarcodesArea(); | ||
BulkEditSearchPane.uploadFile(itemBarcodesFileName); | ||
BulkEditSearchPane.waitFileUploading(); | ||
BulkEditSearchPane.verifyMatchedResults(item.holdingsHRID); | ||
|
||
const suppressFromDiscovery = false; | ||
BulkEditActions.openActions(); | ||
BulkEditSearchPane.changeShowColumnCheckbox('Suppress from discovery'); | ||
BulkEditActions.openInAppStartBulkEditFrom(); | ||
BulkEditActions.editSuppressFromDiscovery(suppressFromDiscovery, 0, true); | ||
BulkEditActions.checkApplyToItemsRecordsCheckbox(); | ||
BulkEditActions.addNewBulkEditFilterString(); | ||
BulkEditActions.clearTemporaryLocation('holdings', 1); | ||
BulkEditActions.confirmChanges(); | ||
BulkEditActions.commitChanges(); | ||
|
||
BulkEditSearchPane.waitFileUploading(); | ||
BulkEditSearchPane.verifyChangesUnderColumns( | ||
'Suppress from discovery', | ||
suppressFromDiscovery, | ||
); | ||
|
||
BulkEditSearchPane.openLogsSearch(); | ||
BulkEditSearchPane.checkHoldingsCheckbox(); | ||
BulkEditSearchPane.clickActionsRunBy(user.username); | ||
|
||
BulkEditSearchPane.downloadFileUsedToTrigger(); | ||
BulkEditFiles.verifyCSVFileRows(itemBarcodesFileName, [item.itemBarcode]); | ||
|
||
BulkEditSearchPane.downloadFileWithMatchingRecords(); | ||
BulkEditFiles.verifyMatchedResultFileContent( | ||
`*${matchedRecordsFileName}`, | ||
[item.itemBarcode], | ||
'holdingsItemBarcode', | ||
); | ||
|
||
BulkEditSearchPane.downloadFileWithProposedChanges(); | ||
BulkEditFiles.verifyMatchedResultFileContent( | ||
previewOfProposedChangesFileName, | ||
[item.itemBarcode], | ||
'holdingsItemBarcode', | ||
); | ||
|
||
BulkEditSearchPane.downloadFileWithUpdatedRecords(); | ||
BulkEditFiles.verifyMatchedResultFileContent( | ||
updatedRecordsFileName, | ||
[item.itemBarcode], | ||
'holdingsItemBarcode', | ||
); | ||
|
||
TopMenuNavigation.navigateToApp('Inventory'); | ||
InventorySearchAndFilter.switchToItem(); | ||
InventorySearchAndFilter.searchByParameter('Barcode', item.itemBarcode); | ||
ItemRecordView.waitLoading(); | ||
ItemRecordView.closeDetailView(); | ||
InventorySearchAndFilter.selectViewHoldings(); | ||
InventoryInstance.verifyHoldingsTemporaryLocation('-'); | ||
HoldingsRecordView.checkMarkAsSuppressedFromDiscoveryAbsent(); | ||
|
||
TopMenuNavigation.navigateToApp('Inventory'); | ||
InventorySearchAndFilter.switchToItem(); | ||
InventorySearchAndFilter.searchByParameter('Barcode', item.itemBarcode); | ||
ItemRecordView.waitLoading(); | ||
ItemRecordView.suppressedAsDiscoveryIsAbsent(); | ||
}, | ||
); | ||
}); |
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
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
Oops, something went wrong.