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:50 UTC
[myfaces] 02/04: MYFACES-4265: next table subtest runs
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 b3b0660e1164acc0be7915132a5cd4e56b38521d
Author: Werner Punz <we...@gmail.com>
AuthorDate: Thu Jan 24 15:25:24 2019 +0100
MYFACES-4265: next table subtest runs
---
.../ajax/src/main/webapp/scripts/testhelpers.js | 4 +---
.../integrationtests/ajax/IntegrationTest.java | 23 ++++++++++++----------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/integration-tests/ajax/src/main/webapp/scripts/testhelpers.js b/integration-tests/ajax/src/main/webapp/scripts/testhelpers.js
index 57542fd..0a1e8ea 100644
--- a/integration-tests/ajax/src/main/webapp/scripts/testhelpers.js
+++ b/integration-tests/ajax/src/main/webapp/scripts/testhelpers.js
@@ -55,9 +55,7 @@ function emitPPR(source, event, action, formId, target, onError, onEvent) {
} catch (e) {
console.error(e);
} finally {
- //setTimeout(function() {
- document.getElementById(formId || "form1").action = oldAction;
- // d}, 100);
+ document.getElementById(formId || "form1").action = oldAction;
}
}
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 b30181c..e094ef3 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
@@ -223,16 +223,19 @@ public class IntegrationTest {
});
- //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");
- });*/
+ trigger("insert_row_body", webDriver -> {
+ final WebElement bodyRowCol1 = webDriver.findElement(new By.ById("body_row1_col1"));
+ final WebElement bodyRowCol2 = webDriver.findElement(new By.ById("body_row1_col2"));
+ final WebElement bodyRowCol0 = webDriver.findElement(new By.ById("body_row1_3_col1"));
+ final WebElement bodyRowCol4 = webDriver.findElement(new By.ById("body_row1_4_col1"));
+
+ return bodyRowCol0.getLocation().y < bodyRowCol1.getLocation().y &&
+ bodyRowCol1.getLocation().y < bodyRowCol4.getLocation().y &&
+
+ bodyRowCol1.getText().contains("column1 in line1 inserted after") &&
+ bodyRowCol1.getText().contains("evaled") &&
+ bodyRowCol2.getText().contains("colum2 in line1 replaced");
+ });
}