-
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
1 parent
4b60e18
commit 9c7e4b9
Showing
1 changed file
with
84 additions
and
0 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
cypress/e2e/consortia/bulk-edit/in-app/bulk-edit-in-app-holdings-items-verify-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,84 @@ | ||
import permissions from '../../../../support/dictionary/permissions'; | ||
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations'; | ||
import BulkEditSearchPane, { | ||
holdingsIdentifiers, | ||
itemIdentifiers, | ||
} from '../../../../support/fragments/bulk-edit/bulk-edit-search-pane'; | ||
import TopMenu from '../../../../support/fragments/topMenu'; | ||
import Users from '../../../../support/fragments/users/users'; | ||
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager'; | ||
|
||
let user; | ||
const selectRecordIdentifierPlaceHolder = 'Select record identifier'; | ||
const itemIdentifiersInCentralTenant = itemIdentifiers.slice(0, 3); | ||
const holdingIdentifiersInCentralTenant = holdingsIdentifiers.slice(0, 3); | ||
|
||
describe('Bulk-edit', () => { | ||
describe('In-app approach', () => { | ||
describe('Consortia', () => { | ||
before('create test data', () => { | ||
cy.getAdminToken(); | ||
cy.createTempUser([ | ||
permissions.bulkEditEdit.gui, | ||
permissions.uiInventoryViewCreateEditHoldings.gui, | ||
permissions.uiInventoryViewCreateEditItems.gui, | ||
]).then((userProperties) => { | ||
user = userProperties; | ||
|
||
cy.assignAffiliationToUser(Affiliations.College, user.userId); | ||
cy.setTenant(Affiliations.College); | ||
cy.assignPermissionsToExistingUser(user.userId, [ | ||
permissions.bulkEditEdit.gui, | ||
permissions.uiInventoryViewCreateEditHoldings.gui, | ||
permissions.uiInventoryViewCreateEditItems.gui, | ||
]); | ||
|
||
cy.login(user.username, user.password, { | ||
path: TopMenu.bulkEditPath, | ||
waiter: BulkEditSearchPane.waitLoading, | ||
}); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central); | ||
}); | ||
}); | ||
|
||
after('delete test data', () => { | ||
cy.resetTenant(); | ||
cy.getAdminToken(); | ||
Users.deleteViaApi(user.userId); | ||
}); | ||
|
||
it( | ||
'C553004 ECS | Verify options for holdings and items on Central and member tenants (consortia) (firebird)', | ||
{ tags: ['smokeECS', 'firebird'] }, | ||
() => { | ||
BulkEditSearchPane.checkHoldingsRadio(); | ||
BulkEditSearchPane.isHoldingsRadioChecked(true); | ||
BulkEditSearchPane.verifyFirstOptionRecordIdentifierDropdown( | ||
selectRecordIdentifierPlaceHolder, | ||
); | ||
BulkEditSearchPane.verifyRecordIdentifiers(holdingIdentifiersInCentralTenant); | ||
BulkEditSearchPane.checkItemsRadio(); | ||
BulkEditSearchPane.isItemsRadioChecked(true); | ||
BulkEditSearchPane.verifyFirstOptionRecordIdentifierDropdown( | ||
selectRecordIdentifierPlaceHolder, | ||
); | ||
BulkEditSearchPane.verifyRecordIdentifiers(itemIdentifiersInCentralTenant); | ||
|
||
ConsortiumManager.switchActiveAffiliation(tenantNames.central, tenantNames.college); | ||
BulkEditSearchPane.checkHoldingsRadio(); | ||
BulkEditSearchPane.isHoldingsRadioChecked(true); | ||
BulkEditSearchPane.verifyFirstOptionRecordIdentifierDropdown( | ||
selectRecordIdentifierPlaceHolder, | ||
); | ||
BulkEditSearchPane.verifyRecordIdentifiers(holdingsIdentifiers); | ||
BulkEditSearchPane.checkItemsRadio(); | ||
BulkEditSearchPane.isItemsRadioChecked(true); | ||
BulkEditSearchPane.verifyFirstOptionRecordIdentifierDropdown( | ||
selectRecordIdentifierPlaceHolder, | ||
); | ||
BulkEditSearchPane.verifyRecordIdentifiers(itemIdentifiers); | ||
}, | ||
); | ||
}); | ||
}); | ||
}); |