diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-11-03 16:10:56 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-11-05 08:34:59 +0000 |
commit | 070caa2a23623b78fdb08a931c6350465275a259 (patch) | |
tree | 9a2647bc4f3332ee159cd8e74e8a48f4bee3b714 /uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java | |
parent | 4393b34e124268ed76d449861297de9c31b4c79d (diff) | |
download | vaadin-framework-070caa2a23623b78fdb08a931c6350465275a259.tar.gz vaadin-framework-070caa2a23623b78fdb08a931c6350465275a259.zip |
Prevent row insert/remove RPC calls before client init (#13334)
Change-Id: I61eae7c74bc148aebf37d382b3ee2a9e14d389b2
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java b/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java new file mode 100644 index 0000000000..2f333698bf --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java @@ -0,0 +1,43 @@ +/* + * 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 + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.grid; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.By; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class GridAddAndRemoveDataOnInitTest extends MultiBrowserTest { + + @Test + public void verifyGridSizes() { + openTestURL(); + + GridElement gridAdd = $(GridElement.class).first(); + if (!gridAdd.isElementPresent(By.vaadin("#cell[9][1]")) + || gridAdd.isElementPresent(By.vaadin("#cell[10][1]"))) { + 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]"))) { + Assert.fail("Grid with removed data contained incorrect rows"); + } + } + +} |