*
* @author Vaadin Ltd
*/
+@SuppressWarnings("deprecation")
public class HeaderFooterClickLeftRightMiddleTest extends MultiBrowserTest {
@Test
- public void testFooter() throws IOException {
+ public void testSingleClick() throws IOException {
openTestURL();
waitForElementPresent(By.className("v-table"));
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.getFooterCell(1).click();
+ assertAnyLogText("2. Click on footer col2 using left");
+ }
- table.getHeaderCell(0).doubleClick();
- assertAnyLogText("4. Double click on header col1 using left",
- "5. Double click on header col1 using left");
+ @Test
+ public void testContextClick() {
+ openTestURL();
- table.getFooterCell(1).click();
- assertAnyLogText("5. Click on footer col2 using left",
- "6. Click on footer col2 using left");
+ waitForElementPresent(By.className("v-table"));
+
+ TableElement table = $(TableElement.class).first();
+
+ table.getHeaderCell(0).contextClick();
+ assertAnyLogText("1. Click on header col1 using right");
table.getFooterCell(1).contextClick();
- assertAnyLogText("6. Click on footer col2 using right",
- "7. Click on footer col2 using right");
+ assertAnyLogText("2. Click on footer col2 using right");
+ }
+
+ @Test
+ public void testDoubleClick() {
+ openTestURL();
+
+ waitForElementPresent(By.className("v-table"));
+
+ TableElement table = $(TableElement.class).first();
+
+ table.getHeaderCell(0).doubleClick();
+ assertAnyLogText("2. Double click on header col1 using left",
+ "3. Double click on header col1 using left");
table.getFooterCell(1).doubleClick();
- assertAnyLogText("8. Double click on footer col2 using left",
- "9. Double click on footer col2 using left",
- "10. Double click on footer col2 using left");
+ assertAnyLogText("4. Double click on footer col2 using left",
+ "5. Double click on footer col2 using left",
+ "6. Double click on footer col2 using left");
}
private void assertAnyLogText(String... texts) {