summaryrefslogtreecommitdiffstats
path: root/testbench-api/src/main/java/com
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-05-07 11:32:07 +0300
committerGitHub <noreply@github.com>2021-05-07 11:32:07 +0300
commit4cb4f2d602ce4ef79fb0ff03487047044f18a2f6 (patch)
tree9157b364231c87c6c1930f5ffca67264273d4a7b /testbench-api/src/main/java/com
parent806026070ae953a266a6fff941c1967e4c96cf81 (diff)
downloadvaadin-framework-4cb4f2d602ce4ef79fb0ff03487047044f18a2f6.tar.gz
vaadin-framework-4cb4f2d602ce4ef79fb0ff03487047044f18a2f6.zip
Fix TabSheetElement clicks for IE, test tweaks. (#12291)
- Backspace navigation hasn't worked in years thanks to new browser standards, removed related tests. Left a test for regular backspace use within a modal window. - Enabled a modal window test for Chrome since it seems to be working now, removed extending of another test class to avoid running the tests twice without any configuration changes. - Adjusted browser width limitation. - Added screenshots.
Diffstat (limited to 'testbench-api/src/main/java/com')
-rw-r--r--testbench-api/src/main/java/com/vaadin/testbench/elements/TabSheetElement.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/testbench-api/src/main/java/com/vaadin/testbench/elements/TabSheetElement.java b/testbench-api/src/main/java/com/vaadin/testbench/elements/TabSheetElement.java
index f476867946..147e91fc08 100644
--- a/testbench-api/src/main/java/com/vaadin/testbench/elements/TabSheetElement.java
+++ b/testbench-api/src/main/java/com/vaadin/testbench/elements/TabSheetElement.java
@@ -26,6 +26,7 @@ import com.vaadin.testbench.TestBench;
import com.vaadin.testbench.TestBenchElement;
import com.vaadin.testbench.elementsbase.AbstractElement;
import com.vaadin.testbench.elementsbase.ServerClass;
+import com.vaadin.testbench.parallel.BrowserUtil;
@ServerClass("com.vaadin.ui.TabSheet")
public class TabSheetElement extends AbstractComponentContainerElement {
@@ -122,7 +123,13 @@ public class TabSheetElement extends AbstractComponentContainerElement {
}
// If neither text nor icon caption was found, click at a position that
// is unlikely to close the tab.
- ((TestBenchElement) tabCell).click(-5, 0);
+ if (BrowserUtil.isIE(getCapabilities())) {
+ // old default, offset calculated from top left
+ ((TestBenchElement) tabCell).click(10, 10);
+ } else {
+ // w3c compliant, offset calculated from middle
+ ((TestBenchElement) tabCell).click(-5, 0);
+ }
}
/**