aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2020-12-07 09:34:04 +0200
committerGitHub <noreply@github.com>2020-12-07 09:34:04 +0200
commit02322d16110206ffb3cf249d1fd5a44f2aa80bd5 (patch)
treeb8e1fc8b6990c1c4883a07cac2dd9e95d915b8dc /uitest
parent2df0e1b1cae4e930989abf09906d612add4dd0fd (diff)
downloadvaadin-framework-02322d16110206ffb3cf249d1fd5a44f2aa80bd5.tar.gz
vaadin-framework-02322d16110206ffb3cf249d1fd5a44f2aa80bd5.zip
Test tweaks (#12169)
* Test tweaks - Divided HeaderFooterClickLeftRightMiddleTest tests to separate methods based on click type - Updated screenshot
Diffstat (limited to 'uitest')
-rwxr-xr-xuitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.pngbin18463 -> 18468 bytes
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java45
2 files changed, 31 insertions, 14 deletions
diff --git a/uitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.png b/uitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.png
index 9071cf2cee..383f50d008 100755
--- a/uitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.png
+++ b/uitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.png
Binary files differ
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java
index 1d7d440b2d..c449c68d88 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java
@@ -16,10 +16,11 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
*
* @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"));
@@ -29,25 +30,41 @@ public class HeaderFooterClickLeftRightMiddleTest extends MultiBrowserTest {
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) {