Skip to content

Commit

Permalink
remove existing workarounds for edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
kstekovi committed Aug 14, 2023
1 parent b45e9ef commit f70b1ce
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se

it("Edit default-authentication-context", () => {
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.text(configurationFormId, "default-authentication-context", authenticationContextToUpdate);
cy.saveForm(configurationFormId);
Expand All @@ -46,8 +44,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se

it("Edit default-ssl-context", () => {
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.text(configurationFormId, "default-ssl-context", sslContextToUpdate);
cy.saveForm(configurationFormId);
Expand All @@ -57,8 +53,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se

it("Edit disallowed-providers", () => {
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.text(configurationFormId, "disallowed-providers", "DisallowedProvider");
cy.formInput(configurationFormId, "disallowed-providers").type("{enter}").trigger("change");
Expand All @@ -69,8 +63,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se

it("Edit final-providers", () => {
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.text(configurationFormId, "final-providers", providerLoaders.final.name);
cy.saveForm(configurationFormId);
Expand All @@ -80,8 +72,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se

it("Edit initial-providers", () => {
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.text(configurationFormId, "initial-providers", providerLoaders.initial.name);
cy.saveForm(configurationFormId);
Expand All @@ -99,8 +89,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se
}).then((result) => {
value = (result as { result: boolean }).result;
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.flip(configurationFormId, "register-jaspi-factory", value);
cy.saveForm(configurationFormId);
Expand All @@ -111,8 +99,6 @@ describe("TESTS: Configuration => Subsystem => Security => Settings => Global Se

it("Edit security-properties", () => {
cy.navigateTo(managementEndpoint, "elytron");
// this call is just workaround to prevent of occuring JBEAP-25005
cy.help();
cy.editForm(configurationFormId);
cy.text(configurationFormId, "security-properties", "prop=val");
cy.formInput(configurationFormId, "security-properties").type("{enter}").trigger("change");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ describe("TESTS: Configuration => Subsystem => JPA", () => {

it("Edit default-extended-persistence-inheritance", () => {
cy.navigateTo(managementEndpoint, "jpa-configuration");
// this call is just workaround to prevent of occuring JBEAP-25046
cy.help();
cy.editForm(configurationFormId);
cy.formInput(configurationFormId, "default-extended-persistence-inheritance").select("SHALLOW", { force: true });
cy.formInput(configurationFormId, "default-extended-persistence-inheritance").trigger("change", { force: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ describe("TESTS: Update Manager => Channels", () => {

it("Update gav channel parameters", () => {
cy.navigateToSpecificChannel(managementEndpoint, channels.gav.name);
// Same workaround as for JBEAP-25005 and JBEAP-25046 when try to edit form the cypress is to fast
cy.help();
cy.editForm(channelForm);
cy.formInput(channelForm, "repositories")
.clear()
Expand All @@ -87,8 +85,6 @@ describe("TESTS: Update Manager => Channels", () => {

it("Update url channel parameters", () => {
cy.navigateToSpecificChannel(managementEndpoint, channels.url.name);
// Same workaround as for JBEAP-25005 and JBEAP-25046 when try to edit form the cypress is to fast
cy.help();
cy.editForm(channelForm);
cy.formInput(channelForm, "repositories")
.clear()
Expand Down
6 changes: 3 additions & 3 deletions packages/testsuite/cypress/support/form-editing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Cypress.Commands.add("editForm", (formId) => {
const editButton = "#" + formId + ' a.clickable[data-operation="edit"]';
cy.get(`#${formId}-editing`).should("not.be.visible");
cy.get(editButton).click();
// Workaround - the form is sometimes not loaded in time and Cypress is not able to recover from such state
// and click the button. Waiting does not help, but multiple manual checks for the visibility of the button do.
// Note that the button is clicked just one time (probably) once visible.
// Workaround - JBEAP-25005,JBEAP-25046 - the form is sometimes not loaded in time and Cypress is not able to recover
// from such state and click the button. Waiting does not help, but multiple manual checks for the visibility
// of the button do. Note that the button is clicked just one time (probably) once visible.
for (let reClickTry = 0; reClickTry < 5; reClickTry++) {
cy.get(editButton).then(($button) => {
if ($button.is(":visible")) {
Expand Down

0 comments on commit f70b1ce

Please sign in to comment.