diff options
author | Sun Zhe <31067185+ZheSun88@users.noreply.github.com> | 2019-01-02 11:55:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 11:55:19 +0200 |
commit | 6222e6147d78f119e5caf76e300fb0b05e8a6a7b (patch) | |
tree | 5ee112cb9bad3b7820181dcaf85c848d30ea77cc /uitest | |
parent | 37750089927996833669b61284d28411592868bd (diff) | |
download | vaadin-framework-6222e6147d78f119e5caf76e300fb0b05e8a6a7b.tar.gz vaadin-framework-6222e6147d78f119e5caf76e300fb0b05e8a6a7b.zip |
Fix wrong year assert in DateField test (#11404)
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 |