diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2019-12-06 02:49:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-06 02:49:54 +0200 |
commit | 18c37e1cf2a780e7927d257dffaad92ca3f7681f (patch) | |
tree | 462bcc072c02c17d7a5013f77a94dffcc9e36e57 /uitest | |
parent | 877d7ef7ce3e29905e55fd36ee2d3ac8cf77ccf6 (diff) | |
download | vaadin-framework-18c37e1cf2a780e7927d257dffaad92ca3f7681f.tar.gz vaadin-framework-18c37e1cf2a780e7927d257dffaad92ca3f7681f.zip |
Test tweaks (#11841)
- Use BrowserStack workaround for proper sendKeys functionality on IE11.
- TreeGridBigDetailsManagerTest: allow two pixel discrepancy in expected
scroll position to accommodate IE.
- TreeWideContent: switched from raw type to type inference.
- ValoColorPickerInputFormatsTest: switched equals comparison to correct
way around.
- ResponsiveLayoutUpdateTest: updated screenshots for IE
- ColumnCollapsingAndColumnExpansionTest: updated screenshots for IE
- ClosingWindowWithBrowserFrameShouldntGenerate404Test: test is
incompatible with IE driver, excluded from tested browsers. In manual
testing IE doesn't get 404 in the logs with or without the fix
associated with this test but there are other client-side exceptions
related to focus handling in either case. However, those are out of
scope for this particular fix and should be investigated separately.
Diffstat (limited to 'uitest')
11 files changed, 25 insertions, 10 deletions
diff --git a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col2-col3.png b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col2-col3.png Binary files differindex 74d13207bb..d1b8332d83 100755 --- a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col2-col3.png +++ b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col2-col3.png diff --git a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col3.png b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col3.png Binary files differindex f0460c43f1..da9073a8d6 100755 --- a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col3.png +++ b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col1-col3.png diff --git a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col2-col3.png b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col2-col3.png Binary files differindex 855a48fcb4..d40f6be8a9 100755 --- a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col2-col3.png +++ b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col2-col3.png diff --git a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col3.png b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col3.png Binary files differindex 7a045ac24f..a19a6b604a 100755 --- a/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col3.png +++ b/uitest/reference-screenshots/internetexplorer/ColumnCollapsingAndColumnExpansionTest-expandCorrectlyAfterCollapse_Windows_InternetExplorer_11_col3.png diff --git a/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_large.png b/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_large.png Binary files differindex 412f222d68..44999edb4f 100755 --- a/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_large.png +++ b/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_large.png diff --git a/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_small.png b/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_small.png Binary files differindex 10b9f31b7a..abfc14bfd1 100755 --- a/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_small.png +++ b/uitest/reference-screenshots/internetexplorer/ResponsiveLayoutUpdateTest-testWidthAndHeightRanges_Windows_InternetExplorer_11_small.png diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeWideContent.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeWideContent.java index 9e41d9b7c0..34122879c7 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeWideContent.java +++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeWideContent.java @@ -17,7 +17,7 @@ public class TreeWideContent extends AbstractTestUI { tree.setWidth("150px"); tree.setHeight("100px"); - TreeData<String> data = new TreeData(); + TreeData<String> data = new TreeData<>(); data.addItem(null, "Foo"); data.addItem("Foo", "Extra long text content that should be wider" + " than the allocated width of the Tree."); diff --git a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java index 5c4207ddc4..c4f8c809c2 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java @@ -148,7 +148,7 @@ public class ValoColorPickerInputFormatsTest extends MultiBrowserTest { // verify there are errors assertTrue(previewElement.getColorFieldContainsErrors()); // verify value has not been changed - assertEquals(previewElement.getColorFieldValue(), "#xyz"); + assertEquals("#xyz", previewElement.getColorFieldValue()); } private void setColorpickerValue(String value) { diff --git a/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridBigDetailsManagerTest.java b/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridBigDetailsManagerTest.java index b145dc99bc..957a3c9b0f 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridBigDetailsManagerTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridBigDetailsManagerTest.java @@ -762,7 +762,7 @@ public class TreeGridBigDetailsManagerTest extends MultiBrowserTest { assertThat("Scroll to 55 didn't scroll as expected", (double) detailsY + detailsHeight, - closeTo(wrapperY + wrapperHeight, 1d)); + closeTo(wrapperY + wrapperHeight, 2d)); $(ButtonElement.class).id(SCROLL_TO_3055).click(); waitUntil(expectedConditionDetails(74, 5, null)); @@ -775,7 +775,7 @@ public class TreeGridBigDetailsManagerTest extends MultiBrowserTest { assertThat("Scroll to 3055 didn't scroll as expected", (double) detailsY + detailsHeight, - closeTo(wrapperY + wrapperHeight, 1d)); + closeTo(wrapperY + wrapperHeight, 2d)); $(ButtonElement.class).id(SCROLL_TO_END).click(); waitUntil(expectedConditionDetails(99, 9, 2)); @@ -792,7 +792,7 @@ public class TreeGridBigDetailsManagerTest extends MultiBrowserTest { assertThat("Scroll to end didn't scroll as expected", (double) detailsY + detailsHeight, - closeTo(wrapperY + wrapperHeight, 1d)); + closeTo(wrapperY + wrapperHeight, 2d)); $(ButtonElement.class).id(SCROLL_TO_START).click(); waitUntil(expectedConditionDetails(0, 0, 0)); diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ClosingWindowWithBrowserFrameShouldntGenerate404Test.java b/uitest/src/test/java/com/vaadin/tests/components/window/ClosingWindowWithBrowserFrameShouldntGenerate404Test.java index a0a32cb77b..63dca78976 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/window/ClosingWindowWithBrowserFrameShouldntGenerate404Test.java +++ b/uitest/src/test/java/com/vaadin/tests/components/window/ClosingWindowWithBrowserFrameShouldntGenerate404Test.java @@ -1,14 +1,18 @@ package com.vaadin.tests.components.window; -import com.vaadin.testbench.elements.ButtonElement; -import com.vaadin.testbench.elements.LabelElement; -import com.vaadin.testbench.elements.WindowElement; -import com.vaadin.tests.tb3.MultiBrowserTest; +import java.util.Arrays; +import java.util.List; + import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.logging.LogEntry; +import org.openqa.selenium.remote.DesiredCapabilities; -import java.util.List; +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.testbench.elements.WindowElement; +import com.vaadin.testbench.parallel.Browser; +import com.vaadin.tests.tb3.MultiBrowserTest; public class ClosingWindowWithBrowserFrameShouldntGenerate404Test extends MultiBrowserTest { @@ -36,4 +40,12 @@ public class ClosingWindowWithBrowserFrameShouldntGenerate404Test return !logs.stream().anyMatch( ClosingWindowWithBrowserFrameShouldntGenerate404Test::contains404); } + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + // IE driver does not support logging API, see + // https://github.com/SeleniumHQ/selenium/issues/6414 + return Arrays.asList(Browser.CHROME.getDesiredCapabilities(), + Browser.FIREFOX.getDesiredCapabilities()); + } } diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java b/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java index 05bf9e4c89..ba7237043f 100644 --- a/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java +++ b/uitest/src/test/java/com/vaadin/tests/tb3/BrowserStackBrowserFactory.java @@ -45,6 +45,9 @@ public class BrowserStackBrowserFactory extends DefaultBrowserFactory { caps.setCapability("ie.ensureCleanSession", true); caps.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true); + // Workaround for an IE11 bug in BrowserStack sendKeys handling, see + // https://www.browserstack.com/automate/using-sendkeys-on-remote-IE11 + caps.setCapability("browserstack.sendKeys", true); break; default: caps = DesiredCapabilities.firefox(); |