Skip to content

Commit

Permalink
IVYPORTAL-18153 Fix GUI tests - Try out to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lttung-axonivy committed Dec 19, 2024
1 parent f35d5d3 commit b556c31
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,22 @@ public void startSideStep() {
}

public void inputValue(String employee, String from, String to, String representation) {
$(By.id("leave-request:fullname")).shouldBe(Condition.appear).shouldBe(Condition.editable).sendKeys(employee);
$(By.id("leave-request:substitute")).sendKeys(representation);
$(By.id("leave-request:from_input")).sendKeys(from);
$(By.id("leave-request:to_input")).sendKeys(to);
clickByJavaScript($("form[id$='leave-request']"));
$("div[id$='from_panel']").shouldBe(Condition.disappear);
$("div[id$='to_panel']").shouldBe(Condition.disappear);
SelenideElement fullNameElement =
$(By.id("leave-request:fullname")).shouldBe(Condition.appear).shouldBe(Condition.editable);
fullNameElement.click();
fullNameElement.sendKeys(employee);
SelenideElement representationElement = $(By.id("leave-request:substitute"));
representationElement.click();
representationElement.sendKeys(representation);
SelenideElement fromElement = $(By.id("leave-request:from_input"));
fromElement.click();
fromElement.sendKeys(from);
SelenideElement toElement = $(By.id("leave-request:to_input"));
toElement.click();
toElement.sendKeys(to);
// clickByJavaScript($("form[id$='leave-request']"));
// $("div[id$='from_panel']").shouldBe(Condition.disappear);
// $("div[id$='to_panel']").shouldBe(Condition.disappear);
}

public void inputField(String cssSelector, String value) {
Expand Down

0 comments on commit b556c31

Please sign in to comment.