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 2020/03/13 10:42:11 UTC
[myfaces] branch master updated: MYFACES-4322: fixing a small test
issue
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 6b6da7e MYFACES-4322: fixing a small test issue
6b6da7e is described below
commit 6b6da7e01cddb893a5dd5d23dd93f8f1847819f2
Author: Werner Punz <we...@gmail.com>
AuthorDate: Fri Mar 13 11:41:59 2020 +0100
MYFACES-4322: fixing a small test issue
---
.../ajax/test1Protocol/ResponseMockup.java | 23 +++++++++++-----------
.../ajax/src/main/webapp/test2-viewbody.xhtml | 4 ++--
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/integration-tests/ajax/src/main/java/org/apache/myfaces/core/integrationtests/ajax/test1Protocol/ResponseMockup.java b/integration-tests/ajax/src/main/java/org/apache/myfaces/core/integrationtests/ajax/test1Protocol/ResponseMockup.java
index d19356c..d0d5ca9 100644
--- a/integration-tests/ajax/src/main/java/org/apache/myfaces/core/integrationtests/ajax/test1Protocol/ResponseMockup.java
+++ b/integration-tests/ajax/src/main/java/org/apache/myfaces/core/integrationtests/ajax/test1Protocol/ResponseMockup.java
@@ -86,7 +86,7 @@ public class ResponseMockup extends HttpServlet {
throws ServletException, IOException {
//we simulate viewscoped here
- String origin = (String) request.getParameter("origin");
+ String origin = request.getParameter("origin");
origin = (origin != null) ? origin : "";
ViewData viewData = (ViewData) request.getSession().getAttribute(VIEW_DATA + origin);
@@ -98,11 +98,11 @@ public class ResponseMockup extends HttpServlet {
response.setContentType("text/xml;charset=UTF-8");
PrintWriter out = response.getWriter();
- String op = (String) request.getParameter("op");
+ String op = request.getParameter("op");
PartialResponse root = new PartialResponse();
- /**
+ /*
* field ids needed in form:
* changesArea
* deleteable
@@ -205,16 +205,15 @@ public class ResponseMockup extends HttpServlet {
//we omit our xml builder for now
StringBuilder replacement = new StringBuilder();
- replacement.append("<body class=\"tundra\"> " +
- " <div id=\"myfaces.logging\"><div id = \"centerDiv\">\n" +
- " <h1>Selenium Test for body change done</h1>\n");
- for (int cnt = 0; cnt < 300; viewData.cnt++) {
- replacement.append(" <div id = \"testResults" + cnt + "\" ></div>\n");
+ replacement.append("<body class=\"tundra\"> ");
+ replacement.append(" <div id=\"myfaces.logging\"><div id = \"centerDiv\">\n");
+ replacement.append(" <h1>Selenium Test for body change done</h1>\n");
+ for (int cnt = 0; cnt < 20; cnt++) {
+ replacement.append(" <div id = \"testResults" + cnt + "\"></div>\n");
}
- replacement.append(" <h3>Body replacement test successful</h3>\n" +
- // " <script type='text/javascript'>alert('hello from embedded script in replacement body');</script> </div>" +
- " </div>" +
- "</body>");
+ replacement.append(" <h3>Body replacement test successful</h3>\n");
+ replacement.append(" </div>");
+ replacement.append("</body>");
Changes changes = new Changes(root);
root.addElement(changes);
diff --git a/integration-tests/ajax/src/main/webapp/test2-viewbody.xhtml b/integration-tests/ajax/src/main/webapp/test2-viewbody.xhtml
index 1ea86cb..a43eb36 100644
--- a/integration-tests/ajax/src/main/webapp/test2-viewbody.xhtml
+++ b/integration-tests/ajax/src/main/webapp/test2-viewbody.xhtml
@@ -36,13 +36,13 @@
<div id="testResults">
- <h3>After triggering this test the entiere page should be replaced by the test result</h3>
+ <h3>After triggering this test the entire page should be replaced by the test result</h3>
</div>
<h:form id="form1" prependId="false">
<input type="button" id="cmd_body1" value="replace the entire body"
- onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'body');"/>
+ onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'body2');"/>
</h:form>
</div>
</h:body>