-
Notifications
You must be signed in to change notification settings - Fork 13
[JBEAP-29211] Add filter to Configurable HTTP Server Mechanism Factory #127
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,70 @@ | ||
| describe("TESTS: Configuration => Subsystem => Security => Settings => Factories / Transformers => HTTP Factories => Configurable HTTP Server Mechanism Factory", () => { | ||
| let managementEndpoint: string; | ||
|
|
||
| const address = ["subsystem", "elytron", "configurable-http-server-mechanism-factory", "configurableHTTPserver"]; | ||
|
|
||
| const httpServerMechanismFactory = "elytron-configurable-http-server-mechanism-factory"; | ||
| const httpServerMechanismFactoryFiltrs = httpServerMechanismFactory + "-filters"; | ||
|
|
||
| const navigationMenu = { | ||
| httpFactoriesItem: "#http-factories-item", | ||
| configurableHTTPServer: "#" + httpServerMechanismFactory + "-item", | ||
| }; | ||
|
|
||
| const factoryForm = { | ||
| id: httpServerMechanismFactory + "-add", | ||
| fieldName: { | ||
| name: "name", | ||
| value: "configurableHTTPserver", | ||
| }, | ||
| fieldFactory: { | ||
| name: "http-server-mechanism-factory", | ||
| value: "global", | ||
| }, | ||
| }; | ||
|
|
||
| const filterForm = { | ||
| id: httpServerMechanismFactoryFiltrs + "-add", | ||
| fieldEnabled: { | ||
| id: "#" + httpServerMechanismFactoryFiltrs + "-add-editing > div:nth-child(2)", | ||
| text: "Enabling", | ||
| }, | ||
| fieldPatternFilter: { | ||
| name: "pattern-filter", | ||
| value: ".*", | ||
| }, | ||
| expectedResult: { enabling: true, "pattern-filter": ".*" }, | ||
| }; | ||
|
|
||
| const filtrsButtonForConfigurableHttpServer = "#hal-uid-1"; | ||
|
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
Collaborator
Author
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 is the ID. Or do you mean something else?
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. yes, the ID suffix is random number and shouldnt be relied on |
||
|
|
||
| before(() => { | ||
| cy.startWildflyContainer().then((result) => { | ||
| managementEndpoint = result as string; | ||
| }); | ||
| }); | ||
|
|
||
| beforeEach(() => { | ||
laDok8 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| cy.navigateTo(managementEndpoint, "elytron-factories-transformers"); | ||
| }); | ||
|
|
||
| after(() => { | ||
| cy.task("stop:containers"); | ||
| }); | ||
|
|
||
| it("Add filter to Factory", () => { | ||
| cy.get(navigationMenu.httpFactoriesItem).click(); | ||
| cy.get(navigationMenu.configurableHTTPServer).click(); | ||
| cy.addInTable(httpServerMechanismFactory + "-table"); | ||
| cy.text(factoryForm.id, factoryForm.fieldName.name, factoryForm.fieldName.value); | ||
| cy.text(factoryForm.id, factoryForm.fieldFactory.name, factoryForm.fieldFactory.value); | ||
| cy.confirmAddResourceWizard(); | ||
| cy.get(filtrsButtonForConfigurableHttpServer).click(); | ||
| cy.addInTable(httpServerMechanismFactoryFiltrs + "-table"); | ||
| cy.get(filterForm.fieldEnabled.id).should("be.visible").should("contain.text", filterForm.fieldEnabled.text); | ||
| cy.text(filterForm.id, filterForm.fieldPatternFilter.name, filterForm.fieldPatternFilter.value); | ||
| cy.confirmAddResourceWizard(); | ||
| cy.verifySuccess(); | ||
| cy.verifyListAttributeContains(managementEndpoint, address, "filters", filterForm.expectedResult); | ||
| }); | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,7 +86,7 @@ describe("TESTS: Update Manager => Channels", () => { | |
| it("Update url channel parameters", () => { | ||
| cy.navigateToSpecificChannel(managementEndpoint, channels.url.name); | ||
| cy.editForm(channelForm); | ||
| cy.get(".tm-tag-remove").click() | ||
| cy.get(".tm-tag-remove").click(); | ||
|
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. I don't disagree with this changes, but it's unnecessarily increasing changed files/PR size here |
||
| cy.formInput(channelForm, "repositories") | ||
| .type(channels.updateUrl.repositories + "{enter}") | ||
| .trigger("change"); | ||
|
|
||
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.
Try avoiding
nth-childmethod for clarityThere 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.
I would like but here it nonstandard check to verify the text. The element itself doesn't have any specific ID to be able use as a selector.
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.
Can't we use something like here:
berg/packages/testsuite/cypress/e2e/ejb/test-configuration-subsystem-ejb-container-remoting-profile.cy.ts
Line 130 in c49dc9b