Skip to content

Commit

Permalink
fix DateTimepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Oct 16, 2023
1 parent 0bc69a1 commit 84d906a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ public void max_changeDateInputValue_assertValidity() {
assertServerValid();
}

@Test
public void setValue_clearValue_assertValidity() {
setInputValue(dateInput, "1/1/2000");
setInputValue(timeInput, "10:00");
assertServerValid();
assertClientValid();

$("button").id(CLEAR_VALUE_BUTTON).click();
assertServerValid();
assertClientValid();
}

@Test
public void badInput_changeValue_assertValidity() {
setInputValue(dateInput, "INVALID");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,22 @@ public void max_changeValue_assertValidity() {
assertServerValid();
}

@Test
public void setValue_clearValue_assertValidity() {
$("input").id(EXPECTED_VALUE_INPUT).sendKeys("2000-01-01T10:00",
Keys.ENTER);

setInputValue(dateInput, "1/1/2000");
setInputValue(timeInput, "10:00");
assertServerValid();
assertClientValid();

$("button").id(CLEAR_VALUE_BUTTON).click();
assertServerInvalid();
assertClientInvalid();
assertErrorMessage(REQUIRED_ERROR_MESSAGE);
}

@Test
public void badInput_changeValue_assertValidity() {
$("input").id(EXPECTED_VALUE_INPUT).sendKeys("2000-01-01T10:00",
Expand Down

0 comments on commit 84d906a

Please sign in to comment.