-
Notifications
You must be signed in to change notification settings - Fork 13
[JBEAP-29210] Add realm to Security Domain #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,69 @@ | ||||||||||
| describe("TESTS: Configuration => Subsystem => Security => Settings => Global Settings", () => { | ||||||||||
| let managementEndpoint: string; | ||||||||||
|
|
||||||||||
| const address = ["subsystem", "elytron", "security-domain", "ApplicationDomain"]; | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider extracting |
||||||||||
|
|
||||||||||
| const navigation = { | ||||||||||
| sslButton: "#ssl-item", | ||||||||||
| securityDomainButton: "#elytron-security-domain-item", | ||||||||||
| securityDomainRealmsButton: "#hal-uid-5", | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this random number changes between version, ID shouldn't be used |
||||||||||
| }; | ||||||||||
|
|
||||||||||
| const realmsForm = { | ||||||||||
| id: "elytron-security-domain-realms-add", | ||||||||||
| addButton: "elytron-security-domain-realms-table", | ||||||||||
| principalTransformer: { | ||||||||||
| id: "#elytron-security-domain-realms-add-editing > div:nth-child(2)", | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's lot of repetions of Lines 160 to 163 in c79dbe6
|
||||||||||
| text: "Principal Transformer", | ||||||||||
| }, | ||||||||||
| roleDecoder: { | ||||||||||
| id: "#elytron-security-domain-realms-add-editing > div:nth-child(3)", | ||||||||||
| name: "role-decoder", | ||||||||||
| text: "Role Decoder", | ||||||||||
| value: "groups-to-roles", | ||||||||||
| }, | ||||||||||
| roleMapper: { | ||||||||||
| id: "#elytron-security-domain-realms-add-editing > div:nth-child(4)", | ||||||||||
| name: "role-mapper", | ||||||||||
| text: "Role Mapper", | ||||||||||
| value: "super-user-mapper", | ||||||||||
| }, | ||||||||||
| realm: { | ||||||||||
| id: "#elytron-security-domain-realms-add-editing > div:nth-child(5)", | ||||||||||
| name: "realm", | ||||||||||
| text: "Realm", | ||||||||||
| value: "ManagementRealm", | ||||||||||
| }, | ||||||||||
| expectedResult: { "role-decoder": "groups-to-roles", "role-mapper": "super-user-mapper", realm: "ManagementRealm" }, | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| before(() => { | ||||||||||
| cy.startWildflyContainer().then((result) => { | ||||||||||
| managementEndpoint = result as string; | ||||||||||
| }); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| after(() => { | ||||||||||
| cy.task("stop:containers"); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| it("Add realm to Security Domain", () => { | ||||||||||
| cy.navigateTo(managementEndpoint, "elytron-other"); | ||||||||||
| cy.get(navigation.sslButton).click(); | ||||||||||
| cy.get(navigation.securityDomainButton).click(); | ||||||||||
| cy.get(navigation.securityDomainRealmsButton).click(); | ||||||||||
| cy.addInTable(realmsForm.addButton); | ||||||||||
| cy.get(realmsForm.principalTransformer.id) | ||||||||||
| .should("be.visible") | ||||||||||
| .should("contain.text", realmsForm.principalTransformer.text); | ||||||||||
| cy.get(realmsForm.roleDecoder.id).should("be.visible").should("contain.text", realmsForm.roleDecoder.text); | ||||||||||
| cy.get(realmsForm.roleMapper.id).should("be.visible").should("contain.text", realmsForm.roleMapper.text); | ||||||||||
| cy.get(realmsForm.realm.id).should("be.visible").should("contain.text", realmsForm.realm.text); | ||||||||||
| cy.text(realmsForm.id, realmsForm.roleDecoder.name, realmsForm.roleDecoder.value); | ||||||||||
| cy.text(realmsForm.id, realmsForm.roleMapper.name, realmsForm.roleMapper.value); | ||||||||||
| cy.text(realmsForm.id, realmsForm.realm.name, realmsForm.realm.value); | ||||||||||
| cy.confirmAddResourceWizard(); | ||||||||||
| cy.verifySuccess(); | ||||||||||
| cy.verifyListAttributeContains(managementEndpoint, address, "realms", realmsForm.expectedResult); | ||||||||||
| }); | ||||||||||
| }); | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.