-
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.
* Implementation of FAT-10196 * Implementation of FAT-10196 * add all settings permissions * Fix testcases names
- Loading branch information
1 parent
2ae4d01
commit 1a1dff7
Showing
5 changed files
with
100 additions
and
2 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
55 changes: 55 additions & 0 deletions
55
...-manager/consortium-manager-option-is-displayed-in-settings-only-for-central-tenant.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,55 @@ | ||
import Permissions from '../../../support/dictionary/permissions'; | ||
import Affiliations, { tenantNames } from '../../../support/dictionary/affiliations'; | ||
import Users from '../../../support/fragments/users/users'; | ||
import ConsortiumManager from '../../../support/fragments/settings/consortium-manager/consortium-manager'; | ||
import SettingsMenu from '../../../support/fragments/settingsMenu'; | ||
import UsersSearchPane from '../../../support/fragments/users/usersSearchPane'; | ||
import UserEdit from '../../../support/fragments/users/userEdit'; | ||
import TopMenu from '../../../support/fragments/topMenu'; | ||
|
||
describe('Consortia -> Consortium manager', () => { | ||
let user; | ||
|
||
before('Create users, data', () => { | ||
cy.getAdminToken(); | ||
|
||
cy.createTempUser([Permissions.consortiaSettingsSettingsMembershipEdit.gui]) | ||
.then((userProperties) => { | ||
user = userProperties; | ||
}) | ||
.then(() => { | ||
cy.assignAffiliationToUser(Affiliations.College, user.userId); | ||
cy.loginAsAdmin({ path: TopMenu.usersPath, waiter: UsersSearchPane.waitLoading }); | ||
UsersSearchPane.searchByUsername(user.username); | ||
UsersSearchPane.openUser(user.username); | ||
UserEdit.assignAllPermissionsToTenant(tenantNames.college, 'Settings'); | ||
cy.setTenant(Affiliations.College); | ||
cy.assignPermissionsToExistingUser(user.userId, [ | ||
Permissions.consortiaSettingsSettingsMembershipEdit.gui, | ||
Permissions.consortiaSettingsSettingsMembershipView.gui, | ||
]); | ||
cy.login(user.username, user.password, { | ||
path: SettingsMenu.consortiumManagerPath, | ||
waiter: ConsortiumManager.waitLoading, | ||
}); | ||
}); | ||
}); | ||
|
||
after('Delete users, data', () => { | ||
cy.resetTenant(); | ||
cy.getAdminToken(); | ||
Users.deleteViaApi(user.userId); | ||
}); | ||
|
||
it( | ||
'C386869: "Consortium manager" option is displayed in "Settings" only for Central Tenant (consortia) (thunderjet)', | ||
{ tags: ['criticalPath', 'thunderjet'] }, | ||
() => { | ||
ConsortiumManager.varifyConsortiumManagerOnPage(); | ||
ConsortiumManager.switchActiveAffiliationExists(); | ||
ConsortiumManager.switchActiveAffiliation(tenantNames.college); | ||
ConsortiumManager.checkCurrentTenantInTopMenu(tenantNames.college); | ||
ConsortiumManager.varifyConsortiumManagerIsAbsent(); | ||
}, | ||
); | ||
}); |
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