From 1de438915468e92ad0657ac4f22dc3e1b1580e63 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 4 Sep 2013 15:58:26 +0300 Subject: Use JUnit 4.11 in all modules (#12572) Change-Id: I244f4afdebe956166a9158d85dc69fd7746c5a47 --- uitest/ivy.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uitest') diff --git a/uitest/ivy.xml b/uitest/ivy.xml index 7ff83324ae..e737165288 100644 --- a/uitest/ivy.xml +++ b/uitest/ivy.xml @@ -61,7 +61,7 @@ - Date: Mon, 10 Jun 2013 21:32:57 +0300 Subject: Include TestBench 3.1.1 in the project (#12572) * Jetty is updated to 8.1.9.v20130131 to avoid conflicts with TestBench dependencies * The new jetty dependens on servlet 3.0 Change-Id: Ibbbc8f5838feb4c132ee2b6f7d7f3f630e95dd68 --- ivysettings.xml | 4 +++ uitest/ivy.xml | 38 ++++++++++++++-------- .../vaadin/launcher/DevelopmentServerLauncher.java | 8 +++-- 3 files changed, 35 insertions(+), 15 deletions(-) (limited to 'uitest') diff --git a/ivysettings.xml b/ivysettings.xml index fa08f3d0bb..e18b2233d1 100644 --- a/ivysettings.xml +++ b/ivysettings.xml @@ -11,6 +11,8 @@ + @@ -23,6 +25,8 @@ + + +]> - + @@ -23,9 +26,6 @@ - - @@ -33,7 +33,9 @@ + rev="${vaadin.version}" conf="build->build"> + + + conf="build->build"> + + - + + + + rev="&jetty.version;" conf="ide, build-provided, jetty-run->default"> + + + rev="&jetty.version;" conf="ide, build-provided, jetty-run->default" /> + rev="&jetty.version;" conf="ide, jetty-run->default" /> + rev="&jetty.version;" conf="ide, build-provided, jetty-run->default" /> + rev="&jetty.version;" conf="ide, jetty-run->default"> + + @@ -71,6 +81,8 @@ + diff --git a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java index 5ab2134cdb..a8d639cbc8 100644 --- a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java +++ b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java @@ -24,10 +24,12 @@ import java.net.ServerSocket; import java.net.Socket; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -181,7 +183,8 @@ public class DevelopmentServerLauncher { String[] paths = serverArgs.get("slowdown").split(","); for (String p : paths) { System.out.println("Slowing down: " + p); - webappcontext.addFilter(SlowFilter.class, p, 1); + webappcontext.addFilter(SlowFilter.class, p, + EnumSet.of(DispatcherType.REQUEST)); } } // --cache=/run/APP/PUBLISHED/*,/other/path/asd.jpg @@ -190,7 +193,8 @@ public class DevelopmentServerLauncher { String[] paths = serverArgs.get("cache").split(","); for (String p : paths) { System.out.println("Enabling cache for: " + p); - webappcontext.addFilter(CacheFilter.class, p, 1); + webappcontext.addFilter(CacheFilter.class, p, + EnumSet.of(DispatcherType.REQUEST)); } } -- cgit v1.2.3 From c7aaa0413f63d938791e760b23fb3f609f285aa0 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Fri, 20 Sep 2013 15:32:12 +0300 Subject: Don't try to cast a connector to Widget. Fixes #12619 Change-Id: I0fe98ca90ed3969f1af1be60668b4c1c561675eb --- .../com/vaadin/client/ui/dd/VTargetInSubtree.java | 4 +- uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html | 51 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html (limited to 'uitest') diff --git a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java index e9061114aa..c3f56b410d 100644 --- a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java +++ b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java @@ -32,7 +32,7 @@ final public class VTargetInSubtree extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler() - .getConnector(); + .getConnector().getWidget(); TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails() .get("itemIdOver")); if (treeNode != null) { @@ -53,4 +53,4 @@ final public class VTargetInSubtree extends VAcceptCriterion { return false; } -} \ No newline at end of file +} diff --git a/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html b/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html new file mode 100644 index 0000000000..844636cb02 --- /dev/null +++ b/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html @@ -0,0 +1,51 @@ + + + + + + + DnDOnSubtree + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.dd.DDTest8?restartApplication
dragvaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[3]11,8
dropvaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[6]34,9
mouseClick + vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/expand + 10,8
assertElementPresent + vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/n[0] +
+ + -- cgit v1.2.3 From 7f7dc316e3593bc4823f2cbc8e6f4814f233ce03 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 16 Sep 2013 08:50:16 +0300 Subject: Base files for TB3 tests (#12572) * Converted LabelModes to TB3 for validation Change-Id: Ic9e69d46623a16986961bdc8cc050b375622a91d --- uitest/eclipse-run-selected-test.properties | 26 +- .../vaadin/tests/components/label/LabelModes.html | 27 -- .../vaadin/tests/components/label/LabelModes.java | 9 + .../src/com/vaadin/tests/tb3/AbstractTB3Test.java | 516 +++++++++++++++++++++ .../src/com/vaadin/tests/tb3/MultiBrowserTest.java | 81 ++++ .../com/vaadin/tests/tb3/ParallelScheduler.java | 60 +++ .../vaadin/tests/tb3/PrivateTB3Configuration.java | 123 +++++ .../com/vaadin/tests/tb3/ScreenshotTB3Test.java | 392 ++++++++++++++++ .../vaadin/tests/tb3/SimpleMultiBrowserTest.java | 49 ++ uitest/src/com/vaadin/tests/tb3/TB3Runner.java | 167 +++++++ 10 files changed, 1415 insertions(+), 35 deletions(-) delete mode 100644 uitest/src/com/vaadin/tests/components/label/LabelModes.html create mode 100644 uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java create mode 100644 uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java create mode 100644 uitest/src/com/vaadin/tests/tb3/ParallelScheduler.java create mode 100644 uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java create mode 100644 uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java create mode 100644 uitest/src/com/vaadin/tests/tb3/SimpleMultiBrowserTest.java create mode 100644 uitest/src/com/vaadin/tests/tb3/TB3Runner.java (limited to 'uitest') diff --git a/uitest/eclipse-run-selected-test.properties b/uitest/eclipse-run-selected-test.properties index f6cb2551e9..cbd1ab1cef 100644 --- a/uitest/eclipse-run-selected-test.properties +++ b/uitest/eclipse-run-selected-test.properties @@ -1,14 +1,23 @@ -; Location where vaadin-testbench jar can be found -com.vaadin.testbench.lib.dir= - -; Deployment url to use for testing. Context path must be / -com.vaadin.testbench.deployment.url=http://:8888/ +; +; For both TestBench 2 and 3 +; ; Location of the screenshot directory. ; This is the directory that contains the "references" directory com.vaadin.testbench.screenshot.directory= -; Run the whole test even if + +; +; For only TestBench 2 +; + +; Location where TestBench 2 jar can be found +com.vaadin.testbench.lib.dir= + +; Deployment url to use for testing. Context path must be / +com.vaadin.testbench.deployment.url=http://:8888/ + +; Run the whole test even if a screenshot comparison fails com.vaadin.testbench.screenshot.softfail=true ; Screen capture at the end if the test fails @@ -23,7 +32,8 @@ com.vaadin.testbench.screenshot.cursor=true ; Uncomment to limit to certain browsers or override in launch configuration ; browsers=winxp-opera10 -; Claim that the server has started succesfully. Needed for the tests to run +; Claim that the server has started succesfully. Needed for TB2 tests to be executed server.start.succeeded=1 -test-output-dir=../build/test-output \ No newline at end of file +; Directory where temporary Java classes are created +test-output-dir=../build/test-output diff --git a/uitest/src/com/vaadin/tests/components/label/LabelModes.html b/uitest/src/com/vaadin/tests/components/label/LabelModes.html deleted file mode 100644 index 356688b456..0000000000 --- a/uitest/src/com/vaadin/tests/components/label/LabelModes.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -New Test - - - - - - - - - - - - - - - - - -
New Test
open/run/com.vaadin.tests.components.label.LabelModes?restartApplication
screenCapturelabelmodes
- - diff --git a/uitest/src/com/vaadin/tests/components/label/LabelModes.java b/uitest/src/com/vaadin/tests/components/label/LabelModes.java index e5bc539f36..1959447a4b 100644 --- a/uitest/src/com/vaadin/tests/components/label/LabelModes.java +++ b/uitest/src/com/vaadin/tests/components/label/LabelModes.java @@ -2,10 +2,19 @@ package com.vaadin.tests.components.label; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.tests.components.ComponentTestCase; +import com.vaadin.tests.tb3.SimpleMultiBrowserTest; import com.vaadin.ui.Label; public class LabelModes extends ComponentTestCase