aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-04-27 13:32:16 +0300
committerGitHub <noreply@github.com>2021-04-27 13:32:16 +0300
commit83ee08eae1a9997298713a6302dc929cc98dedfc (patch)
treebd3d6f580625bd3d7158b9be9378578a588d8551 /uitest/src
parent24aeb4586625310306c6ded6c5d75df56388c1e7 (diff)
downloadvaadin-framework-83ee08eae1a9997298713a6302dc929cc98dedfc.tar.gz
vaadin-framework-83ee08eae1a9997298713a6302dc929cc98dedfc.zip
Updated browser versions and screenshots, test tweaks for stability. (#12271)
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java5
5 files changed, 21 insertions, 7 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java b/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
index 1d668a289a..4a83e78ddd 100644
--- a/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
@@ -25,10 +25,10 @@ public class VerifyBrowserVersionTest extends MultiBrowserTest {
// Chrome version does not necessarily match the desired version
// because of auto updates...
browserIdentifier = getExpectedUserAgentString(
- getDesiredCapabilities()) + "89";
+ getDesiredCapabilities()) + "90";
} else if (BrowserUtil.isFirefox(getDesiredCapabilities())) {
browserIdentifier = getExpectedUserAgentString(
- getDesiredCapabilities()) + "81";
+ getDesiredCapabilities()) + "88";
} else {
browserIdentifier = getExpectedUserAgentString(desiredCapabilities)
+ desiredCapabilities.getVersion();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java
index bdaaf56d4c..63ab353d81 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java
@@ -62,7 +62,7 @@ public class GridResizeHiddenColumnTest extends MultiBrowserTest {
// Click on "Last Name" menu item
action.click(visibilityToggle).perform();
waitUntilLoadingIndicatorNotVisible();
- sleep(100); // wait for layouting
+ sleep(200); // wait for layouting
// Check if column "Last Name" is visible
headerCells = grid.getHeaderCells(0);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java
index a88fc47f6d..1824ba086b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java
@@ -18,14 +18,23 @@ public class MenuBarNavigationMouseTest extends MultiBrowserTest {
public void testMenuBarMouseNavigation() throws Exception {
openTestURL();
MenuBarElement menuBar = $(MenuBarElement.class).first();
- menuBar.clickItem("File", "Export..", "As PDF...");
+
+ // clicks separated to different calls for more informative errors
+ menuBar.clickItem("File");
+ menuBar.clickItem("Export..");
+ menuBar.clickItem("As PDF...");
assertEquals("1. MenuItem File/Export../As PDF... selected",
getLogRow(0));
- menuBar.clickItem("Edit", "Copy");
+
+ menuBar.clickItem("Edit");
+ menuBar.clickItem("Copy");
assertEquals("2. MenuItem Edit/Copy selected", getLogRow(0));
+
menuBar.clickItem("Help");
assertEquals("3. MenuItem Help selected", getLogRow(0));
- menuBar.clickItem("File", "Exit");
+
+ menuBar.clickItem("File");
+ menuBar.clickItem("Exit");
assertEquals("4. MenuItem File/Exit selected", getLogRow(0));
}
}
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java
index 4881f1b98c..ccb5f10df2 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java
@@ -82,7 +82,7 @@ public class GridThemeUITest extends MultiBrowserThemeTest {
private void selectPage(String string) {
$(NativeSelectElement.class).id("page").selectByText(string);
grid = $(GridElement.class).first();
-
+ waitUntilLoadingIndicatorNotVisible();
}
}
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java
index 0ddf80e2e0..094a0bb4d1 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java
@@ -3,6 +3,7 @@ package com.vaadin.v7.tests.components.grid.basicfeatures.server;
import java.io.IOException;
import org.junit.Test;
+import org.openqa.selenium.By;
import org.openqa.selenium.interactions.Actions;
import com.vaadin.v7.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
@@ -27,9 +28,12 @@ public class GridSidebarThemeTest extends GridBasicFeaturesTest {
private void runTestSequence(String theme) throws IOException {
openTestURL("theme=" + theme);
+ waitUntilLoadingIndicatorNotVisible();
compareScreen(theme + "-SidebarClosed");
getSidebarOpenButton().click();
+ waitForElementPresent(By.className("v-grid-sidebar-content"));
+ sleep(100); // wait for animations to finish
compareScreen(theme + "-SidebarOpen");
@@ -55,6 +59,7 @@ public class GridSidebarThemeTest extends GridBasicFeaturesTest {
compareScreen(theme + "-OnMouseOverHiddenToggle");
getSidebarOpenButton().click();
+ waitForElementNotPresent(By.className("v-grid-sidebar-content"));
compareScreen(theme + "-SidebarClosed2");
}