Change-Id: I3357e736a024da0a5f8096f51840964b19f822a4tags/7.6.0.alpha6
@@ -5,7 +5,8 @@ import com.vaadin.data.Item; | |||
import com.vaadin.data.Property; | |||
import com.vaadin.data.Property.ValueChangeEvent; | |||
import com.vaadin.data.util.IndexedContainer; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.Button; | |||
import com.vaadin.ui.Button.ClickEvent; | |||
import com.vaadin.ui.CheckBox; | |||
@@ -14,11 +15,10 @@ import com.vaadin.ui.Table; | |||
import com.vaadin.ui.TextField; | |||
import com.vaadin.ui.VerticalLayout; | |||
@SuppressWarnings("serial") | |||
public class Footer extends TestBase { | |||
public class Footer extends AbstractTestUI { | |||
@Override | |||
protected void setup() { | |||
protected void setup(VaadinRequest request) { | |||
HorizontalLayout layout = new HorizontalLayout(); | |||
layout.setSpacing(true); | |||
@@ -49,7 +49,7 @@ public class Footer extends TestBase { | |||
final CheckBox visible = new CheckBox("Footers Visible", true); | |||
visible.setImmediate(true); | |||
visible.addListener(new Property.ValueChangeListener() { | |||
visible.addValueChangeListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setFooterVisible(visible.getValue()); | |||
@@ -110,7 +110,7 @@ public class Footer extends TestBase { | |||
} | |||
@Override | |||
protected String getDescription() { | |||
public String getDescription() { | |||
return "Table with footer"; | |||
} | |||
@@ -5,24 +5,21 @@ import com.vaadin.data.Item; | |||
import com.vaadin.data.Property; | |||
import com.vaadin.data.Property.ValueChangeEvent; | |||
import com.vaadin.data.util.IndexedContainer; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.tests.util.Log; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUIWithLog; | |||
import com.vaadin.ui.CheckBox; | |||
import com.vaadin.ui.Table; | |||
import com.vaadin.ui.Table.FooterClickEvent; | |||
import com.vaadin.ui.TextField; | |||
@SuppressWarnings("serial") | |||
public class FooterClick extends TestBase { | |||
public class FooterClick extends AbstractTestUIWithLog { | |||
private final String COLUMN1_PROPERTY_ID = "col1"; | |||
private final String COLUMN2_PROPERTY_ID = "col2"; | |||
private final String COLUMN3_PROPERTY_ID = "col3"; | |||
private Log log = new Log(5); | |||
@Override | |||
protected void setup() { | |||
protected void setup(VaadinRequest request) { | |||
final Table table = new Table(); | |||
table.setId("table"); | |||
table.setContainerDataSource(createContainer()); | |||
@@ -33,7 +30,6 @@ public class FooterClick extends TestBase { | |||
table.setColumnReorderingAllowed(true); | |||
table.setColumnFooter(COLUMN1_PROPERTY_ID, "fuu"); | |||
// table.setColumnFooter(COLUMN2_PROPERTY_ID, "bar"); | |||
table.setColumnFooter(COLUMN3_PROPERTY_ID, "fuubar"); | |||
final TextField columnField = new TextField( | |||
@@ -41,31 +37,33 @@ public class FooterClick extends TestBase { | |||
columnField.setId("ClickedColumn"); | |||
// Add a footer click listener | |||
table.addListener(new Table.FooterClickListener() { | |||
table.addFooterClickListener(new Table.FooterClickListener() { | |||
@Override | |||
public void footerClick(FooterClickEvent event) { | |||
columnField.setValue(String.valueOf(event.getPropertyId())); | |||
log.log("Clicked on footer: " + event.getPropertyId()); | |||
log("Clicked on footer: " + event.getPropertyId()); | |||
} | |||
}); | |||
CheckBox immediateCheckbox = new CheckBox("Immediate"); | |||
immediateCheckbox.setImmediate(true); | |||
immediateCheckbox.setValue(table.isImmediate()); | |||
immediateCheckbox.addListener(new Property.ValueChangeListener() { | |||
immediateCheckbox | |||
.addValueChangeListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setImmediate((Boolean) event.getProperty().getValue()); | |||
} | |||
}); | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setImmediate((Boolean) event.getProperty() | |||
.getValue()); | |||
} | |||
}); | |||
CheckBox columnReorderingCheckbox = new CheckBox( | |||
"Column reordering allowed"); | |||
columnReorderingCheckbox.setImmediate(true); | |||
columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); | |||
columnReorderingCheckbox | |||
.addListener(new Property.ValueChangeListener() { | |||
.addValueChangeListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
@@ -76,15 +74,12 @@ public class FooterClick extends TestBase { | |||
addComponent(immediateCheckbox); | |||
addComponent(columnReorderingCheckbox); | |||
addComponent(log); | |||
addComponent(table); | |||
addComponent(columnField); | |||
} | |||
@Override | |||
protected String getDescription() { | |||
public String getDescription() { | |||
return "Tests the footer click handler"; | |||
} | |||
@@ -0,0 +1,116 @@ | |||
/* | |||
* 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.table; | |||
import static org.hamcrest.MatcherAssert.assertThat; | |||
import static org.junit.Assert.assertEquals; | |||
import java.io.IOException; | |||
import java.util.Arrays; | |||
import org.junit.Test; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.elements.CheckBoxElement; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.testbench.elements.TextFieldElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class FooterClickTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
TableElement table = $(TableElement.class).first(); | |||
TestBenchElement footer0 = table.getFooterCell(0); | |||
footer0.click(); | |||
TextFieldElement tf = $(TextFieldElement.class).id("ClickedColumn"); | |||
assertEquals("col1", tf.getValue()); | |||
assertAnyLogText("1. Clicked on footer: col1"); | |||
table = $(TableElement.class).first(); | |||
TestBenchElement footer1 = table.getFooterCell(1); | |||
footer1.click(); | |||
tf = $(TextFieldElement.class).id("ClickedColumn"); | |||
assertEquals("col2", tf.getValue()); | |||
assertAnyLogText("2. Clicked on footer: col2"); | |||
table = $(TableElement.class).first(); | |||
TestBenchElement footer2 = table.getFooterCell(2); | |||
footer2.click(); | |||
tf = $(TextFieldElement.class).id("ClickedColumn"); | |||
assertEquals("col3", tf.getValue()); | |||
assertAnyLogText("3. Clicked on footer: col3"); | |||
CheckBoxElement cb = $(CheckBoxElement.class).first(); | |||
cb.click(); | |||
table = $(TableElement.class).first(); | |||
footer0 = table.getFooterCell(0); | |||
footer0.click(); | |||
tf = $(TextFieldElement.class).id("ClickedColumn"); | |||
assertEquals("col1", tf.getValue()); | |||
assertAnyLogText("4. Clicked on footer: col1"); | |||
table = $(TableElement.class).first(); | |||
footer1 = table.getFooterCell(1); | |||
footer1.click(); | |||
tf = $(TextFieldElement.class).id("ClickedColumn"); | |||
assertEquals("col2", tf.getValue()); | |||
assertAnyLogText("5. Clicked on footer: col2"); | |||
table = $(TableElement.class).first(); | |||
footer2 = table.getFooterCell(2); | |||
footer2.click(); | |||
tf = $(TextFieldElement.class).id("ClickedColumn"); | |||
assertEquals("col3", tf.getValue()); | |||
assertAnyLogText("6. Clicked on footer: col3"); | |||
} | |||
private void assertAnyLogText(String... texts) { | |||
assertThat(String.format( | |||
"Correct log text was not found, expected any of %s", | |||
Arrays.asList(texts)), logContainsAnyText(texts)); | |||
} | |||
private boolean logContainsAnyText(String... texts) { | |||
for (String text : texts) { | |||
if (logContainsText(text)) { | |||
return true; | |||
} | |||
} | |||
return false; | |||
} | |||
} |
@@ -0,0 +1,206 @@ | |||
/* | |||
* 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.table; | |||
import static org.junit.Assert.assertEquals; | |||
import java.io.IOException; | |||
import org.junit.Test; | |||
import org.openqa.selenium.By; | |||
import org.openqa.selenium.WebDriver; | |||
import org.openqa.selenium.support.ui.ExpectedCondition; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.elements.ButtonElement; | |||
import com.vaadin.testbench.elements.CheckBoxElement; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.testbench.elements.TextFieldElement; | |||
import com.vaadin.testbench.parallel.BrowserUtil; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class FooterTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
waitForElementPresent(By.className("v-table")); | |||
compareScreen("initial"); | |||
TableElement table = $(TableElement.class).first(); | |||
TestBenchElement footer0 = table.getFooterCell(0); | |||
TestBenchElement footer1 = table.getFooterCell(1); | |||
TestBenchElement footer2 = table.getFooterCell(2); | |||
assertEquals("Footer1", footer0.getText()); | |||
assertEquals("Footer2", footer1.getText()); | |||
assertEquals("Footer3", footer2.getText()); | |||
CheckBoxElement checkBox = $(CheckBoxElement.class).first(); | |||
checkBox.click(); | |||
if (!BrowserUtil.isIE8(getDesiredCapabilities())) { | |||
// excluded IE8 since its screenshots varies from run-to-run | |||
compareScreen("no-footer"); | |||
} | |||
checkBox.click(); | |||
if (!BrowserUtil.isIE8(getDesiredCapabilities())) { | |||
// excluded IE8 since its screenshots varies from run-to-run | |||
compareScreen("footer-col1-col2-col3-a"); | |||
} | |||
table = $(TableElement.class).first(); | |||
footer0 = table.getFooterCell(0); | |||
footer1 = table.getFooterCell(1); | |||
footer2 = table.getFooterCell(2); | |||
assertEquals("Footer1", footer0.getText()); | |||
assertEquals("Footer2", footer1.getText()); | |||
assertEquals("Footer3", footer2.getText()); | |||
// open table column selector menu | |||
table.findElement(By.className("v-table-column-selector")).click(); | |||
// hide col2 | |||
findElements(By.className("gwt-MenuItem")).get(1).click(); | |||
if (!BrowserUtil.isIE8(getDesiredCapabilities())) { | |||
// excluded IE8 since its screenshots varies from run-to-run | |||
compareScreen("footer-col1-col3"); | |||
} | |||
// open table column selector menu | |||
table.findElement(By.className("v-table-column-selector")).click(); | |||
// show col2 | |||
findElements(By.className("gwt-MenuItem")).get(1).click(); | |||
if (!BrowserUtil.isIE8(getDesiredCapabilities())) { | |||
// excluded IE8 since its screenshots varies from run-to-run | |||
compareScreen("footer-col1-col2-col3-b"); | |||
} | |||
TextFieldElement tf = $(TextFieldElement.class).first(); | |||
tf.clear(); | |||
tf.sendKeys("fuu"); | |||
ButtonElement button = $(ButtonElement.class).first(); | |||
button.click(); | |||
table = $(TableElement.class).first(); | |||
footer0 = table.getFooterCell(0); | |||
assertEquals("fuu", footer0.getText()); | |||
tf = $(TextFieldElement.class).get(1); | |||
tf.clear(); | |||
tf.sendKeys("bar"); | |||
button = $(ButtonElement.class).get(1); | |||
button.click(); | |||
table = $(TableElement.class).first(); | |||
footer1 = table.getFooterCell(1); | |||
assertEquals("bar", footer1.getText()); | |||
tf = $(TextFieldElement.class).get(2); | |||
tf.clear(); | |||
tf.sendKeys(""); | |||
button = $(ButtonElement.class).get(2); | |||
button.click(); | |||
table = $(TableElement.class).first(); | |||
footer2 = table.getFooterCell(2); | |||
assertEquals("", footer2.getText().trim()); | |||
TextFieldElement tf1 = $(TextFieldElement.class).first(); | |||
tf1.clear(); | |||
tf1.sendKeys("Footer1"); | |||
TextFieldElement tf2 = $(TextFieldElement.class).get(1); | |||
tf2.clear(); | |||
tf2.sendKeys("Footer2"); | |||
TextFieldElement tf3 = $(TextFieldElement.class).get(2); | |||
tf3.clear(); | |||
tf3.sendKeys("Footer3"); | |||
waitUntiltextFieldIsChangedTo(tf1, "Footer1"); | |||
waitUntiltextFieldIsChangedTo(tf2, "Footer2"); | |||
waitUntiltextFieldIsChangedTo(tf3, "Footer3"); | |||
button = $(ButtonElement.class).first(); | |||
button.click(); | |||
button = $(ButtonElement.class).get(1); | |||
button.click(); | |||
button = $(ButtonElement.class).get(2); | |||
button.click(); | |||
waitUntilFooterCellIsChangedTo(0, "Footer1"); | |||
waitUntilFooterCellIsChangedTo(1, "Footer2"); | |||
waitUntilFooterCellIsChangedTo(2, "Footer3"); | |||
table = $(TableElement.class).first(); | |||
footer0 = table.getFooterCell(0); | |||
assertEquals("Footer1", footer0.getText()); | |||
if (!BrowserUtil.isIE8(getDesiredCapabilities())) { | |||
// excluded IE8 since its screenshots varies from run-to-run | |||
compareScreen("footer-col1-col2-col3-c"); | |||
} | |||
} | |||
private void waitUntiltextFieldIsChangedTo(final TextFieldElement tf, | |||
final String text) { | |||
waitUntil(new ExpectedCondition<Boolean>() { | |||
@Override | |||
public Boolean apply(WebDriver input) { | |||
return text.equals(tf.getValue()); | |||
} | |||
@Override | |||
public String toString() { | |||
// Timed out after 10 seconds waiting for ... | |||
return String.format("textfields value was '%s'", | |||
"" + tf.getText()); | |||
} | |||
}); | |||
} | |||
private void waitUntilFooterCellIsChangedTo(final int cell, | |||
final String footer) { | |||
final TestBenchElement footerCell = $(TableElement.class).first() | |||
.getFooterCell(cell); | |||
waitUntil(new ExpectedCondition<Boolean>() { | |||
@Override | |||
public Boolean apply(WebDriver input) { | |||
return footer.equals(footerCell.getText()); | |||
} | |||
@Override | |||
public String toString() { | |||
// Timed out after 10 seconds waiting for ... | |||
return String.format("footer cell %s's text was'%s'", | |||
"" + cell, footerCell.getText()); | |||
} | |||
}); | |||
} | |||
} |
@@ -5,17 +5,17 @@ import com.vaadin.data.Item; | |||
import com.vaadin.data.Property; | |||
import com.vaadin.data.Property.ValueChangeEvent; | |||
import com.vaadin.data.util.IndexedContainer; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.CheckBox; | |||
import com.vaadin.ui.Table; | |||
import com.vaadin.ui.Table.HeaderClickEvent; | |||
import com.vaadin.ui.TextField; | |||
@SuppressWarnings("serial") | |||
public class HeaderClick extends TestBase { | |||
public class HeaderClick extends AbstractTestUI { | |||
@Override | |||
protected void setup() { | |||
protected void setup(VaadinRequest request) { | |||
final Table table = new Table(); | |||
table.setColumnReorderingAllowed(true); | |||
table.setContainerDataSource(createContainer()); | |||
@@ -27,7 +27,7 @@ public class HeaderClick extends TestBase { | |||
"ProperyId of clicked column"); | |||
// Add a header click listener | |||
table.addListener(new Table.HeaderClickListener() { | |||
table.addHeaderClickListener(new Table.HeaderClickListener() { | |||
@Override | |||
public void headerClick(HeaderClickEvent event) { | |||
columnField.setValue(String.valueOf(event.getPropertyId())); | |||
@@ -37,31 +37,35 @@ public class HeaderClick extends TestBase { | |||
CheckBox immediateCheckbox = new CheckBox("Immediate"); | |||
immediateCheckbox.setImmediate(true); | |||
immediateCheckbox.setValue(table.isImmediate()); | |||
immediateCheckbox.addListener(new Property.ValueChangeListener() { | |||
immediateCheckbox | |||
.addValueChangeListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setImmediate((Boolean) event.getProperty().getValue()); | |||
} | |||
}); | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setImmediate((Boolean) event.getProperty() | |||
.getValue()); | |||
} | |||
}); | |||
CheckBox sortEnabledCheckbox = new CheckBox("Sortable"); | |||
sortEnabledCheckbox.setImmediate(true); | |||
sortEnabledCheckbox.setValue(table.isSortEnabled()); | |||
sortEnabledCheckbox.addListener(new Property.ValueChangeListener() { | |||
sortEnabledCheckbox | |||
.addValueChangeListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setSortDisabled(!(Boolean) event.getProperty().getValue()); | |||
} | |||
}); | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setSortEnabled((Boolean) event.getProperty() | |||
.getValue()); | |||
} | |||
}); | |||
CheckBox columnReorderingCheckbox = new CheckBox( | |||
"Column reordering allowed"); | |||
columnReorderingCheckbox.setImmediate(true); | |||
columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); | |||
columnReorderingCheckbox | |||
.addListener(new Property.ValueChangeListener() { | |||
.addValueChangeListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
@@ -79,7 +83,7 @@ public class HeaderClick extends TestBase { | |||
} | |||
@Override | |||
protected String getDescription() { | |||
public String getDescription() { | |||
return "Tests the header click listener"; | |||
} | |||
@@ -0,0 +1,142 @@ | |||
/* | |||
* 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.table; | |||
import static org.junit.Assert.assertEquals; | |||
import java.io.IOException; | |||
import org.junit.Test; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.elements.CheckBoxElement; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.testbench.elements.TextFieldElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class HeaderClickTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
TableElement table = $(TableElement.class).first(); | |||
TestBenchElement header0 = table.getHeaderCell(0); | |||
header0.click(); | |||
TextFieldElement tf = $(TextFieldElement.class).first(); | |||
assertEquals("col1", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
TestBenchElement header1 = table.getHeaderCell(1); | |||
header1.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col2", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
TestBenchElement header2 = table.getHeaderCell(2); | |||
header2.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col3", tf.getValue()); | |||
CheckBoxElement cb = $(CheckBoxElement.class).first(); | |||
cb.click(); | |||
table = $(TableElement.class).first(); | |||
header0 = table.getHeaderCell(0); | |||
header0.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col1", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
header1 = table.getHeaderCell(1); | |||
header1.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col2", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
header2 = table.getHeaderCell(2); | |||
header2.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col3", tf.getValue()); | |||
cb = $(CheckBoxElement.class).get(1); | |||
cb.click(); | |||
table = $(TableElement.class).first(); | |||
header0 = table.getHeaderCell(0); | |||
header0.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col1", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
header1 = table.getHeaderCell(1); | |||
header1.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col2", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
header2 = table.getHeaderCell(2); | |||
header2.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col3", tf.getValue()); | |||
cb = $(CheckBoxElement.class).get(2); | |||
cb.click(); | |||
table = $(TableElement.class).first(); | |||
header0 = table.getHeaderCell(0); | |||
header0.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col1", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
header1 = table.getHeaderCell(1); | |||
header1.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col2", tf.getValue()); | |||
table = $(TableElement.class).first(); | |||
header2 = table.getHeaderCell(2); | |||
header2.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col3", tf.getValue()); | |||
cb = $(CheckBoxElement.class).get(2); | |||
cb.click(); | |||
tf = $(TextFieldElement.class).first(); | |||
assertEquals("col3", tf.getValue()); | |||
} | |||
} |
@@ -5,8 +5,8 @@ import com.vaadin.data.Item; | |||
import com.vaadin.data.Property.ValueChangeEvent; | |||
import com.vaadin.data.Property.ValueChangeListener; | |||
import com.vaadin.data.util.IndexedContainer; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.tests.util.Log; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUIWithLog; | |||
import com.vaadin.ui.CheckBox; | |||
import com.vaadin.ui.Table; | |||
import com.vaadin.ui.Table.FooterClickEvent; | |||
@@ -14,12 +14,10 @@ import com.vaadin.ui.Table.FooterClickListener; | |||
import com.vaadin.ui.Table.HeaderClickEvent; | |||
import com.vaadin.ui.Table.HeaderClickListener; | |||
public class HeaderFooterClickLeftRightMiddle extends TestBase { | |||
private Log log = new Log(10); | |||
public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog { | |||
@Override | |||
protected void setup() { | |||
protected void setup(VaadinRequest request) { | |||
final Table table = new Table(); | |||
table.setColumnReorderingAllowed(true); | |||
table.setContainerDataSource(createContainer()); | |||
@@ -31,7 +29,7 @@ public class HeaderFooterClickLeftRightMiddle extends TestBase { | |||
CheckBox immediateCheckbox = new CheckBox("Immediate"); | |||
immediateCheckbox.setImmediate(true); | |||
immediateCheckbox.setValue(table.isImmediate()); | |||
immediateCheckbox.addListener(new ValueChangeListener() { | |||
immediateCheckbox.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
@@ -42,64 +40,68 @@ public class HeaderFooterClickLeftRightMiddle extends TestBase { | |||
CheckBox headerClickListenerCheckbox = new CheckBox( | |||
"Header click listener"); | |||
headerClickListenerCheckbox.setImmediate(true); | |||
headerClickListenerCheckbox.addListener(new ValueChangeListener() { | |||
private HeaderClickListener headerClickListener = new HeaderClickListener() { | |||
@Override | |||
public void headerClick(HeaderClickEvent event) { | |||
String type = event.isDoubleClick() ? "Double click" | |||
: "Click"; | |||
log.log(type + " on header " | |||
+ event.getPropertyId().toString() + " using " | |||
+ event.getButtonName()); | |||
} | |||
}; | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (table.getListeners(HeaderClickEvent.class).isEmpty()) { | |||
table.addListener(headerClickListener); | |||
} else { | |||
table.removeListener(headerClickListener); | |||
} | |||
} | |||
}); | |||
headerClickListenerCheckbox | |||
.addValueChangeListener(new ValueChangeListener() { | |||
private HeaderClickListener headerClickListener = new HeaderClickListener() { | |||
@Override | |||
public void headerClick(HeaderClickEvent event) { | |||
String type = event.isDoubleClick() ? "Double click" | |||
: "Click"; | |||
log(type + " on header " | |||
+ event.getPropertyId().toString() | |||
+ " using " + event.getButtonName()); | |||
} | |||
}; | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (table.getListeners(HeaderClickEvent.class) | |||
.isEmpty()) { | |||
table.addHeaderClickListener(headerClickListener); | |||
} else { | |||
table.removeHeaderClickListener(headerClickListener); | |||
} | |||
} | |||
}); | |||
headerClickListenerCheckbox.setValue(true); | |||
CheckBox footerClickListenerCheckbox = new CheckBox( | |||
"Footer click listener"); | |||
footerClickListenerCheckbox.setImmediate(true); | |||
footerClickListenerCheckbox.addListener(new ValueChangeListener() { | |||
private FooterClickListener footerClickListener = new FooterClickListener() { | |||
@Override | |||
public void footerClick(FooterClickEvent event) { | |||
String type = event.isDoubleClick() ? "Double click" | |||
: "Click"; | |||
log.log(type + " on footer " | |||
+ event.getPropertyId().toString() + " using " | |||
+ event.getButtonName()); | |||
} | |||
}; | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (table.getListeners(FooterClickEvent.class).isEmpty()) { | |||
table.addListener(footerClickListener); | |||
} else { | |||
table.removeListener(footerClickListener); | |||
} | |||
} | |||
}); | |||
footerClickListenerCheckbox | |||
.addValueChangeListener(new ValueChangeListener() { | |||
private FooterClickListener footerClickListener = new FooterClickListener() { | |||
@Override | |||
public void footerClick(FooterClickEvent event) { | |||
String type = event.isDoubleClick() ? "Double click" | |||
: "Click"; | |||
log(type + " on footer " | |||
+ event.getPropertyId().toString() | |||
+ " using " + event.getButtonName()); | |||
} | |||
}; | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (table.getListeners(FooterClickEvent.class) | |||
.isEmpty()) { | |||
table.addFooterClickListener(footerClickListener); | |||
} else { | |||
table.removeFooterClickListener(footerClickListener); | |||
} | |||
} | |||
}); | |||
footerClickListenerCheckbox.setValue(true); | |||
CheckBox sortEnabledCheckbox = new CheckBox("Sortable"); | |||
sortEnabledCheckbox.setImmediate(true); | |||
sortEnabledCheckbox.setValue(table.isSortEnabled()); | |||
sortEnabledCheckbox.addListener(new ValueChangeListener() { | |||
sortEnabledCheckbox.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setSortEnabled((Boolean) event.getProperty().getValue()); | |||
@@ -110,14 +112,15 @@ public class HeaderFooterClickLeftRightMiddle extends TestBase { | |||
"Column reordering allowed"); | |||
columnReorderingCheckbox.setImmediate(true); | |||
columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); | |||
columnReorderingCheckbox.addListener(new ValueChangeListener() { | |||
columnReorderingCheckbox | |||
.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setColumnReorderingAllowed((Boolean) event.getProperty() | |||
.getValue()); | |||
} | |||
}); | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
table.setColumnReorderingAllowed((Boolean) event | |||
.getProperty().getValue()); | |||
} | |||
}); | |||
addComponent(immediateCheckbox); | |||
addComponent(headerClickListenerCheckbox); | |||
@@ -125,12 +128,11 @@ public class HeaderFooterClickLeftRightMiddle extends TestBase { | |||
addComponent(sortEnabledCheckbox); | |||
addComponent(columnReorderingCheckbox); | |||
addComponent(table); | |||
addComponent(log); | |||
} | |||
@Override | |||
protected String getDescription() { | |||
public String getDescription() { | |||
return "Tests the header click listener"; | |||
} | |||
@@ -0,0 +1,82 @@ | |||
/* | |||
* 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.table; | |||
import static org.hamcrest.MatcherAssert.assertThat; | |||
import java.io.IOException; | |||
import java.util.Arrays; | |||
import org.junit.Test; | |||
import org.openqa.selenium.By; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class HeaderFooterClickLeftRightMiddleTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
waitForElementPresent(By.className("v-table")); | |||
TableElement table = $(TableElement.class).first(); | |||
table.getHeaderCell(0).click(); | |||
assertAnyLogText("1. Click on header col1 using left"); | |||
table.getHeaderCell(0).contextClick(); | |||
assertAnyLogText("2. Click on header col1 using right"); | |||
table.getHeaderCell(0).doubleClick(); | |||
assertAnyLogText("4. Double click on header col1 using left", | |||
"5. Double click on header col1 using left"); | |||
table.getFooterCell(1).click(); | |||
assertAnyLogText("5. Click on footer col2 using left", | |||
"6. Click on footer col2 using left"); | |||
table.getFooterCell(1).contextClick(); | |||
assertAnyLogText("6. Click on footer col2 using right", | |||
"7. Click on footer col2 using right"); | |||
table.getFooterCell(1).doubleClick(); | |||
assertAnyLogText("8. Double click on footer col2 using left", | |||
"10. Double click on footer col2 using left"); | |||
} | |||
private void assertAnyLogText(String... texts) { | |||
assertThat(String.format( | |||
"Correct log text was not found, expected any of %s", | |||
Arrays.asList(texts)), logContainsAnyText(texts)); | |||
} | |||
private boolean logContainsAnyText(String... texts) { | |||
for (String text : texts) { | |||
if (logContainsText(text)) { | |||
return true; | |||
} | |||
} | |||
return false; | |||
} | |||
} |
@@ -0,0 +1,158 @@ | |||
package com.vaadin.tests.components.table; | |||
import com.vaadin.data.Item; | |||
import com.vaadin.data.Property.ValueChangeEvent; | |||
import com.vaadin.data.Property.ValueChangeListener; | |||
import com.vaadin.event.Action; | |||
import com.vaadin.event.ItemClickEvent; | |||
import com.vaadin.event.ItemClickEvent.ItemClickListener; | |||
import com.vaadin.server.ExternalResource; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.CheckBox; | |||
import com.vaadin.ui.Component; | |||
import com.vaadin.ui.Link; | |||
import com.vaadin.ui.Notification; | |||
import com.vaadin.ui.Table; | |||
public class HeaderPositionWhenSorting extends AbstractTestUI implements | |||
Action.Handler, ItemClickListener { | |||
private Table table; | |||
private boolean actionHandlerHasActions = false; | |||
@Override | |||
protected void setup(VaadinRequest request) { | |||
CheckBox cb = new CheckBox("Item click listener"); | |||
cb.setImmediate(true); | |||
cb.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (((Boolean) event.getProperty().getValue())) { | |||
table.addItemClickListener(HeaderPositionWhenSorting.this); | |||
} else { | |||
table.removeItemClickListener(HeaderPositionWhenSorting.this); | |||
} | |||
} | |||
}); | |||
addComponent(cb); | |||
CheckBox cbActionHandler = new CheckBox("Action handler"); | |||
cbActionHandler.setImmediate(true); | |||
cbActionHandler.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (((Boolean) event.getProperty().getValue())) { | |||
table.addActionHandler(HeaderPositionWhenSorting.this); | |||
} else { | |||
table.removeActionHandler(HeaderPositionWhenSorting.this); | |||
} | |||
} | |||
}); | |||
addComponent(cbActionHandler); | |||
CheckBox cbActionHasActions = new CheckBox("Action handler has actions"); | |||
cbActionHasActions.setImmediate(true); | |||
cbActionHasActions.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
actionHandlerHasActions = ((Boolean) event.getProperty() | |||
.getValue()); | |||
// Workaround to ensure actions are repainted | |||
removeComponent(table); | |||
addComponent(table); | |||
} | |||
}); | |||
addComponent(cbActionHasActions); | |||
createTable(); | |||
addComponent(table); | |||
} | |||
private void createTable() { | |||
// Have a table with a numeric column | |||
table = new Table("A table"); | |||
table.addContainerProperty("Name", String.class, null); | |||
table.addContainerProperty("Died At Age", Integer.class, null); | |||
// Add a generated column with a link to Google | |||
table.addGeneratedColumn("Search", new Table.ColumnGenerator() { | |||
@Override | |||
public Component generateCell(Table source, Object itemId, | |||
Object columnId) { | |||
Item item = source.getItem(itemId); | |||
String name = (String) item.getItemProperty("Name").getValue(); | |||
return new Link("Google for " + name, new ExternalResource( | |||
"http://www.google.co.uk/search?q=" + name)); | |||
} | |||
}); | |||
// Insert some data | |||
Object people[][] = { { "Galileo", 77 }, { "Monnier", 83 }, | |||
{ "Vaisala", 79 }, { "Oterma", 86 } }; | |||
for (int i = 0; i < people.length; i++) { | |||
table.addItem(people[i], i); | |||
} | |||
// Calculate the average of the numeric column | |||
double avgAge = 0; | |||
for (int i = 0; i < people.length; i++) { | |||
avgAge += (Integer) people[i][1]; | |||
} | |||
avgAge /= people.length; | |||
// Set the footers | |||
table.setFooterVisible(true); | |||
table.setColumnFooter("Name", "Average"); | |||
table.setColumnFooter("Died At Age", String.valueOf(avgAge)); | |||
// Adjust the table height a bit | |||
table.setPageLength(table.size() + 2); | |||
for (int i = 0; i < people.length; i++) { | |||
Object[] person = people[i]; | |||
String name = (String) person[0]; | |||
addComponent(new Link("Google for " + name, new ExternalResource( | |||
"http://www.google.co.uk/search?q=" + name))); | |||
} | |||
} | |||
@Override | |||
public String getDescription() { | |||
return "Table should only prevent the browser context menu when the right click is used for some Table specific operation. In practice these are either action handlers/context menu or item click listeners (right click). Note that item click listeners affects rows only, not the body."; | |||
} | |||
@Override | |||
protected Integer getTicketNumber() { | |||
return 5924; | |||
} | |||
@Override | |||
public void itemClick(ItemClickEvent event) { | |||
Notification.show("Click using " + event.getButtonName()); | |||
} | |||
@Override | |||
public Action[] getActions(Object target, Object sender) { | |||
if (!actionHandlerHasActions) { | |||
return null; | |||
} | |||
return new Action[] { new Action("test") }; | |||
} | |||
@Override | |||
public void handleAction(Action action, Object sender, Object target) { | |||
Notification.show("Action: " + action.getCaption()); | |||
} | |||
} |
@@ -0,0 +1,57 @@ | |||
/* | |||
* 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.table; | |||
import java.io.IOException; | |||
import org.junit.Test; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class HeaderPositionWhenSortingTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
TableElement table = $(TableElement.class).first(); | |||
TestBenchElement header1 = table.getHeaderCell(1); | |||
header1.click(); | |||
compareScreen("sort-asc-died-at-age"); | |||
header1.click(); | |||
compareScreen("sort-desc-died-at-age"); | |||
TestBenchElement header0 = table.getHeaderCell(0); | |||
header0.click(); | |||
compareScreen("sort-asc-name"); | |||
header0.click(); | |||
compareScreen("sort-desc-name"); | |||
} | |||
} |
@@ -0,0 +1,80 @@ | |||
package com.vaadin.tests.components.table; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
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.Table; | |||
public class HeaderSyncOnScroll extends AbstractTestUI { | |||
private Table table; | |||
@Override | |||
public String getDescription() { | |||
return "Header's should be in sync when scrolling"; | |||
} | |||
@Override | |||
protected Integer getTicketNumber() { | |||
return 17947; | |||
} | |||
@Override | |||
protected void setup(VaadinRequest request) { | |||
table = new Table(); | |||
table.setWidth("400px"); | |||
table.setHeight("300px"); | |||
table.setPageLength(40); | |||
table.setFooterVisible(true); | |||
for (int i = 1; i < 11; i++) { | |||
String propertyId = "Property " + i; | |||
table.addContainerProperty(propertyId, String.class, null); | |||
if ((i - 1) % 2 == 0) { | |||
table.setColumnFooter(propertyId, "FOOTER " + i); | |||
} | |||
} | |||
for (int i = 0; i < 80; i++) { | |||
table.addItem(new String[] { "item " + i + "1", "item " + i + "2", | |||
"item " + i + "3", "item " + i + "4", "item " + i + "5", | |||
"item " + i + "6", "item " + i + "7", "item " + i + "8", | |||
"item " + i + "9", "item " + i + "10" }, i); | |||
} | |||
addComponent(table); | |||
HorizontalLayout buttonsLo = new HorizontalLayout(); | |||
addComponent(buttonsLo); | |||
Button setTableWidth100 = new Button("table.setWidth(100%)", | |||
new ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
table.setWidth("100%"); | |||
} | |||
}); | |||
Button setParent500px = new Button("layout.setWidth(500px)", | |||
new ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
table.getParent().setWidth("500px"); | |||
} | |||
}); | |||
Button setParent100 = new Button("layout.setWidth(100%)", | |||
new ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
table.getParent().setWidth("100%"); | |||
} | |||
}); | |||
buttonsLo.addComponents(setTableWidth100, setParent500px, setParent100); | |||
} | |||
} |
@@ -0,0 +1,54 @@ | |||
/* | |||
* 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.table; | |||
import java.io.IOException; | |||
import org.junit.Test; | |||
import com.vaadin.testbench.elements.ButtonElement; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class HeaderSyncOnScrollTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
$(ButtonElement.class).first().click(); | |||
compareScreen("100pct-no-scrollbar"); | |||
$(ButtonElement.class).get(1).click(); | |||
TableElement first = $(TableElement.class).first(); | |||
first.scrollLeft(200); | |||
compareScreen("300px-scrolled-right"); | |||
$(ButtonElement.class).get(2).click(); | |||
compareScreen("100pct-no-scrollbar-second"); | |||
} | |||
} |
@@ -2,14 +2,16 @@ package com.vaadin.tests.components.table; | |||
import com.vaadin.data.Property.ValueChangeEvent; | |||
import com.vaadin.data.Property.ValueChangeListener; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.CheckBox; | |||
import com.vaadin.ui.Table; | |||
import com.vaadin.ui.Table.ColumnHeaderMode; | |||
public class HeaderUpdateWhenNoRows extends TestBase { | |||
public class HeaderUpdateWhenNoRows extends AbstractTestUI { | |||
@Override | |||
protected void setup() { | |||
protected void setup(VaadinRequest request) { | |||
final Table table = new Table("Test table"); | |||
table.addContainerProperty("Name", String.class, null, "Name", null, | |||
null); | |||
@@ -18,14 +20,14 @@ public class HeaderUpdateWhenNoRows extends TestBase { | |||
table.setImmediate(true); | |||
final CheckBox showHeaders = new CheckBox("Show headers"); | |||
showHeaders.addListener(new ValueChangeListener() { | |||
showHeaders.addValueChangeListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
if (showHeaders.getValue()) { | |||
table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID); | |||
table.setColumnHeaderMode(ColumnHeaderMode.EXPLICIT_DEFAULTS_ID); | |||
} else { | |||
table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); | |||
table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN); | |||
} | |||
} | |||
}); | |||
@@ -38,7 +40,7 @@ public class HeaderUpdateWhenNoRows extends TestBase { | |||
} | |||
@Override | |||
protected String getDescription() { | |||
public String getDescription() { | |||
return "The header should be updated when toggling column header mode"; | |||
} | |||
@@ -0,0 +1,54 @@ | |||
/* | |||
* 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.table; | |||
import java.io.IOException; | |||
import org.junit.Test; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.elements.CheckBoxElement; | |||
import com.vaadin.testbench.elements.TableElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class HeaderUpdateWhenNoRowsTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
TableElement table = $(TableElement.class).first(); | |||
TestBenchElement header0 = table.getHeaderCell(0); | |||
header0.click(); | |||
compareScreen("headerVisible"); | |||
$(CheckBoxElement.class).first().click(); | |||
compareScreen("headerHidden"); | |||
$(CheckBoxElement.class).first().click(); | |||
compareScreen("headerVisible2"); | |||
} | |||
} |
@@ -1,19 +1,20 @@ | |||
package com.vaadin.tests.components.table; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.Button; | |||
import com.vaadin.ui.Button.ClickEvent; | |||
import com.vaadin.ui.Button.ClickListener; | |||
import com.vaadin.ui.Table; | |||
public class TableVisibleColumnsUpdate extends TestBase { | |||
public class TableVisibleColumnsUpdate extends AbstractTestUI { | |||
private String[] cols1 = new String[] { "p1", "p2", "p3" }; | |||
private String[] cols2 = new String[] { "p1", "p4", "p3" }; | |||
private Table table; | |||
@Override | |||
protected String getDescription() { | |||
public String getDescription() { | |||
return "Columns should change between p1,p2,p3 and p1,p4,p3"; | |||
} | |||
@@ -23,7 +24,7 @@ public class TableVisibleColumnsUpdate extends TestBase { | |||
} | |||
@Override | |||
protected void setup() { | |||
protected void setup(VaadinRequest request) { | |||
table = new Table(); | |||
table.setWidth("400px"); | |||
table.setHeight("100px"); |
@@ -0,0 +1,52 @@ | |||
/* | |||
* 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.table; | |||
import java.io.IOException; | |||
import org.junit.Test; | |||
import com.vaadin.testbench.elements.ButtonElement; | |||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||
/** | |||
* Tests Table Footer ClickListener | |||
* | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
public class TableVisibleColumnsUpdateTest extends MultiBrowserTest { | |||
@Test | |||
public void testFooter() throws IOException { | |||
openTestURL(); | |||
compareScreen("first"); | |||
$(ButtonElement.class).first().click(); | |||
compareScreen("second"); | |||
$(ButtonElement.class).first().click(); | |||
compareScreen("first2"); | |||
$(ButtonElement.class).first().click(); | |||
compareScreen("second2"); | |||
} | |||
} |
@@ -1,226 +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>Footer</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">Footer</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.Footer?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]</td> | |||
<td>926,229</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>initial</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>Footer1</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td> | |||
<td>Footer2</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td> | |||
<td>Footer3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> | |||
<td>11,8</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>no-footer</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> | |||
<td>6,8</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>footer-col1-col2-col3-a</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>Footer1</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td> | |||
<td>Footer2</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td> | |||
<td>Footer3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[0]/domChild[1]</td> | |||
<td>9,10</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::Root/VContextMenu[0]#option1</td> | |||
<td>0,9</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>footer-col1-col3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[0]/domChild[1]</td> | |||
<td>12,13</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VContextMenu[0]#option1</td> | |||
<td>10,7</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>footer-col1-col2-col3-b</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>-45,13</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>fuu</td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>fuu</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>-61,2</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>bar</td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td> | |||
<td>bar</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>-21,9</td> | |||
</tr> | |||
<tr> | |||
<td>type</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>-18,9</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>Footer1</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>-56,-4</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>Footer2</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>124,17</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[0]/VTextField[0]</td> | |||
<td>Footer3</td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>footer-col1-col2-col3-c</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooter::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>Footer1</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,123 +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>FooterClick</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">FooterClick</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.FooterClick?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<!--Click on text in cell--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>41,7</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn</td> | |||
<td>col1</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> | |||
<td>1. Clicked on footer: col1</td> | |||
</tr> | |||
<!--Click on empty cell--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>69,12</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn</td> | |||
<td>col2</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> | |||
<td>2. Clicked on footer: col2</td> | |||
</tr> | |||
<!--Click on cell, not on text--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td>19,3</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn</td> | |||
<td>col3</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> | |||
<td>3. Clicked on footer: col3</td> | |||
</tr> | |||
<!--non-immediate--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> | |||
<td>30,9</td> | |||
</tr> | |||
<!--Click on text in cell--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> | |||
<td>41,7</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn</td> | |||
<td>col1</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> | |||
<td>4. Clicked on footer: col1</td> | |||
</tr> | |||
<!--Click on empty cell--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>69,12</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn</td> | |||
<td>col2</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> | |||
<td>5. Clicked on footer: col2</td> | |||
</tr> | |||
<!--Click on cell, not on text--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_Stable/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td>19,3</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SClickedColumn</td> | |||
<td>col3</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableFooterClick::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td> | |||
<td>6. Clicked on footer: col3</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,168 +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="http://localhost:8080/" /> | |||
<title>HeaderClick</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">HeaderClick</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.HeaderClick?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>37,11</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col1</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[1]</td> | |||
<td>36,9</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col2</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[1]</td> | |||
<td>8,11</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col3</td> | |||
</tr> | |||
<!--non-immediate test--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> | |||
<td>6,7</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>31,9</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col1</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[1]</td> | |||
<td>16,10</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col2</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[1]</td> | |||
<td>16,10</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td> | |||
<td>7,8</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>64,10</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col1</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[1]</td> | |||
<td>48,10</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col2</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[1]</td> | |||
<td>30,11</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VCheckBox[0]/domChild[0]</td> | |||
<td>7,8</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>48,11</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col1</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[1]</td> | |||
<td>71,10</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col2</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[1]</td> | |||
<td>39,5</td> | |||
</tr> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VCheckBox[0]/domChild[0]</td> | |||
<td>54,6</td> | |||
</tr> | |||
<!--Column reordering should not fire header click--> | |||
<tr> | |||
<td>assertValue</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VTextField[0]</td> | |||
<td>col3</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,92 +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>New Test</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">New Test</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.HeaderFooterClickLeftRightMiddle?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td>59,8</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::PID_SLog_row_0</td> | |||
<td>1. Click on header col1 using left</td> | |||
</tr> | |||
<tr> | |||
<td>mouseDownRight</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseUpRight</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::PID_SLog_row_0</td> | |||
<td>2. Click on header col1 using right</td> | |||
</tr> | |||
<tr> | |||
<td>doubleClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::PID_SLog_row_0</td> | |||
<td>3. Double click on header col1 using*</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td>59,8</td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::PID_SLog_row_0</td> | |||
<td>4. Click on footer col2 using left</td> | |||
</tr> | |||
<tr> | |||
<td>mouseDownRight</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseUpRight</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::PID_SLog_row_0</td> | |||
<td>5. Click on footer col2 using right</td> | |||
</tr> | |||
<tr> | |||
<td>doubleClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[5]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>assertText</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderFooterClickLeftRightMiddle::PID_SLog_row_0</td> | |||
<td>6. Double click on footer col2 using*</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,62 +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>New Test</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">New Test</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.TableAndBrowserContextMenu?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableAndBrowserContextMenu::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[2]</td> | |||
<td>32,4</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>sort-asc-died-at-age</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableAndBrowserContextMenu::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[2]</td> | |||
<td>32,4</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>sort-desc-died-at-age</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableAndBrowserContextMenu::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td>19,15</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>sort-asc-name</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableAndBrowserContextMenu::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td> | |||
<td>19,15</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>sort-desc-name</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,127 +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>New Test</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">New Test</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.Tables?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<!--hide log--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item1</td> | |||
<td>39,10</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item0</td> | |||
<td>23,9</td> | |||
</tr> | |||
<!--width: 100%--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item0</td> | |||
<td>35,9</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item2</td> | |||
<td>54,7</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[1]/VMenuBar[0]#item0</td> | |||
<td>21,5</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[2]/VMenuBar[0]#item2</td> | |||
<td>44,4</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>100pct-no-scrollbar</td> | |||
</tr> | |||
<!--parent width: 300px--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item1</td> | |||
<td>22,11</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item2</td> | |||
<td>48,5</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[1]/VMenuBar[0]#item0</td> | |||
<td>7,3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[2]/VMenuBar[0]#item6</td> | |||
<td>43,7</td> | |||
</tr> | |||
<!--scroll right--> | |||
<tr> | |||
<td>pause</td> | |||
<td>300</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>scrollLeft</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]</td> | |||
<td>200</td> | |||
</tr> | |||
<tr> | |||
<td>pause</td> | |||
<td>300</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>300px-scrolled-right</td> | |||
</tr> | |||
<!--parent width: 100%--> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item1</td> | |||
<td>22,11</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item2</td> | |||
<td>48,5</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[1]/VMenuBar[0]#item0</td> | |||
<td>7,3</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[2]/VMenuBar[0]#item2</td> | |||
<td>43,7</td> | |||
</tr> | |||
<!-- Should really be the same image as before, avoiding constant IE fails using a different image (#6147)--> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>100pct-no-scrollbar-2</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,47 +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>New Test</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">New Test</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.HeaderUpdateWhenNoRows</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>headerVisible</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderUpdateWhenNoRows::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> | |||
<td>5,4</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>headerHidden</td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentstableHeaderUpdateWhenNoRows::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> | |||
<td>9,7</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>headerVisibleAgain</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -1,77 +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>TableVisibleColumnsUpdate</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">TableVisibleColumnsUpdate</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.table.TableVisibleColumnsUpdate</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>waitForVaadin</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>1</td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableVisibleColumnsUpdate::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>waitForVaadin</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>2</td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableVisibleColumnsUpdate::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>waitForVaadin</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>1</td> | |||
</tr> | |||
<tr> | |||
<td>click</td> | |||
<td>vaadin=runcomvaadintestscomponentstableTableVisibleColumnsUpdate::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>waitForVaadin</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>2</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |