+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.uitest;
-
-public class BaseThemeTest extends ThemeTest {
- @Override
- protected String getTheme() {
- return "base";
- }
-}
+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.uitest;
-
-import java.io.IOException;
-
-public class ChameleonThemeTest extends ThemeTest {
- @Override
- protected String getTheme() {
- return "chameleon";
- }
-
- @Override
- protected void testWindows() throws IOException {
- super.testWindows();
-
- // chameleon theme only
- testWindow(4, "subwindow-opaque");
- }
-}
+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.uitest;
-
-public class LiferayThemeTest extends ThemeTest {
- @Override
- protected String getTheme() {
- return "liferay";
- }
-}
+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.uitest;
-
-import java.io.IOException;
-
-public class ReindeerThemeTest extends ThemeTest {
- @Override
- protected String getTheme() {
- return "reindeer";
- }
-
- @Override
- protected void testWindows() throws IOException {
- super.testWindows();
-
- // reindeer theme only
- testWindow(1, "subwindow-light");
- testWindow(2, "subwindow-black");
- }
-}
+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.components.uitest;
-
-import java.io.IOException;
-
-public class RunoThemeTest extends ThemeTest {
- @Override
- protected String getTheme() {
- return "runo";
- }
-
- @Override
- protected void testWindows() throws IOException {
- super.testWindows();
-
- // runo theme only
- testWindow(3, "subwindow-dialog");
- }
-}
import com.vaadin.testbench.elements.TableElement;
import com.vaadin.testbench.elementsbase.ServerClass;
import com.vaadin.testbench.parallel.BrowserUtil;
-import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.MultiBrowserThemeTest;
import com.vaadin.tests.tb3.newelements.FixedNotificationElement;
import com.vaadin.tests.tb3.newelements.WindowElement;
-public abstract class ThemeTest extends MultiBrowserTest {
+public class ThemeTest extends MultiBrowserThemeTest {
@ServerClass("com.vaadin.ui.DateField")
public static class DateFieldElement extends
return ThemeTestUI.class;
}
- protected abstract String getTheme();
-
@Test
public void testTheme() throws Exception {
- openTestURL("theme=" + getTheme());
- runThemeTest();
- }
-
- private void runThemeTest() throws IOException {
+ openTestURL();
TabSheetElement themeTabSheet = $(TabSheetElement.class).first();
// Labels tab
}
private void testTables() throws IOException {
+
compareScreen("tables");
- TableElement table = $(TableElement.class).first();
- new Actions(driver).moveToElement(table.getCell(0, 1), 5, 5)
- .contextClick().perform();
- compareScreen("tables-contextmenu");
- table.findElement(By.className("v-table-column-selector")).click();
+ final TableElement table = $(TableElement.class).first();
+ if (!BrowserUtil.isPhantomJS(getDesiredCapabilities())) {
+ // Context click does not work in phantom js
+ new Actions(driver).moveToElement(table.getCell(0, 1), 5, 5)
+ .contextClick().perform();
+ compareScreen("tables-contextmenu");
+
+ // Close context menu before opening collapsemenu
+ // (https://dev.vaadin.com/ticket/18770)
+ WebElement cm = findElement(By.className("v-contextmenu"));
+ cm.findElement(By.xpath("//div[text()='Save']")).click();
+ }
+
+ WebElement columnSelector = table.findElement(By
+ .className("v-table-column-selector"));
+ new Actions(driver).moveToElement(columnSelector, 5, 5).click()
+ .perform();
+
compareScreen("tables-collapsemenu");
}
this.theme = theme;
}
+ protected String getTheme() {
+ return theme;
+ }
+
@Parameters
public static Collection<String> getThemes() {
return Arrays.asList(new String[] { "valo", "reindeer", "runo",