From fb6e81221bd1b5ab0b81a3ee6c82e4286df57264 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Fri, 27 Oct 2017 17:44:19 +0200 Subject: Use lambda with Handlers (#10229) Also improve naming by replacing one-letter variable names. --- .../src/main/java/com/vaadin/testbench/elements/GridElement.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'testbench-api/src/main/java/com/vaadin/testbench') diff --git a/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java b/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java index 61da7255ff..a7253b7229 100644 --- a/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java +++ b/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java @@ -462,10 +462,9 @@ public class GridElement extends AbstractComponentElement { Optional toggleButton = getDriver() .findElement(By.className("v-grid-sidebar-content")) .findElements(By.className("column-hiding-toggle")).stream() - .filter(e -> e.getText().equals(toggleCaption)) - .findAny(); + .filter(element -> element.getText().equals(toggleCaption)).findAny(); if (toggleButton.isPresent()) { - toggleButton.ifPresent(e -> e.click()); + toggleButton.ifPresent(element -> element.click()); } else { throw new IllegalArgumentException( "No column hiding toggle with caption '" + toggleCaption -- cgit v1.2.3