Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/manual-test-matrix-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
"microprofile",
"metrics",
"micrometer",
"microprofile-lra",
"opentelemetry",
"runtime",
"security-manager",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scheduled-run-all-tests-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
"mail",
"metrics",
"micrometer",
"microprofile-lra",
"opentelemetry",
"runtime",
"security-manager",
Expand Down
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);
Copy link
Copy Markdown
Collaborator

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. If cy.isEAP() returns true for both base EAP and EAP XP, the tests would be skipped on all EAP variants and only run on WildFly upstream — is that intentional?

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);
});
});
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);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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.skipIf(cy.isEAP(managementEndpoint), this)? If cy.isEAP() returns true for EAP XP as well, these tests would never run on any EAP variant.

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);
});
});
Loading