Change-Id: I9831ca315b0a9f87d3f6baef3966a4efa43684c1tags/7.2.7
@@ -1,32 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |||
<link rel="selenium.base" href="" /> | |||
<title>DisappearingComponents</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">DisappearingComponents</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.treetable.DisappearingComponents?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstreetableDisappearingComponents::/VVerticalLayout[0]/ChildComponentContainer[0]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>12,7</td> | |||
</tr> | |||
<tr> | |||
<td>verifyElementPresent</td> | |||
<td>vaadin=runcomvaadintestscomponentstreetableDisappearingComponents::/VVerticalLayout[0]/ChildComponentContainer[0]/VTreeTable[0]/FocusableScrollPanel[0]/VTreeTable$VTreeTableScrollBody[0]/VTreeTable$VTreeTableScrollBody$VTreeTableRow[2]/VLink[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,16 +1,15 @@ | |||
package com.vaadin.tests.components.treetable; | |||
import com.vaadin.server.ExternalResource; | |||
import com.vaadin.tests.components.AbstractTestCase; | |||
import com.vaadin.ui.LegacyWindow; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.Link; | |||
import com.vaadin.ui.TreeTable; | |||
public class DisappearingComponents extends AbstractTestCase { | |||
public class DisappearingComponents extends AbstractTestUI { | |||
@Override | |||
public void init() { | |||
LegacyWindow mainWindow = new LegacyWindow("Application"); | |||
public void setup(VaadinRequest request) { | |||
final TreeTable tt = new TreeTable(); | |||
tt.setSizeUndefined(); | |||
tt.setWidth("100%"); | |||
@@ -33,13 +32,11 @@ public class DisappearingComponents extends AbstractTestCase { | |||
tt.setChildrenAllowed(items[2], false); | |||
tt.setParent(items[2], items[1]); | |||
mainWindow.addComponent(tt); | |||
setMainWindow(mainWindow); | |||
addComponent(tt); | |||
} | |||
@Override | |||
protected String getDescription() { | |||
protected String getTestDescription() { | |||
return "TreeTable column component empty after expand+collapse when pageLength is set to zero"; | |||
} | |||
@@ -0,0 +1,48 @@ | |||
/* | |||
* 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.treetable; | |||
import static org.junit.Assert.assertEquals; | |||
import org.junit.Test; | |||
import org.openqa.selenium.By; | |||
import org.openqa.selenium.WebElement; | |||
import com.vaadin.testbench.elements.TreeTableElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests that expanded cells with component contents aren't empty. | |||
* | |||
* @author Vaadin Ltd | |||
*/ | |||
public class DisappearingComponentsTest extends MultiBrowserTest { | |||
@Test | |||
public void testNotification() throws InterruptedException { | |||
openTestURL(); | |||
TreeTableElement treeTable = $(TreeTableElement.class).first(); | |||
treeTable.getCell(1, 0) | |||
.findElement(By.className("v-treetable-treespacer")).click(); | |||
sleep(100); | |||
WebElement link = treeTable.getCell(2, 1).findElement( | |||
By.className("v-link")); | |||
assertEquals("3", link.getText()); | |||
} | |||
} |