-
Notifications
You must be signed in to change notification settings - Fork 16
[EAPQE-5470] Add support for MicroProfile LRA in the console #145
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
Open
hpehl
wants to merge
1
commit into
hal:main
Choose a base branch
from
hpehl:EAPQE-5470
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
90 changes: 90 additions & 0 deletions
90
...ress/e2e/microprofile-lra/test-configuration-subsystem-microprofile-lra-coordinator.cy.ts
This file contains hidden or 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,90 @@ | ||
| describe("TESTS: Configuration => Subsystem => MicroProfile LRA Coordinator", () => { | ||
| const address = ["subsystem", "microprofile-lra-coordinator"]; | ||
| const configurationFormId = "model-browser-model-browser-root-form"; | ||
|
|
||
| const serverAttr = { | ||
| name: "server", | ||
| customValue: "custom-server", | ||
| expressionProperty: "lra.coordinator.server", | ||
| expressionPropertyValue: "expression-server", | ||
| expressionValue: "${lra.coordinator.server}", | ||
| }; | ||
|
|
||
| const hostAttr = { | ||
| name: "host", | ||
| customValue: "custom-host", | ||
| expressionProperty: "lra.coordinator.host", | ||
| expressionPropertyValue: "expression-host", | ||
| expressionValue: "${lra.coordinator.host}", | ||
| }; | ||
|
|
||
| let managementEndpoint: string; | ||
|
|
||
| function navigateToLRACoordinatorPage() { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| } | ||
|
|
||
| before(function () { | ||
| cy.startWildflyContainer().then((result) => { | ||
| managementEndpoint = result as string; | ||
| cy.skipIf(cy.isEAP(managementEndpoint), this); | ||
| cy.addAddress(managementEndpoint, ["extension", "org.wildfly.extension.microprofile.lra-coordinator"], {}); | ||
| cy.addAddress(managementEndpoint, address, {}); | ||
| cy.addAddress(managementEndpoint, ["system-property", serverAttr.expressionProperty], { | ||
| value: serverAttr.expressionPropertyValue, | ||
| }); | ||
| cy.addAddress(managementEndpoint, ["system-property", hostAttr.expressionProperty], { | ||
| value: hostAttr.expressionPropertyValue, | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| after(() => { | ||
| cy.task("stop:containers"); | ||
| }); | ||
|
|
||
| it("Edit server", () => { | ||
| navigateToLRACoordinatorPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, serverAttr.name, serverAttr.customValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, serverAttr.name, serverAttr.customValue); | ||
| }); | ||
|
|
||
| it("Edit host", () => { | ||
| navigateToLRACoordinatorPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, hostAttr.name, hostAttr.customValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, hostAttr.name, hostAttr.customValue); | ||
| }); | ||
|
|
||
| it("Edit server with expression", () => { | ||
| const selector = `input#${configurationFormId}-${serverAttr.name}-editing.form-control`; | ||
| navigateToLRACoordinatorPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.textExpression(configurationFormId, serverAttr.name, serverAttr.expressionValue, { selector }); | ||
| cy.saveForm(configurationFormId); | ||
| cy.get(".toast-notifications-list-pf .alert").should("be.visible"); | ||
| cy.verifyAttributeAsExpression(managementEndpoint, address, serverAttr.name, serverAttr.expressionValue); | ||
| }); | ||
|
|
||
| it("Edit host with expression", () => { | ||
| const selector = `input#${configurationFormId}-${hostAttr.name}-editing.form-control`; | ||
| navigateToLRACoordinatorPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.textExpression(configurationFormId, hostAttr.name, hostAttr.expressionValue, { selector }); | ||
| cy.saveForm(configurationFormId); | ||
| cy.get(".toast-notifications-list-pf .alert").should("be.visible"); | ||
| cy.verifyAttributeAsExpression(managementEndpoint, address, hostAttr.name, hostAttr.expressionValue); | ||
| }); | ||
|
|
||
| it("Reset configuration", () => { | ||
| navigateToLRACoordinatorPage(); | ||
| cy.get('#model-browser-model-browser-root-form-links > [data-toggle="tooltip"]'); | ||
| cy.resetForm(configurationFormId, managementEndpoint, address); | ||
| }); | ||
| }); | ||
125 changes: 125 additions & 0 deletions
125
...ress/e2e/microprofile-lra/test-configuration-subsystem-microprofile-lra-participant.cy.ts
This file contains hidden or 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,125 @@ | ||
| describe("TESTS: Configuration => Subsystem => MicroProfile LRA Participant", () => { | ||
| const address = ["subsystem", "microprofile-lra-participant"]; | ||
| const configurationFormId = "model-browser-model-browser-root-form"; | ||
|
|
||
| const coordinatorUrlAttr = { | ||
| name: "lra-coordinator-url", | ||
| customValue: "http://lra-coordinator:8080/lra-coordinator/lra-coordinator", | ||
| expressionProperty: "lra.participant.coordinator.url", | ||
| expressionPropertyValue: "http://expression-coordinator:8080/lra-coordinator/lra-coordinator", | ||
| expressionValue: "${lra.participant.coordinator.url}", | ||
| }; | ||
|
|
||
| const proxyServerAttr = { | ||
| name: "proxy-server", | ||
| customValue: "custom-proxy-server", | ||
| expressionProperty: "lra.participant.proxy.server", | ||
| expressionPropertyValue: "expression-proxy-server", | ||
| expressionValue: "${lra.participant.proxy.server}", | ||
| }; | ||
|
|
||
| const proxyHostAttr = { | ||
| name: "proxy-host", | ||
| customValue: "custom-proxy-host", | ||
| expressionProperty: "lra.participant.proxy.host", | ||
| expressionPropertyValue: "expression-proxy-host", | ||
| expressionValue: "${lra.participant.proxy.host}", | ||
| }; | ||
|
|
||
| let managementEndpoint: string; | ||
|
|
||
| function navigateToLRAParticipantPage() { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| } | ||
|
|
||
| before(function () { | ||
| cy.startWildflyContainer().then((result) => { | ||
| managementEndpoint = result as string; | ||
| cy.skipIf(cy.isEAP(managementEndpoint), this); | ||
|
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. Same question as in the coordinator test — could you clarify the intent of |
||
| cy.addAddress(managementEndpoint, ["extension", "org.wildfly.extension.microprofile.lra-participant"], {}); | ||
| cy.addAddress(managementEndpoint, address, {}); | ||
| cy.addAddress(managementEndpoint, ["system-property", coordinatorUrlAttr.expressionProperty], { | ||
| value: coordinatorUrlAttr.expressionPropertyValue, | ||
| }); | ||
| cy.addAddress(managementEndpoint, ["system-property", proxyServerAttr.expressionProperty], { | ||
| value: proxyServerAttr.expressionPropertyValue, | ||
| }); | ||
| cy.addAddress(managementEndpoint, ["system-property", proxyHostAttr.expressionProperty], { | ||
| value: proxyHostAttr.expressionPropertyValue, | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| after(() => { | ||
| cy.task("stop:containers"); | ||
| }); | ||
|
|
||
| it("Edit lra-coordinator-url", () => { | ||
| navigateToLRAParticipantPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, coordinatorUrlAttr.name, coordinatorUrlAttr.customValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, coordinatorUrlAttr.name, coordinatorUrlAttr.customValue); | ||
| }); | ||
|
|
||
| it("Edit proxy-server", () => { | ||
| navigateToLRAParticipantPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, proxyServerAttr.name, proxyServerAttr.customValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, proxyServerAttr.name, proxyServerAttr.customValue); | ||
| }); | ||
|
|
||
| it("Edit proxy-host", () => { | ||
| navigateToLRAParticipantPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, proxyHostAttr.name, proxyHostAttr.customValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, proxyHostAttr.name, proxyHostAttr.customValue); | ||
| }); | ||
|
|
||
| it("Edit lra-coordinator-url with expression", () => { | ||
| const selector = `input#${configurationFormId}-${coordinatorUrlAttr.name}-editing.form-control`; | ||
| navigateToLRAParticipantPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.textExpression(configurationFormId, coordinatorUrlAttr.name, coordinatorUrlAttr.expressionValue, { selector }); | ||
| cy.saveForm(configurationFormId); | ||
| cy.get(".toast-notifications-list-pf .alert").should("be.visible"); | ||
| cy.verifyAttributeAsExpression( | ||
| managementEndpoint, | ||
| address, | ||
| coordinatorUrlAttr.name, | ||
| coordinatorUrlAttr.expressionValue, | ||
| ); | ||
| }); | ||
|
|
||
| it("Edit proxy-server with expression", () => { | ||
| const selector = `input#${configurationFormId}-${proxyServerAttr.name}-editing.form-control`; | ||
| navigateToLRAParticipantPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.textExpression(configurationFormId, proxyServerAttr.name, proxyServerAttr.expressionValue, { selector }); | ||
| cy.saveForm(configurationFormId); | ||
| cy.get(".toast-notifications-list-pf .alert").should("be.visible"); | ||
| cy.verifyAttributeAsExpression(managementEndpoint, address, proxyServerAttr.name, proxyServerAttr.expressionValue); | ||
| }); | ||
|
|
||
| it("Edit proxy-host with expression", () => { | ||
| const selector = `input#${configurationFormId}-${proxyHostAttr.name}-editing.form-control`; | ||
| navigateToLRAParticipantPage(); | ||
| cy.editForm(configurationFormId); | ||
| cy.textExpression(configurationFormId, proxyHostAttr.name, proxyHostAttr.expressionValue, { selector }); | ||
| cy.saveForm(configurationFormId); | ||
| cy.get(".toast-notifications-list-pf .alert").should("be.visible"); | ||
| cy.verifyAttributeAsExpression(managementEndpoint, address, proxyHostAttr.name, proxyHostAttr.expressionValue); | ||
| }); | ||
|
|
||
| it("Reset configuration", () => { | ||
| navigateToLRAParticipantPage(); | ||
| cy.get('#model-browser-model-browser-root-form-links > [data-toggle="tooltip"]'); | ||
| cy.resetForm(configurationFormId, managementEndpoint, address); | ||
| }); | ||
| }); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you clarify the intent of
cy.skipIf(cy.isEAP(managementEndpoint), this)in both test files? MicroProfile LRA is an EAP XP feature, so ideally these tests should also run on EAP XP. Ifcy.isEAP()returnstruefor both base EAP and EAP XP, the tests would be skipped on all EAP variants and only run on WildFly upstream — is that intentional?