From fa3ff0db2a945b2fd153090a8c3bd0686010df48 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 13 May 2014 11:07:34 +0300 Subject: [PATCH] Ensure correct tab is open in debug window Change-Id: I6a2745c59c468aa2fbc45032a8478f533494b181 --- .../tests/components/orderedlayout/CaptionLeakTest.java | 2 ++ .../tests/components/orderedlayout/SpacingLeakTest.java | 1 + uitest/src/com/vaadin/tests/push/ReconnectTest.java | 2 ++ uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java b/uitest/src/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java index 92a70d4691..0fbd0e5f69 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java @@ -26,6 +26,7 @@ public class CaptionLeakTest extends MultiBrowserTest { public void testCaptionLeak() throws Exception { setDebug(true); openTestURL(); + openDebugLogTab(); // this should be present // 3 general non-connector elements, none accumulated on click @@ -54,6 +55,7 @@ public class CaptionLeakTest extends MultiBrowserTest { public void testNoCaptionLeak() throws Exception { setDebug(true); openTestURL(); + openDebugLogTab(); getDriver().findElement(By.xpath("//button[@title = 'Clear log']")) .click(); diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java b/uitest/src/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java index 4766713706..565c11c1f0 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java @@ -26,6 +26,7 @@ public class SpacingLeakTest extends MultiBrowserTest { public void testSpacingLeak() throws Exception { setDebug(true); openTestURL(); + openDebugLogTab(); getDriver().findElement(By.id("addbutton")).click(); getDriver().findElement(By.xpath("//button[@title = 'Clear log']")) .click(); diff --git a/uitest/src/com/vaadin/tests/push/ReconnectTest.java b/uitest/src/com/vaadin/tests/push/ReconnectTest.java index 3982deb4c3..5ad2e7a127 100644 --- a/uitest/src/com/vaadin/tests/push/ReconnectTest.java +++ b/uitest/src/com/vaadin/tests/push/ReconnectTest.java @@ -32,6 +32,8 @@ public abstract class ReconnectTest extends MultiBrowserTestWithProxy { setDebug(true); openTestURL(); + openDebugLogTab(); + startTimer(); waitUntilServerCounterChanges(); diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index fd3131cbbf..0a0e498981 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -962,4 +962,8 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { selenium.keyPress("id=" + id, "\\13"); } + protected void openDebugLogTab() { + findElement(By.xpath("//button[@title='Debug message log']")).click(); + } + } -- 2.39.5