123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package com.vaadin.tests.tb3;
-
- import java.util.Arrays;
- import java.util.Collection;
- import java.util.Collections;
- import java.util.HashSet;
- import java.util.List;
- import java.util.Set;
-
- import org.junit.runner.RunWith;
- import org.junit.runners.Parameterized.Parameters;
-
- /**
- * Test which uses theme returned by {@link #getTheme()} for running the test
- */
- @RunWith(ParameterizedTB3Runner.class)
- public abstract class MultiBrowserThemeTest extends MultiBrowserTest {
-
- public static final List<String> themesToTest = Collections
- .unmodifiableList(Arrays.asList(new String[] { "valo", "reindeer",
- "runo", "chameleon", "base" }));
-
- private String theme;
-
- public void setTheme(String theme) {
- this.theme = theme;
- }
-
- @Parameters
- public static Collection<String> getThemes() {
- return themesToTest;
- }
-
- @Override
- protected boolean requireWindowFocusForIE() {
- return true;
- }
-
- @Override
- protected void openTestURL(Class<?> uiClass, String... parameters) {
- Set<String> params = new HashSet<>(Arrays.asList(parameters));
- params.add("theme=" + theme);
- super.openTestURL(uiClass, params.toArray(new String[params.size()]));
- }
- }
|