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/23 15:02:08 UTC

[myfaces] branch master updated: MYFACES-4265: last integration test for today

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


The following commit(s) were added to refs/heads/master by this push:
     new 534f255  MYFACES-4265: last integration test for today
534f255 is described below

commit 534f25579145bbf3a52344c5f1dd711a02ca84ac
Author: Werner Punz <we...@gmail.com>
AuthorDate: Wed Jan 23 15:59:27 2019 +0100

    MYFACES-4265: last integration test for today
---
 .../integrationtests/ajax/IntegrationTest.java     | 31 +++++++++++++++++++++-
 1 file changed, 30 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 fd368a0..c221e2d 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
@@ -193,10 +193,39 @@ public class IntegrationTest {
 
         trigger("replace_head", webDriver -> {
             final WebElement testTable = webDriver.findElement(new By.ById("testTable"));
-            System.out.println(testTable.getText());
+
             return testTable.getText().contains("column1 in line1 replaced") &&
                     testTable.getText().contains("script evaled0");
         });
+
+        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");
+        });
+
+        trigger("insert_row_head", webDriver -> {
+            final WebElement headRow0 = webDriver.findElement(new By.ById("head_row1_0"));
+            final WebElement headRow1 = webDriver.findElement(new By.ById("head_row1"));
+
+            return  headRow1.getLocation().y > headRow0.getLocation().y &&
+                    headRow0.getText().contains("column1 in line1 inserted before") &&
+                    headRow0.getText().contains("colum2 in line2 inserted before");
+        });
+
+
+        //TODO the content is correct but the numbers are dynamic, so we need to find
+        //a better way to identify the elements
+       /* trigger("insert_row_body", webDriver -> {
+            final WebElement headRow0 = webDriver.findElement(new By.ByClassName("body_row1_0"));
+            final WebElement headRow1 = webDriver.findElement(new By.ById("head_row1"));
+
+            return  headRow1.getLocation().y > headRow0.getLocation().y &&
+                    headRow0.getText().contains("column1 in line1 inserted before") &&
+                    headRow0.getText().contains("colum2 in line2 inserted before");
+        });*/
+
     }