-
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
04b121e
commit 8241203
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
cypress/e2e/consortia/can-not-view-a-users-affiliations-accordion.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,47 @@ | ||
import permissions from '../../support/dictionary/permissions'; | ||
import TopMenu from '../../support/fragments/topMenu'; | ||
import Users from '../../support/fragments/users/users'; | ||
import UsersCard from '../../support/fragments/users/usersCard'; | ||
import UsersSearchPane from '../../support/fragments/users/usersSearchPane'; | ||
|
||
describe('Consortia', () => { | ||
let firstUser; | ||
let secondUser; | ||
|
||
before(() => { | ||
cy.getAdminToken(); | ||
|
||
cy.createTempUser([]).then((userProperties) => { | ||
firstUser = userProperties; | ||
}); | ||
|
||
cy.createTempUser([permissions.uiUsersView.gui]).then((secondUserProperties) => { | ||
secondUser = secondUserProperties; | ||
cy.login(secondUser.username, secondUser.password, { | ||
path: TopMenu.usersPath, | ||
waiter: Users.waitLoading, | ||
}); | ||
}); | ||
}); | ||
|
||
after(() => { | ||
cy.getAdminToken(); | ||
Users.deleteViaApi(firstUser.userId); | ||
Users.deleteViaApi(secondUser.userId); | ||
}); | ||
|
||
it( | ||
'C380507 A user without appropriate permission can not view a users affiliations accordion (consortia) (thunderjet)', | ||
{ tags: ['criticalPathECS', 'thunderjet'] }, | ||
() => { | ||
UsersSearchPane.searchByUsername(firstUser.username); | ||
UsersSearchPane.selectUserFromList(firstUser.username); | ||
UsersCard.varifyUserCardOpened(); | ||
UsersCard.affiliationsAccordionIsAbsent(); | ||
UsersSearchPane.searchByUsername(secondUser.username); | ||
UsersSearchPane.selectUserFromList(secondUser.username); | ||
UsersCard.varifyUserCardOpened(); | ||
UsersCard.affiliationsAccordionIsAbsent(); | ||
}, | ||
); | ||
}); |
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