diff options
author | Artur Signell <artur@vaadin.com> | 2014-07-30 07:53:28 +0000 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2014-08-04 08:27:00 +0000 |
commit | 422c08c6145b8c8eaff4f453b5c0276beef27290 (patch) | |
tree | 4b21fae0fc435442c2d052ae76298b0fb33e3b43 /uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | |
parent | 99118ccf946486e140cd1a85ff75f2a6c09f4266 (diff) | |
download | vaadin-framework-422c08c6145b8c8eaff4f453b5c0276beef27290.tar.gz vaadin-framework-422c08c6145b8c8eaff4f453b5c0276beef27290.zip |
Allow changing theme on the fly (#2874, #14139, #14124)
* Updates UI and overlay container class names when the theme changes
* Initially verifies that the theme has actually been loaded (for the embed case)
and class names have been properly set
* Forces a state change to all components to re-translate theme:// URLs
* Runs a full layout after the new theme has been loaded and activated
Change-Id: I5a7391abe1bb467130bbb4660e4829b43f3e4255
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index c4573fb9b8..a4d85775f7 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -16,15 +16,15 @@ package com.vaadin.tests.tb3; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.net.URL; -import java.util.Collections; -import java.util.List; - +import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; +import com.vaadin.server.LegacyApplication; +import com.vaadin.server.UIProvider; +import com.vaadin.testbench.TestBench; import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.TestBenchTestCase; +import com.vaadin.tests.components.AbstractTestUIWithLog; +import com.vaadin.tests.tb3.MultiBrowserTest.Browser; +import com.vaadin.ui.UI; import org.junit.After; import org.junit.Before; import org.junit.runner.RunWith; @@ -41,14 +41,13 @@ import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; -import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; -import com.vaadin.server.LegacyApplication; -import com.vaadin.server.UIProvider; -import com.vaadin.testbench.TestBench; -import com.vaadin.testbench.TestBenchTestCase; -import com.vaadin.tests.components.AbstractTestUIWithLog; -import com.vaadin.tests.tb3.MultiBrowserTest.Browser; -import com.vaadin.ui.UI; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.net.URL; +import java.util.Collections; +import java.util.List; import static com.vaadin.tests.tb3.TB3Runner.localWebDriverIsUsed; @@ -224,7 +223,22 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { * {@link #isPush()}. */ protected void openTestURL() { - driver.get(getTestUrl()); + openTestURL(""); + } + + /** + * Opens the given test (defined by {@link #getTestUrl()}, optionally with + * debug window and/or push (depending on {@link #isDebug()} and + * {@link #isPush()}. + */ + protected void openTestURL(String extraParameters) { + String url = getTestUrl(); + if (url.contains("?")) { + url = url + "&" + extraParameters; + } else { + url = url + "?" + extraParameters; + } + driver.get(url); } /** |