diff options
author | Patrik Lindström <patrik@vaadin.com> | 2014-06-17 18:30:04 +0300 |
---|---|---|
committer | Patrik Lindström <patrik@vaadin.com> | 2014-06-26 16:15:05 +0300 |
commit | 6294a26ab8ae5df83d25318c4a8b14db34f5b8a4 (patch) | |
tree | 6513a1c58d8b0e9b1699981269c630335ddd858b /uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java | |
parent | f4a538019bc6c5abeeb453d9f116088d03d7c32f (diff) | |
download | vaadin-framework-6294a26ab8ae5df83d25318c4a8b14db34f5b8a4.tar.gz vaadin-framework-6294a26ab8ae5df83d25318c4a8b14db34f5b8a4.zip |
Implement Grid client-side Sorting API (#13334)
Change-Id: I9ab18c93bdc1aaf66aa2701c3939311671a60f04
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java b/uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java index 15bd323e08..91a4e19886 100644 --- a/uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java +++ b/uitest/src/com/vaadin/tests/components/grid/GridClientRenderers.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2014 Vaadin Ltd. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -24,6 +24,7 @@ import org.openqa.selenium.WebElement; import com.vaadin.testbench.By; import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elements.LabelElement; import com.vaadin.testbench.elements.NativeButtonElement; import com.vaadin.testbench.elements.NativeSelectElement; import com.vaadin.testbench.elements.ServerClass; @@ -33,7 +34,7 @@ import com.vaadin.tests.widgetset.server.grid.GridClientColumnRenderers; /** * Tests Grid client side renderers - * + * * @since 7.4 * @author Vaadin Ltd */ @@ -161,6 +162,21 @@ public class GridClientRenderers extends MultiBrowserTest { backgroundColor); } + @Test + public void testSortingEvent() throws Exception { + openTestURL(); + + $(NativeButtonElement.class).caption("Trigger sorting").first().click(); + sleep(1000); + + String consoleText = $(LabelElement.class).id("testDebugConsole") + .getText(); + + assertTrue("Console text as expected", + consoleText.contains("Columns: 1, order: Column 1: ASCENDING")); + + } + private GridElement getGrid() { return $(MyClientGridElement.class).first(); } |