diff options
author | Denis <denis@vaadin.com> | 2017-02-22 15:36:19 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2017-02-22 15:36:19 +0200 |
commit | 998ea1f48a37ce04fea9ad4bcc49bf98ac511652 (patch) | |
tree | 1cd09992c453fe2b49bfaf1b940197c0bc22d561 /uitest/src/main/java/com/vaadin/v7 | |
parent | f3d768252903b8c184cc7d8a77b70ccddc5ef20f (diff) | |
download | vaadin-framework-998ea1f48a37ce04fea9ad4bcc49bf98ac511652.tar.gz vaadin-framework-998ea1f48a37ce04fea9ad4bcc49bf98ac511652.zip |
Migrate v7 Grid tests. 7th round. (#8452)
* Migrate v7 Grid tests. 7th round.
Fixes #8419
* Fix test failures
* Minor improvements
* Merge remote-tracking branch 'github/master' into 8436-grid-test-migration
* Merge remote-tracking branch 'github/master' into 8436-grid-test-migration
* Update screenshot reference
Diffstat (limited to 'uitest/src/main/java/com/vaadin/v7')
9 files changed, 0 insertions, 655 deletions
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java deleted file mode 100644 index 70e3158a7f..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.ui.VerticalLayout; -import com.vaadin.v7.data.Item; -import com.vaadin.v7.data.util.IndexedContainer; -import com.vaadin.v7.event.SelectionEvent; -import com.vaadin.v7.event.SelectionEvent.SelectionListener; -import com.vaadin.v7.ui.Grid; -import com.vaadin.v7.ui.Grid.SelectionMode; - -public class GridResizeAndScroll extends AbstractReindeerTestUI { - - @Override - protected void setup(VaadinRequest request) { - VerticalLayout content = new VerticalLayout(); - addComponent(content); - - final Grid g = new Grid(); - content.setHeight("500px"); - content.addComponent(g); - - IndexedContainer cont = new IndexedContainer(); - for (int j = 0; j < 3; j++) { - cont.addContainerProperty("" + j, String.class, ""); - } - - for (int k = 0; k < 50; k++) { - Item addItem = cont.addItem(k); - for (int j = 0; j < 3; j++) { - addItem.getItemProperty("" + j).setValue("cell " + k + " " + j); - } - } - g.setContainerDataSource(cont); - g.setSizeFull(); - - g.setSelectionMode(SelectionMode.MULTI); - - g.addSelectionListener(new SelectionListener() { - - @Override - public void select(SelectionEvent event) { - if (g.getSelectedRows().isEmpty()) { - g.setHeight("100%"); - } else { - g.setHeight("50%"); - } - } - }); - } - -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeHiddenColumn.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeHiddenColumn.java deleted file mode 100644 index 20fad06c1f..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeHiddenColumn.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUIWithLog; -import com.vaadin.tests.fieldgroup.ComplexPerson; -import com.vaadin.v7.ui.Grid; -import com.vaadin.v7.ui.Grid.ColumnResizeEvent; -import com.vaadin.v7.ui.Grid.ColumnResizeListener; - -@SuppressWarnings("serial") -public class GridResizeHiddenColumn extends AbstractTestUIWithLog { - - @Override - protected void setup(VaadinRequest request) { - Grid grid = new Grid(); - grid.setContainerDataSource(ComplexPerson.createContainer(100)); - grid.setColumns("firstName", "lastName", "gender", "birthDate"); - grid.getColumn("firstName").setHidable(true); - grid.getColumn("lastName").setHidable(true).setHidden(true); - grid.getColumn("gender").setHidable(true).setHidden(true); - grid.getColumn("birthDate").setHidable(true); - - addComponent(grid); - - grid.addColumnResizeListener(new ColumnResizeListener() { - @Override - public void columnResize(ColumnResizeEvent event) { - log(String.format("Column resized: id=%s, width=%s", - event.getColumn().getPropertyId(), - event.getColumn().getWidth())); - } - }); - } - - @Override - protected String getTestDescription() { - return "Resize columns and then make hidden column visible. The originally hidden column should have an extended width."; - } - - @Override - protected Integer getTicketNumber() { - return 19826; - } -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeTerror.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeTerror.java deleted file mode 100644 index 41a1081113..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeTerror.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.annotations.Widgetset; -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.util.ResizeTerrorizer; -import com.vaadin.tests.widgetset.TestingWidgetSet; -import com.vaadin.ui.UI; -import com.vaadin.v7.ui.Grid; - -@Widgetset(TestingWidgetSet.NAME) -public class GridResizeTerror extends UI { - @Override - protected void init(VaadinRequest request) { - Grid grid = new Grid(); - - int cols = 10; - Object[] data = new Object[cols]; - - for (int i = 0; i < cols; i++) { - grid.addColumn("Col " + i); - data[i] = "Data " + i; - } - - for (int i = 0; i < 500; i++) { - grid.addRow(data); - } - - ResizeTerrorizer terrorizer = new ResizeTerrorizer(grid); - setContent(terrorizer); - } -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridRowHeightChange.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridRowHeightChange.java deleted file mode 100644 index fd5b9b7665..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridRowHeightChange.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.vaadin.v7.tests.components.grid; - -import java.util.Arrays; -import java.util.List; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.ui.TabSheet; -import com.vaadin.ui.VerticalLayout; -import com.vaadin.v7.data.Property; -import com.vaadin.v7.shared.ui.grid.HeightMode; -import com.vaadin.v7.ui.Grid; -import com.vaadin.v7.ui.NativeSelect; - -public class GridRowHeightChange extends AbstractReindeerTestUI { - - private final List<String> themes = Arrays.asList("valo", "reindeer", - "runo", "chameleon", "base"); - - @Override - protected void setup(VaadinRequest request) { - Grid grid = new Grid(); - - // create column and fill rows - grid.addColumn("Header"); - for (int i = 1; i <= 10; i++) { - grid.addRow("row_" + i); - } - - // set height mode and height - grid.setHeightMode(HeightMode.ROW); - grid.setHeightByRows(10); - - // create a tabsheet with one tab and place grid inside - VerticalLayout tab = new VerticalLayout(); - TabSheet tabSheet = new TabSheet(); - tabSheet.setWidthUndefined(); - tabSheet.addTab(tab, "Tab"); - tab.addComponent(grid); - - // Theme selector - NativeSelect themeSelector = new NativeSelect("Theme selector", themes); - themeSelector.select("reindeer"); - themeSelector.setNullSelectionAllowed(false); - themeSelector - .addValueChangeListener(new Property.ValueChangeListener() { - @Override - public void valueChange(Property.ValueChangeEvent event) { - setTheme((String) event.getProperty().getValue()); - } - }); - - VerticalLayout layout = new VerticalLayout(); - layout.setSpacing(true); - layout.setSizeUndefined(); - - layout.addComponent(themeSelector); - layout.addComponent(tabSheet); - - addComponent(layout); - } - - @Override - protected String getTestDescription() { - return "Test if Grid's height is adjusted when HeightMode.ROW and row height is recalculated.<br>" - + "When loading is complete, all 10 rows should be visible with all themes."; - } - - @Override - protected Integer getTicketNumber() { - return 20104; - } -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java deleted file mode 100644 index 0806ced163..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.ui.VerticalSplitPanel; -import com.vaadin.v7.data.Item; -import com.vaadin.v7.data.util.IndexedContainer; -import com.vaadin.v7.event.SelectionEvent; -import com.vaadin.v7.event.SelectionEvent.SelectionListener; -import com.vaadin.v7.ui.Grid; -import com.vaadin.v7.ui.Grid.SelectionMode; - -public class GridScrollToLineWhileResizing extends AbstractReindeerTestUI { - - @Override - protected void setup(VaadinRequest request) { - - final VerticalSplitPanel vsp = new VerticalSplitPanel(); - vsp.setWidth(500, Unit.PIXELS); - vsp.setHeight(500, Unit.PIXELS); - vsp.setSplitPosition(100, Unit.PERCENTAGE); - addComponent(vsp); - - IndexedContainer indexedContainer = new IndexedContainer(); - indexedContainer.addContainerProperty("column1", String.class, ""); - - for (int i = 0; i < 100; i++) { - Item addItem = indexedContainer.addItem(i); - addItem.getItemProperty("column1").setValue("cell" + i); - } - - final Grid grid = new Grid(indexedContainer); - grid.setSizeFull(); - - grid.setSelectionMode(SelectionMode.SINGLE); - grid.addSelectionListener(new SelectionListener() { - - @Override - public void select(SelectionEvent event) { - vsp.setSplitPosition(50, Unit.PERCENTAGE); - grid.scrollTo(event.getSelected().iterator().next()); - } - }); - - vsp.setFirstComponent(grid); - } - - @Override - protected String getTestDescription() { - return "Tests scrollToLine while moving SplitPanel split position to resize the Grid on the same round-trip."; - } - - @Override - protected Integer getTicketNumber() { - return null; - } - -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrolling.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrolling.java deleted file mode 100644 index 1287c74895..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrolling.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Button.ClickListener; -import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.VerticalLayout; -import com.vaadin.v7.data.Item; -import com.vaadin.v7.data.util.IndexedContainer; -import com.vaadin.v7.shared.ui.grid.ScrollDestination; -import com.vaadin.v7.ui.Grid; - -@SuppressWarnings("serial") -public class GridScrolling extends AbstractReindeerTestUI { - - private Grid grid; - - private IndexedContainer ds; - - @Override - @SuppressWarnings("unchecked") - protected void setup(VaadinRequest request) { - // Build data source - ds = new IndexedContainer(); - - for (int col = 0; col < 5; col++) { - ds.addContainerProperty("col" + col, String.class, ""); - } - - for (int row = 0; row < 65536; row++) { - Item item = ds.addItem(Integer.valueOf(row)); - for (int col = 0; col < 5; col++) { - item.getItemProperty("col" + col) - .setValue("(" + row + ", " + col + ")"); - } - } - - grid = new Grid(ds); - - HorizontalLayout hl = new HorizontalLayout(); - hl.addComponent(grid); - hl.setMargin(true); - hl.setSpacing(true); - - VerticalLayout vl = new VerticalLayout(); - vl.setSpacing(true); - - // Add scroll buttons - Button scrollUpButton = new Button("Top", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - grid.scrollToStart(); - } - }); - scrollUpButton.setSizeFull(); - vl.addComponent(scrollUpButton); - - for (int i = 1; i < 7; ++i) { - final int row = (ds.size() / 7) * i; - Button scrollButton = new Button("Scroll to row " + row, - new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - grid.scrollTo(Integer.valueOf(row), - ScrollDestination.MIDDLE); - } - }); - scrollButton.setSizeFull(); - vl.addComponent(scrollButton); - } - - Button scrollDownButton = new Button("Bottom", new ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - grid.scrollToEnd(); - } - }); - scrollDownButton.setSizeFull(); - vl.addComponent(scrollDownButton); - - hl.addComponent(vl); - addComponent(hl); - } - - @Override - protected String getTestDescription() { - return "Test Grid programmatic scrolling features"; - } - - @Override - protected Integer getTicketNumber() { - return 13327; - } - -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSidebarPosition.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSidebarPosition.java deleted file mode 100644 index b8a3f8c58f..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSidebarPosition.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.ui.Alignment; -import com.vaadin.ui.HorizontalLayout; -import com.vaadin.v7.ui.Grid; - -public class GridSidebarPosition extends AbstractTestUI { - - static final String POPUP_ABOVE = "above"; - static final String POPUP_WINDOW_MOVED_UP = "movedup"; - static final String POPUP_WINDOW_HEIGHT = "windowheight"; - - @Override - protected void setup(VaadinRequest request) { - HorizontalLayout hl = new HorizontalLayout(); - hl.setSpacing(true); - hl.setHeight("100%"); - setContent(hl); - Grid grid = new Grid("Popup window height"); - grid.setId(POPUP_WINDOW_HEIGHT); - grid.setWidth("100px"); - for (int i = 0; i < 30; i++) { - grid.addColumn( - "This is a really really really really long column name " - + i) - .setHidable(true); - } - hl.addComponent(grid); - - grid = new Grid("Popup moved up"); - grid.setId(POPUP_WINDOW_MOVED_UP); - grid.setWidth("100px"); - grid.setHeight("400px"); - for (int i = 0; i < 15; i++) { - grid.addColumn("Column " + i).setHidable(true); - } - hl.addComponent(grid); - hl.setComponentAlignment(grid, Alignment.BOTTOM_LEFT); - - grid = new Grid("Popup above"); - grid.setId(POPUP_ABOVE); - grid.setWidth("100px"); - grid.setHeight("200px"); - for (int i = 0; i < 10; i++) { - grid.addColumn("Column " + i).setHidable(true); - } - hl.addComponent(grid); - hl.setComponentAlignment(grid, Alignment.BOTTOM_LEFT); - } - -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSingleColumn.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSingleColumn.java deleted file mode 100644 index 12ba530d25..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSingleColumn.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.v7.data.Item; -import com.vaadin.v7.data.util.IndexedContainer; -import com.vaadin.v7.ui.Grid; -import com.vaadin.v7.ui.Grid.Column; -import com.vaadin.v7.ui.Grid.SelectionMode; - -public class GridSingleColumn extends AbstractReindeerTestUI { - - @Override - protected void setup(VaadinRequest request) { - - IndexedContainer indexedContainer = new IndexedContainer(); - indexedContainer.addContainerProperty("column1", String.class, ""); - - for (int i = 0; i < 100; i++) { - Item addItem = indexedContainer.addItem(i); - addItem.getItemProperty("column1").setValue("cell"); - } - - Grid grid = new Grid(indexedContainer); - grid.setSelectionMode(SelectionMode.NONE); - - Column column = grid.getColumn("column1"); - - column.setHeaderCaption("Header"); - - addComponent(grid); - grid.scrollTo(grid.getContainerDataSource().getIdByIndex(50)); - } - - @Override - protected String getTestDescription() { - return "Tests a single column grid"; - } - - @Override - protected Integer getTicketNumber() { - return null; - } - -} diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java deleted file mode 100644 index dac2939997..0000000000 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2000-2016 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 - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.v7.tests.components.grid; - -import java.util.ArrayList; -import java.util.List; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.shared.data.sort.SortDirection; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.v7.data.sort.SortOrder; -import com.vaadin.v7.event.SortEvent; -import com.vaadin.v7.event.SortEvent.SortListener; -import com.vaadin.v7.ui.Grid; - -/* - * Test UI for checking that sort indicators of a Grid are updated when the sort order is changed by a - * SortListener. - */ -public class GridSortIndicator extends AbstractReindeerTestUI { - - @Override - protected void setup(VaadinRequest request) { - final Grid g = getGrid(); - addComponent(g); - g.addSortListener(new SortListener() { - private SortDirection oldSortDirection = null; - - @Override - public void sort(SortEvent event) { - List<SortOrder> currentSortOrder = new ArrayList<>( - event.getSortOrder()); - if (currentSortOrder.size() == 1) { - // If the name column was clicked, set a new sort order for - // both columns. Otherwise, revert to oldSortDirection if it - // is not null. - List<SortOrder> newSortOrder = new ArrayList<>(); - SortDirection newSortDirection = oldSortDirection; - if (currentSortOrder.get(0).getPropertyId() - .equals("Name")) { - newSortDirection = SortDirection.ASCENDING.equals( - oldSortDirection) ? SortDirection.DESCENDING - : SortDirection.ASCENDING; - } - if (newSortDirection != null) { - newSortOrder - .add(new SortOrder("Name", newSortDirection)); - newSortOrder - .add(new SortOrder("Value", newSortDirection)); - g.setSortOrder(newSortOrder); - } - oldSortDirection = newSortDirection; - } - } - }); - } - - private final Grid getGrid() { - Grid g = new Grid(); - g.addColumn("Name"); - g.addColumn("Value", Integer.class); - g.addRow(new Object[] { "a", 4 }); - g.addRow(new Object[] { "b", 5 }); - g.addRow(new Object[] { "c", 3 }); - g.addRow(new Object[] { "a", 6 }); - g.addRow(new Object[] { "a", 2 }); - g.addRow(new Object[] { "c", 7 }); - g.addRow(new Object[] { "b", 1 }); - return g; - } - - @Override - public String getTestDescription() { - return "When the first column is the primary sort column, both columns should have " - + "a sort indicator with the same sort direction. Clicking on the right column " - + "in that state should have no effect."; - } - - @Override - public Integer getTicketNumber() { - return 17440; - } -} |