You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2019/01/24 14:45:51 UTC

[myfaces] 03/04: MYFACES-4265: finalizing the first table tests

This is an automated email from the ASF dual-hosted git repository.

werpu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git

commit e5f3a7ee4500ac005517a397079c124b3d81b1bf
Author: Werner Punz <we...@gmail.com>
AuthorDate: Thu Jan 24 15:43:08 2019 +0100

    MYFACES-4265: finalizing the first table tests
---
 .../integrationtests/ajax/IntegrationTest.java     | 45 +++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/integration-tests/ajax/src/test/java/org/apache/myfaces/core/integrationtests/ajax/IntegrationTest.java b/integration-tests/ajax/src/test/java/org/apache/myfaces/core/integrationtests/ajax/IntegrationTest.java
index e094ef3..6edebe6 100644
--- a/integration-tests/ajax/src/test/java/org/apache/myfaces/core/integrationtests/ajax/IntegrationTest.java
+++ b/integration-tests/ajax/src/test/java/org/apache/myfaces/core/integrationtests/ajax/IntegrationTest.java
@@ -208,7 +208,6 @@ public class IntegrationTest {
 
         trigger("replace_body", webDriver -> {
             final WebElement tableSegment = webDriver.findElement(new By.ById("body_row1_col1"));
-            System.out.println(tableSegment.getText());
             return tableSegment.getText().contains("column1 in line1 replaced") &&
                     tableSegment.getText().contains("script evaled");
         });
@@ -237,6 +236,50 @@ public class IntegrationTest {
                     bodyRowCol2.getText().contains("colum2 in line1 replaced");
         });
 
+        trigger("insert_column_head", webDriver -> {
+            final WebElement headCol0 = webDriver.findElement(new By.ById("head_col1_1_4"));
+            final WebElement headCol1 = webDriver.findElement(new By.ById("head_col1_1_5"));
+            final WebElement headCol2 = webDriver.findElement(new By.ById("head_col1"));
+            final WebElement headCol3 = webDriver.findElement(new By.ById("head_col2"));
+            final WebElement headCol4 = webDriver.findElement(new By.ById("head_col1_1_6"));
+            final WebElement headCol5 = webDriver.findElement(new By.ById("head_col1_1_7"));
+
+            return headCol0.getLocation().x < headCol1.getLocation().x &&
+                   headCol1.getLocation().x < headCol2.getLocation().x &&
+                   headCol3.getLocation().x < headCol4.getLocation().x &&
+                   headCol4.getLocation().x < headCol5.getLocation().x &&
+                   headCol1.getLocation().y == headCol2.getLocation().y &&
+                   headCol2.getLocation().y == headCol3.getLocation().y &&
+                   headCol3.getLocation().y == headCol4.getLocation().y &&
+                   headCol4.getLocation().y == headCol5.getLocation().y;
+
+        });
+
+
+        trigger("insert_column_body", webDriver -> {
+            final WebElement bodyCol0 = webDriver.findElement(new By.ById("body_row1_col1_1_8"));
+            final WebElement bodyCol1 = webDriver.findElement(new By.ById("body_row1_col1_1_9"));
+            final WebElement bodyCol2 = webDriver.findElement(new By.ById("body_row1_col1"));
+            final WebElement bodyCol3 = webDriver.findElement(new By.ById("body_row1_col2"));
+            final WebElement bodyCol4 = webDriver.findElement(new By.ById("body_row1_col1_1_10"));
+            final WebElement bodyCol5 = webDriver.findElement(new By.ById("body_row1_col1_1_11"));
+
+            return bodyCol0.getLocation().x < bodyCol1.getLocation().x &&
+                    bodyCol1.getLocation().x < bodyCol2.getLocation().x &&
+                    bodyCol3.getLocation().x < bodyCol4.getLocation().x &&
+                    bodyCol4.getLocation().x < bodyCol5.getLocation().x &&
+                    bodyCol1.getLocation().y == bodyCol2.getLocation().y &&
+                    bodyCol2.getLocation().y == bodyCol3.getLocation().y &&
+                    bodyCol3.getLocation().y == bodyCol4.getLocation().y &&
+                    bodyCol4.getLocation().y == bodyCol5.getLocation().y;
+
+        });
+
+        trigger("insert_body", webDriver -> {
+            return webDriver.getPageSource().contains("<tbody>") &&
+                    webDriver.getPageSource().contains("second body added");
+        });
+
     }