summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-01-07 16:17:00 +0200
committerJohannes Dahlström <johannesd@vaadin.com>2015-01-08 09:15:23 +0000
commit81165cf0bdb7821f28aa40e9689969adfddb666f (patch)
tree4b28996ae22c6a59846e7d8fdb261993f1dceed4 /uitest
parent864c5c70dc96a4d79985eb3b4fadb952d320f928 (diff)
downloadvaadin-framework-81165cf0bdb7821f28aa40e9689969adfddb666f.tar.gz
vaadin-framework-81165cf0bdb7821f28aa40e9689969adfddb666f.zip
Change Grid default selection model to Single (#15435)
Change-Id: Iba651c043fa47125b12d17371947042cbb03a589
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridAddRow.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridColspans.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNames.java2
5 files changed, 14 insertions, 8 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java b/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java
index 38ce49b622..ceaceb661d 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java
@@ -31,14 +31,14 @@ public class GridAddAndRemoveDataOnInitTest extends MultiBrowserTest {
openTestURL();
GridElement gridAdd = $(GridElement.class).first();
- if (!gridAdd.isElementPresent(By.vaadin("#cell[9][1]"))
- || gridAdd.isElementPresent(By.vaadin("#cell[10][1]"))) {
+ if (!gridAdd.isElementPresent(By.vaadin("#cell[9][0]"))
+ || gridAdd.isElementPresent(By.vaadin("#cell[10][0]"))) {
Assert.fail("Grid with added data contained incorrect rows");
}
GridElement gridRemove = $(GridElement.class).get(1);
- if (!gridRemove.isElementPresent(By.vaadin("#cell[4][1]"))
- || gridRemove.isElementPresent(By.vaadin("#cell[5][1]"))) {
+ if (!gridRemove.isElementPresent(By.vaadin("#cell[4][0]"))
+ || gridRemove.isElementPresent(By.vaadin("#cell[5][0]"))) {
Assert.fail("Grid with removed data contained incorrect rows");
}
}
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridAddRow.java b/uitest/src/com/vaadin/tests/components/grid/GridAddRow.java
index 74beb20914..fa2d7b5399 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridAddRow.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridAddRow.java
@@ -20,6 +20,7 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Grid;
+import com.vaadin.ui.Grid.SelectionMode;
public class GridAddRow extends AbstractTestUI {
@@ -27,6 +28,7 @@ public class GridAddRow extends AbstractTestUI {
protected void setup(VaadinRequest request) {
final Grid grid = new Grid();
+ grid.setSelectionMode(SelectionMode.MULTI);
grid.addColumn("firstName");
grid.addColumn("age", Integer.class);
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridColspans.java b/uitest/src/com/vaadin/tests/components/grid/GridColspans.java
index f61a39a1f2..80337971b6 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridColspans.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridColspans.java
@@ -25,6 +25,7 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Grid;
import com.vaadin.ui.Grid.FooterRow;
import com.vaadin.ui.Grid.HeaderRow;
+import com.vaadin.ui.Grid.SelectionMode;
import com.vaadin.ui.renderer.NumberRenderer;
public class GridColspans extends AbstractTestUI {
@@ -48,6 +49,7 @@ public class GridColspans extends AbstractTestUI {
grid = new Grid(dataSource);
grid.setWidth("600px");
grid.getColumn("zipCode").setRenderer(new NumberRenderer());
+ grid.setSelectionMode(SelectionMode.MULTI);
addComponent(grid);
HeaderRow row = grid.prependHeaderRow();
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java b/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
index af9aa3aad3..c71dd80360 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
@@ -34,7 +34,7 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
openTestURL();
GridElement grid = $(GridElement.class).first();
assertEquals("Miles header wasn't present.", "miles", grid
- .getHeaderCell(0, 3).getText().toLowerCase());
+ .getHeaderCell(0, 2).getText().toLowerCase());
}
@Test
@@ -43,13 +43,13 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
GridElement grid = $(GridElement.class).first();
// Overwritten foo property should not be sortable
- GridCellElement fooHeader = grid.getHeaderCell(0, 1);
+ GridCellElement fooHeader = grid.getHeaderCell(0, 0);
fooHeader.click();
assertFalse("Column foo was unexpectedly sorted.", fooHeader
.getAttribute("class").contains("sort"));
// Generated property miles is not sortable
- GridCellElement milesHeader = grid.getHeaderCell(0, 3);
+ GridCellElement milesHeader = grid.getHeaderCell(0, 2);
milesHeader.click();
assertFalse("Column miles was unexpectedly sorted.", milesHeader
.getAttribute("class").contains("sort"));
@@ -61,7 +61,7 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
GridElement grid = $(GridElement.class).first();
// Generated property baz is sortable
- GridCellElement bazHeader = grid.getHeaderCell(0, 4);
+ GridCellElement bazHeader = grid.getHeaderCell(0, 3);
bazHeader.click();
assertTrue("Column baz was not sorted ascending", bazHeader
.getAttribute("class").contains("sort-asc"));
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNames.java b/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNames.java
index 7c9eb66012..765cd01812 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNames.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNames.java
@@ -27,6 +27,7 @@ import com.vaadin.ui.Grid.FooterCell;
import com.vaadin.ui.Grid.FooterRow;
import com.vaadin.ui.Grid.HeaderCell;
import com.vaadin.ui.Grid.HeaderRow;
+import com.vaadin.ui.Grid.SelectionMode;
@Theme("valo")
public class GridHeaderStyleNames extends AbstractTestUIWithLog {
@@ -40,6 +41,7 @@ public class GridHeaderStyleNames extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
Grid grid = new Grid();
+ grid.setSelectionMode(SelectionMode.MULTI);
grid.setContainerDataSource(BeanItemContainerGenerator
.createContainer(100));