summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorSun Zhe <31067185+ZheSun88@users.noreply.github.com>2019-01-02 11:55:19 +0200
committerGitHub <noreply@github.com>2019-01-02 11:55:19 +0200
commit6222e6147d78f119e5caf76e300fb0b05e8a6a7b (patch)
tree5ee112cb9bad3b7820181dcaf85c848d30ea77cc /uitest
parent37750089927996833669b61284d28411592868bd (diff)
downloadvaadin-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.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