myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1760932 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src: main/webapp/content/20-component/060-popup/ main/webapp/content/40-test/4000-button+link/ test/java/org/apache/myfaces/tobago/example/demo/
Date Thu, 15 Sep 2016 14:00:08 GMT
Author: lofwyr
Date: Thu Sep 15 14:00:08 2016
New Revision: 1760932

URL: http://svn.apache.org/viewvc?rev=1760932&view=rev
Log:
TOBAGO 1544: Demo
 * Tests for button+link improved
 * NullPointerException in QUNitTests fixed
 * Tests for popup.xhtml fixed
[developed by hnoeth]

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.html
      - copied, changed from r1760930, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml
Removed:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml
Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.test.js
    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/webapp/content/20-component/060-popup/popup.test.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.test.js?rev=1760932&r1=1760931&r2=1760932&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.test.js
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/060-popup/popup.test.js
Thu Sep 15 14:00:08 2016
@@ -15,19 +15,19 @@
  * limitations under the License.
  */
 
-QUnit.test("Open 'Simple Popup' and press 'Cancel'.", function (assert) {
+QUnit.test("Open 'Simple Popup' and press 'Cancel'.", function(assert) {
   assert.expect(3);
   var done = assert.async(2);
   var step = 1;
 
   var $popup = jQueryFrame("#page\\:mainForm\\:form1\\:popup input");
   var $openButton = jQueryFrame("#page\\:mainForm\\:form1\\:openPopup");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel1");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     if (step == 1) {
       $popup = jQueryFrame($popup.selector);
       assert.equal($popup.attr("value"), "false");
@@ -46,7 +46,7 @@ QUnit.test("Open 'Simple Popup' and pres
   });
 });
 
-QUnit.test("Open 'Simple Popup', press 'Submit' while field is empty. Press 'Cancel'.", function
(assert) {
+QUnit.test("Open 'Simple Popup', press 'Submit' while field is empty. Press 'Cancel'.", function(assert)
{
   assert.expect(5);
   var done = assert.async(3);
   var step = 1;
@@ -55,14 +55,14 @@ QUnit.test("Open 'Simple Popup', press '
   var $openButton = jQueryFrame("#page\\:mainForm\\:form1\\:openPopup");
   var $output = jQueryFrame("#page\\:mainForm\\:form1\\:output span");
   var outputValue = $output.text();
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in\\:\\:field");
-  var $submitButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submit");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in1\\:\\:field");
+  var $submitButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submit1");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel1");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     if (step == 1) {
       $popup = jQueryFrame($popup.selector);
       $inputField = jQueryFrame($inputField.selector);
@@ -95,7 +95,7 @@ QUnit.test("Open 'Simple Popup', press '
   });
 });
 
-QUnit.test("Open 'Simple Popup', press 'Submit' while field has content. Press 'Cancel'.",
function (assert) {
+QUnit.test("Open 'Simple Popup', press 'Submit' while field has content. Press 'Cancel'.",
function(assert) {
   assert.expect(5);
   var done = assert.async(3);
   var step = 1;
@@ -103,14 +103,14 @@ QUnit.test("Open 'Simple Popup', press '
   var $popup = jQueryFrame("#page\\:mainForm\\:form1\\:popup input");
   var $openButton = jQueryFrame("#page\\:mainForm\\:form1\\:openPopup");
   var $output = jQueryFrame("#page\\:mainForm\\:form1\\:output span");
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in\\:\\:field");
-  var $submitButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submit");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in1\\:\\:field");
+  var $submitButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submit1");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel1");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     if (step == 1) {
       $popup = jQueryFrame($popup.selector);
       $inputField = jQueryFrame($inputField.selector);
@@ -143,7 +143,7 @@ QUnit.test("Open 'Simple Popup', press '
   });
 });
 
-QUnit.test("Open 'Simple Popup', press 'Submit & Close' while field is empty. Press 'Cancel'.",
function (assert) {
+QUnit.test("Open 'Simple Popup', press 'Submit & Close' while field is empty. Press 'Cancel'.",
function(assert) {
   assert.expect(5);
   var done = assert.async(3);
   var step = 1;
@@ -152,14 +152,14 @@ QUnit.test("Open 'Simple Popup', press '
   var $openButton = jQueryFrame("#page\\:mainForm\\:form1\\:openPopup");
   var $output = jQueryFrame("#page\\:mainForm\\:form1\\:output span");
   var outputValue = $output.text();
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in\\:\\:field");
-  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submitClose");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in1\\:\\:field");
+  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submitClose1");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel1");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     if (step == 1) {
       $popup = jQueryFrame($popup.selector);
       $inputField = jQueryFrame($inputField.selector);
@@ -192,7 +192,7 @@ QUnit.test("Open 'Simple Popup', press '
   });
 });
 
-QUnit.test("Open 'Simple Popup', press 'Submit & Close' while field has content.", function
(assert) {
+QUnit.test("Open 'Simple Popup', press 'Submit & Close' while field has content.", function(assert)
{
   assert.expect(4);
   var done = assert.async(2);
   var step = 1;
@@ -200,14 +200,14 @@ QUnit.test("Open 'Simple Popup', press '
   var $popup = jQueryFrame("#page\\:mainForm\\:form1\\:popup input");
   var $openButton = jQueryFrame("#page\\:mainForm\\:form1\\:openPopup");
   var $output = jQueryFrame("#page\\:mainForm\\:form1\\:output span");
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in\\:\\:field");
-  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submitClose");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:in1\\:\\:field");
+  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:submitClose1");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form1\\:popup\\:cancel1");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     if (step == 1) {
       $popup = jQueryFrame($popup.selector);
       $inputField = jQueryFrame($inputField.selector);
@@ -231,13 +231,13 @@ QUnit.test("Open 'Simple Popup', press '
   });
 });
 
-QUnit.test("Open 'Client Popup' and press 'Cancel'.", function (assert) {
+QUnit.test("Open 'Client Popup' and press 'Cancel'.", function(assert) {
   assert.expect(3);
   var step = 1;
 
   var $popup = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup input");
   var $openButton = jQueryFrame("#page\\:mainForm\\:form2\\:open");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:cancel");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:cancel2");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
@@ -246,7 +246,7 @@ QUnit.test("Open 'Client Popup' and pres
   assert.equal($popup.attr("value"), "true");
 });
 
-QUnit.test("Open 'Client Popup', press 'Submit' while field is empty. Press 'Cancel'.", function
(assert) {
+QUnit.test("Open 'Client Popup', press 'Submit' while field is empty. Press 'Cancel'.", function(assert)
{
   assert.expect(5);
   var done = assert.async(1);
 
@@ -255,9 +255,9 @@ QUnit.test("Open 'Client Popup', press '
   var $output = jQueryFrame("#page\\:mainForm\\:form2\\:output span");
   var outputValue = $output.text();
   var $messages = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:messages");
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in\\:\\:field");
-  var $submitButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submit");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:cancel");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in2\\:\\:field");
+  var $submitButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submit2");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:cancel2");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
@@ -265,10 +265,10 @@ QUnit.test("Open 'Client Popup', press '
   $inputField.val("");
   $submitButton.click();
 
-  waitForAjax(function () {
+  waitForAjax(function() {
     $messages = jQueryFrame($messages.selector);
     return $messages.length == 1;
-  }, function () {
+  }, function() {
     $output = jQueryFrame($output.selector);
     $messages = jQueryFrame($messages.selector);
     $cancelButton = jQueryFrame($cancelButton.selector);
@@ -282,7 +282,7 @@ QUnit.test("Open 'Client Popup', press '
   });
 });
 
-QUnit.test("Open 'Client Popup', press 'Submit' while field has content. Press 'Cancel'.",
function (assert) {
+QUnit.test("Open 'Client Popup', press 'Submit' while field has content. Press 'Cancel'.",
function(assert) {
   assert.expect(5);
   var done = assert.async(1);
 
@@ -290,9 +290,9 @@ QUnit.test("Open 'Client Popup', press '
   var $openButton = jQueryFrame("#page\\:mainForm\\:form2\\:open");
   var $output = jQueryFrame("#page\\:mainForm\\:form2\\:out span");
   var $messages = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:messages");
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in\\:\\:field");
-  var $submitButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submit");
-  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:cancel");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in2\\:\\:field");
+  var $submitButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submit2");
+  var $cancelButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:cancel2");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
@@ -300,10 +300,10 @@ QUnit.test("Open 'Client Popup', press '
   $inputField.val("test client popup - submit button");
   $submitButton.click();
 
-  waitForAjax(function () {
+  waitForAjax(function() {
     $messages = jQueryFrame($messages.selector);
     return $messages.length == 0;
-  }, function () {
+  }, function() {
     $output = jQueryFrame($output.selector);
     $messages = jQueryFrame($messages.selector);
     $cancelButton = jQueryFrame($cancelButton.selector);
@@ -317,7 +317,7 @@ QUnit.test("Open 'Client Popup', press '
   });
 });
 
-QUnit.test("Open 'Client Popup', press 'Submit & Close' while field is empty.", function
(assert) {
+QUnit.test("Open 'Client Popup', press 'Submit & Close' while field is empty.", function(assert)
{
   assert.expect(4);
   var done = assert.async(1);
 
@@ -325,8 +325,8 @@ QUnit.test("Open 'Client Popup', press '
   var $openButton = jQueryFrame("#page\\:mainForm\\:form2\\:open");
   var $output = jQueryFrame("#page\\:mainForm\\:form2\\:output span");
   var outputValue = $output.text();
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in\\:\\:field");
-  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submitClose");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in2\\:\\:field");
+  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submitClose2");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
@@ -334,7 +334,7 @@ QUnit.test("Open 'Client Popup', press '
   $inputField.val("");
   $submitCloseButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     $popup = jQueryFrame($popup.selector);
     $output = jQueryFrame($output.selector);
 
@@ -345,15 +345,15 @@ QUnit.test("Open 'Client Popup', press '
   });
 });
 
-QUnit.test("Open 'Simple Popup', press 'Submit & Close' while field has content.", function
(assert) {
+QUnit.test("Open 'Simple Popup', press 'Submit & Close' while field has content.", function(assert)
{
   assert.expect(4);
   var done = assert.async(1);
 
   var $popup = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup input");
   var $openButton = jQueryFrame("#page\\:mainForm\\:form2\\:open");
   var $output = jQueryFrame("#page\\:mainForm\\:form2\\:out span");
-  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in\\:\\:field");
-  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submitClose");
+  var $inputField = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:in2\\:\\:field");
+  var $submitCloseButton = jQueryFrame("#page\\:mainForm\\:form2\\:clientPopup\\:submitClose2");
 
   assert.equal($popup.attr("value"), "true");
   $openButton.click();
@@ -361,7 +361,7 @@ QUnit.test("Open 'Simple Popup', press '
   $inputField.val("test client popup - submit and close button");
   $submitCloseButton.click();
 
-  jQuery("#page\\:testframe").load(function () {
+  jQuery("#page\\:testframe").load(function() {
     $popup = jQueryFrame($popup.selector);
     $output = jQueryFrame($output.selector);
 

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=1760932&r1=1760931&r2=1760932&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
Thu Sep 15 14:00:08 2016
@@ -33,7 +33,8 @@ QUnit.test("Standard Link Button", funct
   testStandardCommands($command, $destinationSection, assert, done);
 });
 
-/*QUnit.test("Standard Resource Button", function(assert) {
+/* PhantomJs don't work with 'resource' attribute. The value for 'href' leads to an nonexisting
site.
+QUnit.test("Standard Resource Button", function(assert) {
   assert.expect(2);
   var done = assert.async(2);
 
@@ -60,7 +61,8 @@ QUnit.test("Standard Link Link", functio
   testStandardCommands($command, $destinationSection, assert, done);
 });
 
-/*QUnit.test("Standard Resource Link", function(assert) {
+/* PhantomJs don't work with 'resource' attribute. The value for 'href' leads to an nonexisting
site.
+QUnit.test("Standard Resource Link", function(assert) {
   assert.expect(2);
   var done = assert.async(2);
 
@@ -91,7 +93,79 @@ function testStandardCommands($command,
 
 // TODO: Test Confirmation: Mock Alerts with sinon
 
+QUnit.test("Target Action Button", function(assert) {
+  assert.expect(1);
+  var done = assert.async();
+
+  var $command = jQueryFrame("#page\\:mainForm\\:targetButtonAction");
+  var $destinationSection = jQueryTargetFrame("#page\\:actionSection");
+  testTargetCommands($command, $destinationSection, assert, done);
+});
+
+QUnit.test("Target Link Button", function(assert) {
+  assert.expect(1);
+  var done = assert.async();
+
+  var $command = jQueryFrame("#page\\:mainForm\\:targetButtonLink");
+  var $destinationSection = jQueryTargetFrame("#page\\:linkSection");
+  testTargetCommands($command, $destinationSection, assert, done);
+});
+
+/* PhantomJs don't work with 'resource' attribute. The value for 'href' leads to an nonexisting
site.
+QUnit.test("Target Resource Button", function(assert) {
+  assert.expect(1);
+  var done = assert.async();
+
+  var $command = jQueryFrame("#page\\:mainForm\\:targetButtonResource");
+  var $destinationSection = jQueryTargetFrame("#page\\:resourceSection");
+  testTargetCommands($command, $destinationSection, assert, done);
+});*/
+
+QUnit.test("Target Action Link", function(assert) {
+  assert.expect(1);
+  var done = assert.async();
+
+  var $command = jQueryFrame("#page\\:mainForm\\:targetLinkAction");
+  var $destinationSection = jQueryTargetFrame("#page\\:actionSection");
+  testTargetCommands($command, $destinationSection, assert, done);
+});
+
+QUnit.test("Target Link Link", function(assert) {
+  assert.expect(1);
+  var done = assert.async();
+
+  var $command = jQueryFrame("#page\\:mainForm\\:targetLinkLink");
+  var $destinationSection = jQueryTargetFrame("#page\\:linkSection");
+  testTargetCommands($command, $destinationSection, assert, done);
+});
+
+/* PhantomJs don't work with 'resource' attribute. The value for 'href' leads to an nonexisting
site.
+QUnit.test("Target Resource Link", function(assert) {
+  assert.expect(1);
+  var done = assert.async();
+
+  var $command = jQueryFrame("#page\\:mainForm\\:targetLinkResource");
+  var $destinationSection = jQueryTargetFrame("#page\\:resourceSection");
+  testTargetCommands($command, $destinationSection, assert, done);
+});*/
+
+function testTargetCommands($command, $destinationSection, assert, done) {
+  $command[0].click();
+
+  /*
+   * phantomJs don't recognize jQueryFrame("#page\\:mainForm\\:targetFrame").load(),
+   * so the waitForAjax() method is used instead.
+   */
+  waitForAjax(function() {
+    $destinationSection = jQueryTargetFrame($destinationSection.selector);
+    return $destinationSection.length == 1;
+  }, function() {
+    $destinationSection = jQueryTargetFrame($destinationSection.selector);
+    assert.equal($destinationSection.length, 1);
+    done();
+  });
+}
 
 function jQueryTargetFrame(expression) {
-  return document.getElementById("page:testframe").contentWindow.jQuery(expression);
+  return jQueryFrame("#page\\:mainForm\\:targetFrame").contents().find(expression);
 }

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=1760932&r1=1760931&r2=1760932&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
Thu Sep 15 14:00:08 2016
@@ -27,12 +27,12 @@
       <tc:button id="standardButtonAction" label="Action" action="#{buttonLinkController.actionPage}"/>
       <tc:button id="standardButtonLink" label="Link" link="x-link.xhtml"/>
       <tc:button id="standardButtonResource" label="Resource"
-                 resource="content/40-test/4000-button+link/x-resource.xhtml"/>
+                 resource="content/40-test/4000-button+link/x-resource.html"/>
     </tc:buttons>
     <tc:commands>
       <tc:link id="standardLinkAction" label="Action" action="#{buttonLinkController.actionPage}"/>
       <tc:link id="standardLinkLink" label="Link" link="x-link.xhtml"/>
-      <tc:link id="standardLinkResource" label="Resource" resource="content/40-test/4000-button+link/x-resource.xhtml"/>
+      <tc:link id="standardLinkResource" label="Resource" resource="content/40-test/4000-button+link/x-resource.html"/>
     </tc:commands>
     <br/>
     <br/>
@@ -40,40 +40,21 @@
 
   <tc:section label="Confirmation">
     <tc:buttons>
-      <tc:button id="confirmationButtonAction" label="Action" action="#{buttonLinkController.actionPage}">
-        <f:facet name="confirmation">
-          <tc:out value="Are you sure?"/>
-        </f:facet>
-      </tc:button>
-      <tc:button id="confirmationButtonLink" label="Link" link="x-link.xhtml">
-        <f:facet name="confirmation">
-          <tc:out value="Are you sure?"/>
-        </f:facet>
-      </tc:button>
+      <tc:button id="confirmationButtonAction" label="Action" action="#{buttonLinkController.actionPage}"
+                 confirmation="Are you sure?"/>
+      <tc:button id="confirmationButtonLink" label="Link" link="x-link.xhtml" confirmation="Are
you sure?"/>
       <tc:button id="confirmationButtonResource" label="Resource"
-                 resource="faces/content/40-test/4000-button+link/x-resource.xhtml">
-        <f:facet name="confirmation">
-          <tc:out value="Are you sure?"/>
-        </f:facet>
-      </tc:button>
+                 resource="faces/content/40-test/4000-button+link/x-resource.html"
+                 confirmation="Are you sure?"/>
     </tc:buttons>
     <tc:commands>
-      <tc:link id="confirmationLinkAction" label="Action" action="#{buttonLinkController.actionPage}">
-        <f:facet name="confirmation">
-          <tc:out value="Are you sure?"/>
-        </f:facet>
-      </tc:link>
-      <tc:link id="confirmationLinkLink" label="Link" link="x-link.xhtml">
-        <f:facet name="confirmation">
-          <tc:out value="Are you sure?"/>
-        </f:facet>
-      </tc:link>
+      <tc:link id="confirmationLinkAction" label="Action" action="#{buttonLinkController.actionPage}"
+               confirmation="Are you sure?"/>
+      <tc:link id="confirmationLinkLink" label="Link" link="x-link.xhtml"
+               confirmation="Are you sure?"/>
       <tc:link id="confirmationLinkResource" label="Resource"
-               resource="faces/content/40-test/4000-button+link/x-resource.xhtml">
-        <f:facet name="confirmation">
-          <tc:out value="Are you sure?"/>
-        </f:facet>
-      </tc:link>
+               resource="faces/content/40-test/4000-button+link/x-resource.html"
+               confirmation="Are you sure?"/>
     </tc:commands>
     <br/>
     <br/>
@@ -81,18 +62,18 @@
 
   <tc:section label="Target">
     <tc:buttons>
-      <tc:button id="targetButtonAction" label="Action" actions="#{buttonLinkController.actionPage}"
+      <tc:button id="targetButtonAction" label="Action" action="#{buttonLinkController.actionPage}"
                  target="targetFrame"/>
       <tc:button id="targetButtonLink" label="Link" link="x-link.xhtml" target="targetFrame"/>
       <tc:button id="targetButtonResource" label="Resource"
-                 resource="content/40-test/4000-button+link/x-resource.xhtml"
+                 resource="content/40-test/4000-button+link/x-resource.html"
                  target="targetFrame"/>
     </tc:buttons>
     <tc:commands>
       <tc:link id="targetLinkAction" label="Action" action="#{buttonLinkController.actionPage}"
target="targetFrame"/>
       <tc:link id="targetLinkLink" label="Link" link="x-link.xhtml" target="targetFrame"/>
       <tc:link id="targetLinkResource" label="Resource"
-               resource="content/40-test/4000-button+link/x-resource.xhtml"
+               resource="content/40-test/4000-button+link/x-resource.html"
                target="targetFrame"/>
     </tc:commands>
     <br/>

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.html
(from r1760930, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.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-resource.html?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/x-resource.html&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/x-resource.xhtml&r1=1760930&r2=1760932&rev=1760932&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.html
Thu Sep 15 14:00:08 2016
@@ -15,13 +15,15 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/plain.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
+<html>
+<head>
   <script src="/org/apache/myfaces/tobago/renderkit/html/standard/standard/jquery/jquery-2.2.4.js"
-          type="text/javascript"/>
-  <div id="page:mainForm:resourceSection">
-    <p>This page should be accessed by an link/button with <code>resource</code>
attribute.</p>
-    <a id="page:mainForm:back" href="/faces/content/40-test/4000-button+link/button+link.xhtml">Back</a>
-  </div>
-</ui:composition>
+          type="text/javascript"></script>
+</head>
+<body id="page">
+<div id="page:resourceSection">
+  <p>This page should be accessed by an link/button with <code>resource</code>
attribute.</p>
+  <a id="page:back" href="/faces/content/40-test/4000-button+link/button+link.xhtml">Back</a>
+</div>
+</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=1760932&r1=1760931&r2=1760932&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
Thu Sep 15 14:00:08 2016
@@ -116,9 +116,7 @@ public class QUnitTests {
             LOG.warn("test '" + testName + "' for " + page + " failed on assertion " + assertionCount
                 + "\n" + source.getText());
             String expected = assertion.findElement(By.className("test-expected")).getText();
-            expected = expected.substring(12, expected.length() - 1);
             String actual = assertion.findElement(By.className("test-actual")).getText();
-            actual = actual.substring(10, actual.length() - 1);
             Assert.assertEquals(expected, actual);
           }
         }



Mime
View raw message