diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-03-20 15:50:51 +0200 |
---|---|---|
committer | Henrik Paul <henrik@vaadin.com> | 2015-03-20 14:57:29 +0000 |
commit | 2a711a6e8c393b7457b9fe029d30a782945c8076 (patch) | |
tree | 62e6fba8aabd8073140c3cd159b58c4fbd3ec524 /uitest | |
parent | aa1150e22ec2412ab999cb35cb6a0f98a32d7f88 (diff) | |
download | vaadin-framework-2a711a6e8c393b7457b9fe029d30a782945c8076.tar.gz vaadin-framework-2a711a6e8c393b7457b9fe029d30a782945c8076.zip |
Disable Sidebar API access since it will still be reworked (#17023)
Change-Id: I86900955497ba8e713f48457a7b858f50f9eeb73
Diffstat (limited to 'uitest')
2 files changed, 0 insertions, 88 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java index 563fe890ec..fb647c7a41 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java @@ -49,54 +49,6 @@ public class GridSidebarContentTest extends GridBasicClientFeaturesTest { } - @Test - public void testSidebarWithCustomContent() { - openTestURL(); - CustomGridElement gridElement = getGridElement(); - - Assert.assertEquals("Sidebar should not be initially present", 0, - countBySelector(".v-grid-sidebar")); - - selectMenuPath("Component", "Sidebar", "Toggle sidebar entry"); - - gridElement.findElement(By.className("v-grid-sidebar-button")).click(); - - WebElement sidebarButton = gridElement.findElement(By - .cssSelector(".v-grid-sidebar-content button")); - - Assert.assertEquals("Sidebar button", sidebarButton.getText()); - - sidebarButton.click(); - - Assert.assertEquals("Click count: 1", sidebarButton.getText()); - - selectMenuPath("Component", "Sidebar", "Toggle sidebar entry"); - - Assert.assertEquals("Sidebar should disappear after content remove", 0, - countBySelector(".v-grid-sidebar")); - } - - @Test - public void testProgrammaticSidebarToggle() { - openTestURL(); - - selectMenuPath("Component", "Sidebar", "Toggle sidebar visibility"); - - Assert.assertEquals("Toggling without content should't show anything", - 0, countBySelector(".v-grid-sidebar-content button")); - - selectMenuPath("Component", "Sidebar", "Toggle sidebar entry"); - selectMenuPath("Component", "Sidebar", "Toggle sidebar visibility"); - - Assert.assertEquals("Toggling with content should show sidebar", 1, - countBySelector(".v-grid-sidebar-content button")); - - selectMenuPath("Component", "Sidebar", "Toggle sidebar visibility"); - - Assert.assertEquals("Toggling again should hide sidebar", 0, - countBySelector(".v-grid-sidebar-content button")); - } - private int countBySelector(String cssSelector) { return getGridElement().findElements(By.cssSelector(cssSelector)) .size(); diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java index 9b28b75ac1..1fd926d726 100644 --- a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java +++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java @@ -80,7 +80,6 @@ import com.vaadin.client.widgets.Grid.Column; import com.vaadin.client.widgets.Grid.FooterRow; import com.vaadin.client.widgets.Grid.HeaderRow; import com.vaadin.client.widgets.Grid.SelectionMode; -import com.vaadin.client.widgets.Grid.Sidebar; import com.vaadin.tests.widgetset.client.grid.GridBasicClientFeaturesWidget.Data; /** @@ -200,17 +199,6 @@ public class GridBasicClientFeaturesWidget extends private boolean secondEditorError = false; - private Button sidebarEntry = new Button("Sidebar button", - new ClickHandler() { - private int count = 0; - - @Override - public void onClick(ClickEvent event) { - count++; - sidebarEntry.setText("Click count: " + count); - } - }); - /** * Our basic data object */ @@ -420,7 +408,6 @@ public class GridBasicClientFeaturesWidget extends createInternalsMenu(); createDataSourceMenu(); createDetailsMenu(); - createSidebarMenu(); grid.getElement().getStyle().setZIndex(0); @@ -1456,31 +1443,4 @@ public class GridBasicClientFeaturesWidget extends } }, menupath); } - - private void createSidebarMenu() { - String[] menupath = new String[] { "Component", "Sidebar" }; - - addMenuCommand("Toggle sidebar visibility", new ScheduledCommand() { - @Override - public void execute() { - Sidebar sidebar = grid.getSidebar(); - if (sidebar.isOpen()) { - sidebar.close(); - } else { - sidebar.open(); - } - } - }, menupath); - - addMenuCommand("Toggle sidebar entry", new ScheduledCommand() { - @Override - public void execute() { - if (sidebarEntry.getParent() != null) { - sidebarEntry.removeFromParent(); - } else { - grid.getSidebar().add(sidebarEntry); - } - } - }, menupath); - } } |