aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-15 11:06:18 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-15 14:00:58 +0300
commit6b8412033e680ce6e5c7827ac504adf132305726 (patch)
tree0df05d16c324b285610af8910c126b58f4c490c5 /uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java
parent9192b0bb5e5e699b506b3d3e7df4cf295fbea44a (diff)
downloadvaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.tar.gz
vaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.zip
Build uitest war with maven
Change-Id: I32625901ca27a282253df44c6e776cf9632bacda
Diffstat (limited to 'uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java b/uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java
new file mode 100644
index 0000000000..9498413f9b
--- /dev/null
+++ b/uitest/src/test/java/com/vaadin/tests/application/ThreadLocalInstancesTest.java
@@ -0,0 +1,35 @@
+package com.vaadin.tests.application;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class ThreadLocalInstancesTest extends MultiBrowserTest {
+ @Test
+ public void tb2test() throws Exception {
+ openTestURL();
+ $(ButtonElement.class).first().click();
+ assertLogText("1. some app in class init", 15);
+ assertLogText("2. null root in class init", 14);
+ assertLogText("3. some app in app constructor", 13);
+ assertLogText("4. null root in app constructor", 12);
+ assertLogText("5. some app in app init", 11);
+ assertLogText("6. null root in app init", 10);
+ assertLogText("7. some app in root init", 9);
+ assertLogText("8. this root in root init", 8);
+ assertLogText("9. some app in root paint", 7);
+ assertLogText("10. this root in root paint", 6);
+ assertLogText("11. some app in background thread", 5);
+ assertLogText("12. this root in background thread", 4);
+ assertLogText("13. some app in resource handler", 3);
+ assertLogText("14. this root in resource handler", 2);
+ assertLogText("15. some app in button listener", 1);
+ assertLogText("16. this root in button listener", 0);
+ }
+
+ private void assertLogText(String expected, int index) {
+ Assert.assertEquals("Incorrect log text,", expected, getLogRow(index));
+ }
+}