-
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.
C369049 Verify that Errors accordoin displays correct identifier on t…
…he confirmation screen (Items barcodes) (firebird) (TaaS),
- Loading branch information
1 parent
634be42
commit d7bd108
Showing
2 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
...lk-edit/in-app/bulk-edit-in-app-verify-errors-accordion-displays-correct-identifier.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,73 @@ | ||
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 item = { | ||
instanceName: `testBulkEdit_${getRandomPostfix()}`, | ||
itemBarcode: getRandomPostfix(), | ||
}; | ||
const itemBarcodesFileName = `itemBarcodes_${getRandomPostfix()}.csv`; | ||
|
||
describe('bulk-edit', () => { | ||
describe('in-app approach', () => { | ||
before('Create test data', () => { | ||
cy.createTempUser([ | ||
Permissions.bulkEditEdit.gui, | ||
Permissions.bulkEditView.gui, | ||
Permissions.inventoryAll.gui, | ||
]).then((userProperties) => { | ||
user = userProperties; | ||
cy.login(user.username, user.password, { | ||
path: TopMenu.bulkEditPath, | ||
waiter: BulkEditSearchPane.waitLoading, | ||
}); | ||
|
||
InventoryInstances.createInstanceViaApi(item.instanceName, item.itemBarcode); | ||
FileManager.createFile(`cypress/fixtures/${itemBarcodesFileName}`, item.itemBarcode); | ||
}); | ||
}); | ||
|
||
after('Delete test data', () => { | ||
Users.deleteViaApi(user.userId); | ||
FileManager.deleteFile(`cypress/fixtures/${itemBarcodesFileName}`); | ||
InventoryInstances.deleteInstanceAndHoldingRecordAndAllItemsViaApi(item.itemBarcode); | ||
}); | ||
|
||
it( | ||
'C369049 Verify that Errors accordoin displays correct identifier on the confirmation screen (Items barcodes) (firebird) (TaaS)', | ||
{ tags: ['extendedPath', 'firebird'] }, | ||
() => { | ||
// Navigate to the "Bulk edit" app => Select the "Inventory-holdings" radio button on the "Record types" accordion => Select "Items barcode" option from the "Record identifier" dropdown | ||
BulkEditSearchPane.checkHoldingsRadio(); | ||
BulkEditSearchPane.selectRecordIdentifier('Item barcodes'); | ||
BulkEditSearchPane.verifyDragNDropHoldingsItemBarcodesArea(); | ||
BulkEditSearchPane.isDragAndDropAreaDisabled(false); | ||
// Upload a .csv file with "Items barcode" by dragging it on the "Drag & drop" area=> Click "Actions" menu => Select the "Start bulk edit" element | ||
BulkEditSearchPane.uploadFile(itemBarcodesFileName); | ||
BulkEditSearchPane.waitFileUploading(); | ||
BulkEditActions.openActions(); | ||
BulkEditActions.openInAppStartBulkEditFrom(); | ||
BulkEditActions.verifyRowIcons(); | ||
// Modify the record by selecting the **same value** that at least **one** Holdings record has (For example,"TEMPORARY HOLDINGS LOCATION" is "Annex" => Select "Annex" location by clicking on the value from "Select location" dropdown list ) | ||
const newLocation = 'Online'; | ||
BulkEditActions.selectOption('Permanent holdings location'); | ||
BulkEditActions.clickSelectedLocation('Select location', newLocation); | ||
BulkEditActions.confirmChanges(); | ||
BulkEditActions.verifyAreYouSureForm(1, newLocation); | ||
|
||
// Click the "Commit changes" button | ||
BulkEditActions.commitChanges(); | ||
BulkEditSearchPane.waitFileUploading(); | ||
BulkEditActions.verifySuccessBanner(0); | ||
BulkEditSearchPane.verifyErrorColumTitles('Record identifier'); | ||
BulkEditSearchPane.verifyNonMatchedResults(item.itemBarcode); | ||
}, | ||
); | ||
}); | ||
}); |
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