Skip to content

Commit 45062fd

Browse files
authored
Merge pull request #124 from laDok8/ejb
[HAL-2025] bugfix Ejb
2 parents 61ca181 + c6da3c8 commit 45062fd

4 files changed

Lines changed: 21 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ npm run develop
6767
HAL_IMAGE=quay.io/myorg/hal WILDFLY_IMAGE=quay.io/myorg/wildfly npm test ...
6868
```
6969

70+
- For debugging purposes videos (and screenshots) of failed tests are stored after the test run (works only with chrome).
71+
7072
## Available environment properties
7173

7274
Following is a table of supported environment properties that can be used when running the testsuite.

packages/testsuite/cypress.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ import { defineConfig } from "cypress";
33
import { PullPolicy, GenericContainer, StartedTestContainer, StoppedTestContainer, Wait } from "testcontainers";
44
import { Environment } from "testcontainers/build/types";
55
import { findAPortNotInUse } from "portscanner";
6+
import fs from "fs";
67

78
export default defineConfig({
89
defaultCommandTimeout: 16000,
910
reporter: require.resolve("cypress-multi-reporters/index.js"),
1011
reporterOptions: {
1112
configFile: "reporter-config.json",
1213
},
14+
video: true,
1315
videoCompression: false,
1416
e2e: {
1517
setupNodeEvents(on, config) {
@@ -337,6 +339,12 @@ export default defineConfig({
337339
return Promise.all(promises);
338340
},
339341
});
342+
on("after:spec", (spec: Cypress.Spec, results: CypressCommandLine.RunResult) => {
343+
// Keep videos only for failed specs
344+
if (results && results.video && results.stats.failures === 0 && fs.existsSync(results.video)) {
345+
fs.unlinkSync(results.video);
346+
}
347+
});
340348
return config;
341349
},
342350
},

packages/testsuite/cypress/e2e/ejb/test-configuration-subsystem-ejb-container-remoting-profile.cy.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
22
let managementEndpoint: string;
33

44
const address = ["subsystem", "ejb3", "remoting-profile"];
5-
const remotingProfilesTableId = "ejb3-remoting-profile-table";
6-
const configurationFormId = "ejb3-remoting-profile-form";
5+
const remotingProfilesTableId = "remoting-profile-table";
6+
const configurationFormId = "remoting-profile-form";
77

88
const remotingProfiles = {
99
create: {
@@ -39,9 +39,9 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
3939
it("Create Remoting Profile", () => {
4040
cy.navigateTo(managementEndpoint, "ejb3-configuration");
4141
cy.get("#ejb3-container-item").click();
42-
cy.get("#ejb3-remoting-profile-item").click();
42+
cy.get("#remoting-profile-item").click();
4343
cy.addInTable(remotingProfilesTableId);
44-
cy.text("ejb3-remoting-profile-table-add", "name", remotingProfiles.create.name);
44+
cy.text("remoting-profile-table-add", "name", remotingProfiles.create.name);
4545
cy.confirmAddResourceWizard();
4646
cy.verifySuccess();
4747
cy.validateAddress(managementEndpoint, address.concat(remotingProfiles.create.name), true);
@@ -58,7 +58,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
5858
value = (result as { result: boolean }).result;
5959
cy.navigateTo(managementEndpoint, "ejb3-configuration");
6060
cy.get("#ejb3-container-item").click();
61-
cy.get("#ejb3-remoting-profile-item").click();
61+
cy.get("#remoting-profile-item").click();
6262
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
6363
cy.editForm(configurationFormId);
6464
cy.flip(configurationFormId, "exclude-local-receiver", value);
@@ -84,7 +84,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
8484
value = (result as { result: boolean }).result;
8585
cy.navigateTo(managementEndpoint, "ejb3-configuration");
8686
cy.get("#ejb3-container-item").click();
87-
cy.get("#ejb3-remoting-profile-item").click();
87+
cy.get("#remoting-profile-item").click();
8888
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
8989
cy.editForm(configurationFormId);
9090
cy.flip(configurationFormId, "local-receiver-pass-by-value", value);
@@ -102,7 +102,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
102102
it("Edit static-ejb-discovery via type", () => {
103103
cy.navigateTo(managementEndpoint, "ejb3-configuration");
104104
cy.get("#ejb3-container-item").click();
105-
cy.get("#ejb3-remoting-profile-item").click();
105+
cy.get("#remoting-profile-item").click();
106106
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
107107
cy.editForm(configurationFormId);
108108
cy.formInput(configurationFormId, "static-ejb-discovery")
@@ -127,7 +127,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
127127
it("Edit static-ejb-discovery via wizard", () => {
128128
cy.navigateTo(managementEndpoint, "ejb3-configuration");
129129
cy.get("#ejb3-container-item").click();
130-
cy.get("#ejb3-remoting-profile-item").click();
130+
cy.get("#remoting-profile-item").click();
131131
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
132132
cy.editForm(configurationFormId);
133133
cy.formInput(configurationFormId, "static-ejb-discovery")
@@ -158,7 +158,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
158158
it("Remove", () => {
159159
cy.navigateTo(managementEndpoint, "ejb3-configuration");
160160
cy.get("#ejb3-container-item").click();
161-
cy.get("#ejb3-remoting-profile-item").click();
161+
cy.get("#remoting-profile-item").click();
162162
cy.removeFromTable(remotingProfilesTableId, remotingProfiles.remove.name);
163163
cy.verifySuccess();
164164
cy.validateAddress(managementEndpoint, address.concat(remotingProfiles.remove.name), false);
@@ -167,7 +167,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
167167
it("Reset", () => {
168168
cy.navigateTo(managementEndpoint, "ejb3-configuration");
169169
cy.get("#ejb3-container-item").click();
170-
cy.get("#ejb3-remoting-profile-item").click();
170+
cy.get("#remoting-profile-item").click();
171171
cy.selectInTable(remotingProfilesTableId, remotingProfiles.reset.name);
172172
cy.resetForm(configurationFormId, managementEndpoint, address.concat(remotingProfiles.reset.name));
173173
});

packages/testsuite/cypress/e2e/ejb/test-configuration-subsystem-ejb-state-management-passivation.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ describe("TESTS: Configuration => Subsystem => EJB => State Management => Passiv
128128
cy.addInTable(passivationTableId);
129129
cy.text("ejb3-passivation-table-add", "name", passivations.create.name);
130130
cy.text("ejb3-passivation-table-add", "bean-cache", cacheContainers.default["default-cache"].name);
131-
cy.text("ejb3-passivation-table-add", "bean-cache", cacheContainers.default.name);
131+
cy.text("ejb3-passivation-table-add", "cache-container", cacheContainers.default.name);
132132
cy.text("ejb3-passivation-table-add", "max-size", "1000");
133133
cy.confirmAddResourceWizard();
134134
cy.verifySuccess();

0 commit comments

Comments
 (0)