aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2017-11-28 13:34:00 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-11-28 13:34:00 +0200
commit0fd59e941bb8ed0418cbb75a05c507aaeba09e47 (patch)
tree935b9df3e40608a3bdcf69b2da6d031ab236069f /uitest/src/test
parentd936003c92a8e3ac2e1c0637ac240f3d7624bc0d (diff)
downloadvaadin-framework-0fd59e941bb8ed0418cbb75a05c507aaeba09e47.tar.gz
vaadin-framework-0fd59e941bb8ed0418cbb75a05c507aaeba09e47.zip
Fix styling of Window control buttons to show focus (#10285)
Fixes #8918
Diffstat (limited to 'uitest/src/test')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/WindowControlButtonFocusTest.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/WindowControlButtonFocusTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/WindowControlButtonFocusTest.java
new file mode 100644
index 0000000000..fb095c07b4
--- /dev/null
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/WindowControlButtonFocusTest.java
@@ -0,0 +1,48 @@
+package com.vaadin.tests.themes.valo;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.WindowElement;
+import com.vaadin.testbench.parallel.Browser;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class WindowControlButtonFocusTest extends MultiBrowserTest {
+
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ return Arrays.asList(Browser.CHROME.getDesiredCapabilities(),
+ Browser.IE11.getDesiredCapabilities());
+ }
+
+ @Test
+ public void focusMaximize() throws IOException, InterruptedException {
+ openTestURL();
+
+ WebElement window = $(WindowElement.class).first();
+ WebElement maximize = window
+ .findElement(By.className("v-window-maximizebox"));
+
+ executeScript("arguments[0].focus()", maximize);
+ compareScreen(window, "maximize-focused");
+ }
+
+ @Test
+ public void focusClose() throws IOException {
+ openTestURL();
+
+ WebElement window = $(WindowElement.class).first();
+ WebElement close = window
+ .findElement(By.className("v-window-closebox"));
+
+ executeScript("arguments[0].focus()", close);
+ compareScreen(window, "close-focused");
+ }
+
+}