diff options
author | Aleksi Hietanen <aleksi@vaadin.com> | 2017-05-11 08:56:28 +0300 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-05-11 08:56:28 +0300 |
commit | dc6e754f8c84c76ca086e6e862977062e5235734 (patch) | |
tree | 205147b55d3776fcca298387b8729cfc660a6232 /testbench-api/src/main/java/com/vaadin/testbench | |
parent | d25697a1230d24886b8d2219039fcb2dd38bd17c (diff) | |
download | vaadin-framework-dc6e754f8c84c76ca086e6e862977062e5235734.tar.gz vaadin-framework-dc6e754f8c84c76ca086e6e862977062e5235734.zip |
Reset HierarchicalDataCommunicator on changes (#9275)
Reset HDC when encountering unexpected changes in the data.
Additionally this patch fixes an issue with client and server caches
getting out of sync during resets.
Diffstat (limited to 'testbench-api/src/main/java/com/vaadin/testbench')
-rw-r--r-- | testbench-api/src/main/java/com/vaadin/testbench/elements/TreeGridElement.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testbench-api/src/main/java/com/vaadin/testbench/elements/TreeGridElement.java b/testbench-api/src/main/java/com/vaadin/testbench/elements/TreeGridElement.java index 13dfbbf565..3eb8b30b5e 100644 --- a/testbench-api/src/main/java/com/vaadin/testbench/elements/TreeGridElement.java +++ b/testbench-api/src/main/java/com/vaadin/testbench/elements/TreeGridElement.java @@ -119,6 +119,24 @@ public class TreeGridElement extends GridElement { } /** + * Check whether the given indices correspond to a cell that contains a + * visible hierarchy toggle element. + * + * @param rowIndex + * 0-based row index + * @param hierarchyColumnIndex + * 0-based index of the hierarchy column + * @return {@code true} if this cell has the expand toggle visible + */ + public boolean hasExpandToggle(int rowIndex, int hierarchyColumnIndex) { + WebElement expandElement = getExpandElement(rowIndex, + hierarchyColumnIndex); + List<String> classes = Arrays + .asList(expandElement.getAttribute("class").split(" ")); + return classes.contains("expanded") || classes.contains("collapsed"); + } + + /** * Gets the expand/collapse element for the given row. * * @param rowIndex |