myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject svn commit: r1803823 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src: main/java/org/apache/myfaces/tobago/example/demo/ main/webapp/content/40-test/4000-button+link/ test/java/org/apache/myfaces/tobago/example/demo/
Date Wed, 02 Aug 2017 14:21:33 GMT
Author: hnoeth
Date: Wed Aug  2 14:21:33 2017
New Revision: 1803823

URL: http://svn.apache.org/viewvc?rev=1803823&view=rev
Log:
TOBAGO-1752 DeltaSpike WindowId doesn't work correctly with Tobago
* tests for target attribute adjusted

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetAction.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetLink.xhtml
Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/QUnitTests.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java?rev=1803823&r1=1803822&r2=1803823&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java
Wed Aug  2 14:21:33 2017
@@ -36,7 +36,12 @@ public class ButtonLinkController implem
   }
 
   public String actionPage() {
-    LOG.info("link to components root");
+    LOG.info("link to action.xhtml");
     return "/content/40-test/4000-button+link/x-action.xhtml";
   }
+
+  public String targetActionPage() {
+    LOG.info("link to targetAction.xhtml");
+    return "/content/40-test/4000-button+link/x-targetAction.xhtml";
+  }
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/button%2Blink.test.js?rev=1803823&r1=1803822&r2=1803823&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
Wed Aug  2 14:21:33 2017
@@ -80,8 +80,8 @@ QUnit.test("Target Action Button", funct
   var done = assert.async();
 
   var $command = jQueryFrame("#page\\:mainForm\\:targetButtonAction");
-  var $destinationSection = jQueryTargetFrame("#page\\:actionSection");
-  testTargetCommands($command, $destinationSection, assert, done);
+  var $targetTextInput = jQueryTargetFrame("#textInput");
+  testTargetCommands($command, $targetTextInput, "accessed by action", assert, done);
 });
 
 QUnit.test("Target Link Button", function (assert) {
@@ -89,8 +89,8 @@ QUnit.test("Target Link Button", functio
   var done = assert.async();
 
   var $command = jQueryFrame("#page\\:mainForm\\:targetButtonLink");
-  var $destinationSection = jQueryTargetFrame("#page\\:linkSection");
-  testTargetCommands($command, $destinationSection, assert, done);
+  var $targetTextInput = jQueryTargetFrame("#textInput");
+  testTargetCommands($command, $targetTextInput, "accessed by link", assert, done);
 });
 
 QUnit.test("Target Action Link", function (assert) {
@@ -98,8 +98,8 @@ QUnit.test("Target Action Link", functio
   var done = assert.async();
 
   var $command = jQueryFrame("#page\\:mainForm\\:targetLinkAction");
-  var $destinationSection = jQueryTargetFrame("#page\\:actionSection");
-  testTargetCommands($command, $destinationSection, assert, done);
+  var $targetTextInput = jQueryTargetFrame("#textInput");
+  testTargetCommands($command, $targetTextInput, "accessed by action", assert, done);
 });
 
 QUnit.test("Target Link Link", function (assert) {
@@ -107,11 +107,11 @@ QUnit.test("Target Link Link", function
   var done = assert.async();
 
   var $command = jQueryFrame("#page\\:mainForm\\:targetLinkLink");
-  var $destinationSection = jQueryTargetFrame("#page\\:linkSection");
-  testTargetCommands($command, $destinationSection, assert, done);
+  var $targetTextInput = jQueryTargetFrame("#textInput");
+  testTargetCommands($command, $targetTextInput, "accessed by link", assert, done);
 });
 
-function testTargetCommands($command, $destinationSection, assert, done) {
+function testTargetCommands($command, $targetTextInput, expectedText, assert, done) {
   $command[0].click();
 
   /*
@@ -119,11 +119,11 @@ function testTargetCommands($command, $d
    * so the waitForAjax() method is used instead.
    */
   waitForAjax(function () {
-    $destinationSection = jQueryTargetFrame($destinationSection.selector);
-    return $destinationSection.length === 1;
+    $targetTextInput = jQueryTargetFrame($targetTextInput.selector);
+    return $targetTextInput.val() === expectedText;
   }, function () {
-    $destinationSection = jQueryTargetFrame($destinationSection.selector);
-    assert.equal($destinationSection.length, 1);
+    $targetTextInput = jQueryTargetFrame($targetTextInput.selector);
+    assert.equal($targetTextInput.val(), expectedText);
     done();
   });
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/button%2Blink.xhtml?rev=1803823&r1=1803822&r2=1803823&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
Wed Aug  2 14:21:33 2017
@@ -39,7 +39,8 @@
     <tc:buttons>
       <tc:button id="confirmationButtonAction" label="Action" action="#{buttonLinkController.actionPage}"
                  confirmation="Are you sure?"/>
-      <tc:button id="confirmationButtonLink" label="Link" outcome="/content/40-test/4000-button+link/x-link.xhtml"
confirmation="Are you sure?"/>
+      <tc:button id="confirmationButtonLink" label="Link" outcome="/content/40-test/4000-button+link/x-link.xhtml"
+                 confirmation="Are you sure?"/>
     </tc:buttons>
     <tc:links>
       <tc:link id="confirmationLinkAction" label="Action" action="#{buttonLinkController.actionPage}"
@@ -53,13 +54,16 @@
 
   <tc:section label="Target">
     <tc:buttons>
-      <tc:button id="targetButtonAction" label="Action" action="#{buttonLinkController.actionPage}"
+      <tc:button id="targetButtonAction" label="Action" action="#{buttonLinkController.targetActionPage}"
+                 target="targetFrame"/>
+      <tc:button id="targetButtonLink" label="Link" outcome="/content/40-test/4000-button+link/x-targetLink.html"
                  target="targetFrame"/>
-      <tc:button id="targetButtonLink" label="Link" outcome="/content/40-test/4000-button+link/x-link.xhtml"
target="targetFrame"/>
     </tc:buttons>
     <tc:links>
-      <tc:link id="targetLinkAction" label="Action" action="#{buttonLinkController.actionPage}"
target="targetFrame"/>
-      <tc:link id="targetLinkLink" label="Link" outcome="/content/40-test/4000-button+link/x-link.xhtml"
target="targetFrame"/>
+      <tc:link id="targetLinkAction" label="Action" action="#{buttonLinkController.targetActionPage}"
+               target="targetFrame"/>
+      <tc:link id="targetLinkLink" label="Link" outcome="/content/40-test/4000-button+link/x-targetLink.html"
+               target="targetFrame"/>
     </tc:links>
     <br/>
     <br/>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetAction.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/x-targetAction.xhtml?rev=1803823&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetAction.xhtml
(added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetAction.xhtml
Wed Aug  2 14:21:33 2017
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<!DOCTYPE html
+        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>TargetAction</title>
+</head>
+<body>
+<input id="textInput" value="accessed by action"/>
+</body>
+</html>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetLink.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/x-targetLink.xhtml?rev=1803823&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetLink.xhtml
(added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-targetLink.xhtml
Wed Aug  2 14:21:33 2017
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<!DOCTYPE html
+        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>TargetLink</title>
+</head>
+<body>
+<input id="textInput" value="accessed by link"/>
+</body>
+</html>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/QUnitTests.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/QUnitTests.java?rev=1803823&r1=1803822&r2=1803823&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/QUnitTests.java
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/QUnitTests.java
Wed Aug  2 14:21:33 2017
@@ -293,8 +293,6 @@ public class QUnitTests {
     List<String> ignore = new ArrayList<String>();
     //PhantomJs miscalculate the height of the dropdown box
     ignore.add("content/40-test/3000-sheet/10-sheet-types/sheet-types.xhtml");
-    // See https://issues.apache.org/jira/browse/TOBAGO-1752?focusedCommentId=16068289
-    ignore.add("content/40-test/4000-button+link/button+link.xhtml");
     // Works only for larger browser window
     ignore.add("content/40-test/4810-labelLayoutTop/labelLayoutTop.xhtml");
     //ajaxListener doesn't work for <tc:in> events: focus, blur, click, dblclick



Mime
View raw message