diff options
author | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-06-28 09:08:07 +0300 |
---|---|---|
committer | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-07-01 15:06:49 +0300 |
commit | c39400b55da214b2b6eb87260fb8f485a78a8aa1 (patch) | |
tree | 0f73483d10993d6a23689a8d52da28624d941108 | |
parent | c71417b51ed311adc2353fb88c75bb72c7293a54 (diff) | |
download | vaadin-framework-c39400b55da214b2b6eb87260fb8f485a78a8aa1.tar.gz vaadin-framework-c39400b55da214b2b6eb87260fb8f485a78a8aa1.zip |
Fixes unstable/muted tests (#11640)8.8.5
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 Binary files differindex 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 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); } } |