summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhe Sun <31067185+ZheSun88@users.noreply.github.com>2019-06-28 09:08:07 +0300
committerGitHub <noreply@github.com>2019-06-28 09:08:07 +0300
commit35a9c4255f1d46f4aa8e27b26ea2cd25def50ab0 (patch)
tree1981be8eb066748975232513db87bc070a03bc53
parentae296b155a06b2de848316eb36c69f7eec320c48 (diff)
downloadvaadin-framework-35a9c4255f1d46f4aa8e27b26ea2cd25def50ab0.tar.gz
vaadin-framework-35a9c4255f1d46f4aa8e27b26ea2cd25def50ab0.zip
Fixes unstable/muted tests (#11640)8.9.0.alpha1
-rw-r--r--uitest/reference-screenshots/chrome/ThemeChangeOnTheFlyTest-reindeerToOthers_ANY_Chrome__reindeer.pngbin113274 -> 113161 bytes
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java15
4 files changed, 15 insertions, 15 deletions
diff --git a/uitest/reference-screenshots/chrome/ThemeChangeOnTheFlyTest-reindeerToOthers_ANY_Chrome__reindeer.png b/uitest/reference-screenshots/chrome/ThemeChangeOnTheFlyTest-reindeerToOthers_ANY_Chrome__reindeer.png
index 4a637d1b80..6b4ff93467 100644
--- a/uitest/reference-screenshots/chrome/ThemeChangeOnTheFlyTest-reindeerToOthers_ANY_Chrome__reindeer.png
+++ b/uitest/reference-screenshots/chrome/ThemeChangeOnTheFlyTest-reindeerToOthers_ANY_Chrome__reindeer.png
Binary files differ
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
index be8bad5e87..ae829d080c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
@@ -1,7 +1,5 @@
package com.vaadin.tests.components.combobox;
-import static org.junit.Assert.assertEquals;
-
import org.junit.Test;
import org.openqa.selenium.WebElement;
@@ -9,6 +7,8 @@ import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
+import static org.junit.Assert.assertEquals;
+
public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest {
@Override
protected Class<?> getUIClass() {
@@ -37,7 +37,7 @@ public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest {
ComboBoxElement cb = $(ComboBoxElement.class).first();
cb.selectByText("Item 3");
WebElement textbox = cb.findElement(By.vaadin("#textbox"));
- textbox.clear();
+ cb.clear();
textbox.sendKeys("I");
// Close the open suggestions popup
// Uses #clickElement instead of ComboBoxElement#openPopup() due to an
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 1a6a03aea1..8c2529a509 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
@@ -1,9 +1,5 @@
package com.vaadin.tests.components.grid;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
import java.util.List;
import org.junit.Before;
@@ -18,6 +14,10 @@ import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.testbench.parallel.BrowserUtil;
import com.vaadin.tests.tb3.MultiBrowserTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
public class GridResizeHiddenColumnTest extends MultiBrowserTest {
@Before
@@ -74,6 +74,7 @@ public class GridResizeHiddenColumnTest extends MultiBrowserTest {
for (GridCellElement e : headerCells) {
widthSum += e.getSize().getWidth();
}
+ sleep(100);
assertEquals("'Last Name' column should take up the remaining space",
grid.getHeader().getSize().getWidth(), widthSum, 1d);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java
index 829632023e..3e197d2281 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java
@@ -1,9 +1,5 @@
package com.vaadin.tests.components.window;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
@@ -12,6 +8,9 @@ import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.TwinColSelectElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
public class WindowTwinColSelectTest extends MultiBrowserTest {
@Test
@@ -23,8 +22,8 @@ public class WindowTwinColSelectTest extends MultiBrowserTest {
WebElement selectionsElement = twinColSelect.getSelectionsElement();
assertTrue(optionsElement.isDisplayed());
assertTrue(selectionsElement.isDisplayed());
- assertThat(selectionsElement.getLocation().getY(),
- is(optionsElement.getLocation().getY()));
+ assertEquals("Coordinate is not matching within the tolerance",
+ optionsElement.getLocation().getY(), selectionsElement.getLocation().getY(), 3);
}
@Test
@@ -41,7 +40,7 @@ public class WindowTwinColSelectTest extends MultiBrowserTest {
WebElement selectionsElement = twinColSelect.getSelectionsElement();
assertTrue(optionsElement.isDisplayed());
assertTrue(selectionsElement.isDisplayed());
- assertThat(selectionsElement.getLocation().getY(),
- is(optionsElement.getLocation().getY()));
+ assertEquals("Coordinate is not matching within the tolerance.",
+ optionsElement.getLocation().getY(), selectionsElement.getLocation().getY(), 3);
}
}