diff options
author | Sun Zhe <31067185+ZheSun88@users.noreply.github.com> | 2019-01-02 13:40:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 13:40:37 +0200 |
commit | 78fd7fcbd2ee344609d0bd28b439b45ee23435cb (patch) | |
tree | ddadc0fd530b2982cc44a4ff3f9ea596fcf95666 /uitest | |
parent | 7e9d1c9fc167d0be3dcd79c88c806865f86fa937 (diff) | |
download | vaadin-framework-78fd7fcbd2ee344609d0bd28b439b45ee23435cb.tar.gz vaadin-framework-78fd7fcbd2ee344609d0bd28b439b45ee23435cb.zip |
Fix wrong year assert in DateField test (#11404) (#11405)
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDateStringTest.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDateStringTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDateStringTest.java index 3f5b756785..f4c3687c18 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDateStringTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDateStringTest.java @@ -1,15 +1,17 @@ package com.vaadin.tests.components.datefield; -import com.vaadin.testbench.By; -import com.vaadin.testbench.elements.AbstractDateFieldElement; -import com.vaadin.testbench.parallel.Browser; -import com.vaadin.tests.tb3.MultiBrowserTest; +import java.time.LocalDate; +import java.util.List; + import org.junit.Test; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; -import java.util.List; +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.AbstractDateFieldElement; +import com.vaadin.testbench.parallel.Browser; +import com.vaadin.tests.tb3.MultiBrowserTest; import static org.junit.Assert.assertEquals; @@ -23,12 +25,12 @@ public class DateFieldUnparsableDateStringTest extends MultiBrowserTest { .findElement(By.className("v-textfield")); dateTextbox.sendKeys("0304", Keys.ENTER); findElement(By.tagName("body")).click(); - assertEquals("03.04.2018", dateTextbox.getAttribute("value")); + assertEquals("03.04."+ LocalDate.now().getYear(), dateTextbox.getAttribute("value")); dateTextbox.clear(); dateTextbox.sendKeys("0304", Keys.ENTER); findElement(By.tagName("body")).click(); - assertEquals("03.04.2018", dateTextbox.getAttribute("value")); + assertEquals("03.04."+ LocalDate.now().getYear(), dateTextbox.getAttribute("value")); } @Override |