Skip to content

Commit

Permalink
[E2E Tests] Fix Close Attributes modal window due to UX changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsolovjo authored and mmelko committed Mar 14, 2024
1 parent 2932d55 commit 1010f48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public CamelAttributeDetailDialog checkValue(String key, String value) {
* Close the Detail dialog.
*/
public void closeAttributeDetailDialog() {
clickButton("Close");
clickButtonByAriaLabel("Close");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ public HawtioPage clickButton(String text) {
return this;
}

/**
* Click on button with a given aria-label.
*
* @param ariaLabel on the given button
*/
public HawtioPage clickButtonByAriaLabel(String ariaLabel) {
$(byXpath("//button[@aria-label='" + ariaLabel + "']")).shouldBe(enabled).click();
return this;
}

/**
* Check an alert message of a successful action.
*
Expand Down

0 comments on commit 1010f48

Please sign in to comment.