Skip to content
Merged
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ npm run develop
HAL_IMAGE=quay.io/myorg/hal WILDFLY_IMAGE=quay.io/myorg/wildfly npm test ...
```

- For debugging purposes videos (and screenshots) of failed tests are stored after the test run (works only with chrome).

## Available environment properties

Following is a table of supported environment properties that can be used when running the testsuite.
Expand Down
8 changes: 8 additions & 0 deletions packages/testsuite/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { defineConfig } from "cypress";
import { PullPolicy, GenericContainer, StartedTestContainer, StoppedTestContainer, Wait } from "testcontainers";
import { Environment } from "testcontainers/build/types";
import { findAPortNotInUse } from "portscanner";
import fs from "fs";

export default defineConfig({
defaultCommandTimeout: 16000,
reporter: require.resolve("cypress-multi-reporters/index.js"),
reporterOptions: {
configFile: "reporter-config.json",
},
video: true,
videoCompression: false,
e2e: {
setupNodeEvents(on, config) {
Expand Down Expand Up @@ -337,6 +339,12 @@ export default defineConfig({
return Promise.all(promises);
},
});
on("after:spec", (spec: Cypress.Spec, results: CypressCommandLine.RunResult) => {
// Keep videos only for failed specs
if (results && results.video && results.stats.failures === 0 && fs.existsSync(results.video)) {
fs.unlinkSync(results.video);
}
});
return config;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
let managementEndpoint: string;

const address = ["subsystem", "ejb3", "remoting-profile"];
const remotingProfilesTableId = "ejb3-remoting-profile-table";
const configurationFormId = "ejb3-remoting-profile-form";
const remotingProfilesTableId = "remoting-profile-table";
const configurationFormId = "remoting-profile-form";

const remotingProfiles = {
create: {
Expand Down Expand Up @@ -39,9 +39,9 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
it("Create Remoting Profile", () => {
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.addInTable(remotingProfilesTableId);
cy.text("ejb3-remoting-profile-table-add", "name", remotingProfiles.create.name);
cy.text("remoting-profile-table-add", "name", remotingProfiles.create.name);
cy.confirmAddResourceWizard();
cy.verifySuccess();
cy.validateAddress(managementEndpoint, address.concat(remotingProfiles.create.name), true);
Expand All @@ -58,7 +58,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
value = (result as { result: boolean }).result;
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
cy.editForm(configurationFormId);
cy.flip(configurationFormId, "exclude-local-receiver", value);
Expand All @@ -84,7 +84,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
value = (result as { result: boolean }).result;
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
cy.editForm(configurationFormId);
cy.flip(configurationFormId, "local-receiver-pass-by-value", value);
Expand All @@ -102,7 +102,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
it("Edit static-ejb-discovery via type", () => {
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
cy.editForm(configurationFormId);
cy.formInput(configurationFormId, "static-ejb-discovery")
Expand All @@ -127,7 +127,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
it("Edit static-ejb-discovery via wizard", () => {
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.selectInTable(remotingProfilesTableId, remotingProfiles.update.name);
cy.editForm(configurationFormId);
cy.formInput(configurationFormId, "static-ejb-discovery")
Expand Down Expand Up @@ -158,7 +158,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
it("Remove", () => {
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.removeFromTable(remotingProfilesTableId, remotingProfiles.remove.name);
cy.verifySuccess();
cy.validateAddress(managementEndpoint, address.concat(remotingProfiles.remove.name), false);
Expand All @@ -167,7 +167,7 @@ describe("TESTS: Configuration => Subsystem => EJB => Container => Remoting Prof
it("Reset", () => {
cy.navigateTo(managementEndpoint, "ejb3-configuration");
cy.get("#ejb3-container-item").click();
cy.get("#ejb3-remoting-profile-item").click();
cy.get("#remoting-profile-item").click();
cy.selectInTable(remotingProfilesTableId, remotingProfiles.reset.name);
cy.resetForm(configurationFormId, managementEndpoint, address.concat(remotingProfiles.reset.name));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe("TESTS: Configuration => Subsystem => EJB => State Management => Passiv
cy.addInTable(passivationTableId);
cy.text("ejb3-passivation-table-add", "name", passivations.create.name);
cy.text("ejb3-passivation-table-add", "bean-cache", cacheContainers.default["default-cache"].name);
cy.text("ejb3-passivation-table-add", "bean-cache", cacheContainers.default.name);
cy.text("ejb3-passivation-table-add", "cache-container", cacheContainers.default.name);
cy.text("ejb3-passivation-table-add", "max-size", "1000");
cy.confirmAddResourceWizard();
cy.verifySuccess();
Expand Down
Loading