summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDateStringTest.java16
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