Skip to content

Commit

Permalink
test: update dtp tests to be in line with web component changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed Sep 13, 2022
1 parent dd74244 commit d9702ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,10 @@ public void detach_attach_onlyServerCanSetFieldToValid() {
}

@Test
public void required_triggerDateInputBlur_assertValidity() {
public void required_triggerBlur_assertValidity() {
$("button").id(REQUIRED_BUTTON).click();

dateInput.sendKeys(Keys.TAB);
assertServerInvalid();
assertClientInvalid();
}

@Test
public void required_triggerTimeInputBlur_assertValidity() {
$("button").id(REQUIRED_BUTTON).click();

timeInput.sendKeys(Keys.TAB);
assertServerInvalid();
assertClientInvalid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void fieldIsInitiallyValid() {
@Test
public void required_triggerDateInputBlur_assertValidity() {
dateInput.sendKeys(Keys.TAB);
timeInput.sendKeys(Keys.TAB);
assertServerInvalid();
assertClientInvalid();
assertErrorMessage(REQUIRED_ERROR_MESSAGE);
Expand Down Expand Up @@ -76,6 +77,7 @@ public void required_changeInputValue_assertValidity() {
public void required_badInput_setDateInputValue_blur_assertValidity() {
setInputValue(dateInput, "INVALID");
dateInput.sendKeys(Keys.TAB);
timeInput.sendKeys(Keys.TAB);
assertServerInvalid();
assertClientInvalid();
assertErrorMessage("");
Expand All @@ -84,7 +86,7 @@ public void required_badInput_setDateInputValue_blur_assertValidity() {
@Test
public void required_badInput_setTimeInputValue_blur_assertValidity() {
setInputValue(timeInput, "INVALID");
dateInput.sendKeys(Keys.TAB);
timeInput.sendKeys(Keys.TAB);
assertServerInvalid();
assertClientInvalid();
assertErrorMessage("");
Expand Down

0 comments on commit d9702ca

Please sign in to comment.