-
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.
Showing
4 changed files
with
85 additions
and
50 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...tia/inventory/instance/limited-edit-permissions-for-shared-folio-instance-on-member.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,68 @@ | ||
import { INSTANCE_SOURCE_NAMES } from '../../../../support/constants'; | ||
import Affiliations, { tenantNames } from '../../../../support/dictionary/affiliations'; | ||
import Permissions from '../../../../support/dictionary/permissions'; | ||
import InstanceRecordView from '../../../../support/fragments/inventory/instanceRecordView'; | ||
import InventoryInstance from '../../../../support/fragments/inventory/inventoryInstance'; | ||
import InventoryInstances from '../../../../support/fragments/inventory/inventoryInstances'; | ||
import InventorySearchAndFilter from '../../../../support/fragments/inventory/inventorySearchAndFilter'; | ||
import ConsortiumManager from '../../../../support/fragments/settings/consortium-manager/consortium-manager'; | ||
import TopMenu from '../../../../support/fragments/topMenu'; | ||
import Users from '../../../../support/fragments/users/users'; | ||
|
||
describe('Inventory', () => { | ||
describe('Instance', () => { | ||
let user; | ||
const testData = { | ||
instanceSource: INSTANCE_SOURCE_NAMES.FOLIO, | ||
}; | ||
|
||
before('Create test data', () => { | ||
cy.getAdminToken(); | ||
InventoryInstance.createInstanceViaApi().then(({ instanceData }) => { | ||
testData.instance = instanceData; | ||
}); | ||
|
||
cy.createTempUser([Permissions.uiInventoryViewInstances.gui]) | ||
.then((userProperties) => { | ||
user = userProperties; | ||
}) | ||
.then(() => { | ||
cy.assignAffiliationToUser(Affiliations.College, user.userId); | ||
cy.setTenant(Affiliations.College); | ||
cy.assignPermissionsToExistingUser(user.userId, [ | ||
Permissions.uiInventoryViewCreateEditInstances.gui, | ||
]); | ||
|
||
cy.login(user.username, user.password, { | ||
path: TopMenu.inventoryPath, | ||
waiter: InventoryInstances.waitContentLoading, | ||
}); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.central); | ||
ConsortiumManager.switchActiveAffiliation(tenantNames.central, tenantNames.college); | ||
}); | ||
}); | ||
|
||
after('Delete test data', () => { | ||
cy.resetTenant(); | ||
cy.getAdminToken(); | ||
InventoryInstance.deleteInstanceViaApi(testData.instance.instanceId); | ||
Users.deleteViaApi(user.userId); | ||
}); | ||
|
||
it( | ||
'C402376 (CONSORTIA) Verify limited Edit permissions for Shared FOLIO instance on Member tenant (consortia) (folijet)', | ||
{ tags: ['criticalPathECS', 'folijet', 'C402376'] }, | ||
() => { | ||
InventorySearchAndFilter.verifySearchAndFilterPane(); | ||
InventorySearchAndFilter.bySource(testData.instanceSource); | ||
cy.wait(1500); | ||
InventorySearchAndFilter.byShared('Yes'); | ||
cy.wait(1500); | ||
InventorySearchAndFilter.searchInstanceByTitle(testData.instance.instanceId); | ||
InventorySearchAndFilter.verifyInstanceDetailsView(); | ||
InstanceRecordView.verifyInstanceSource(testData.instanceSource); | ||
InstanceRecordView.verifyEditInstanceButtonAbsent(); | ||
}, | ||
); | ||
}); | ||
}); |
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