 ~~ 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.

 ------
 Howto create tests for Tobago Demo 3.0 or higher
 ------

Howto create QUnit tests for Tobago Demo 3.0 or higher

  [[1]] Choose a \<sample\>.xhtml file for testing.

  [[2]] Create a \<sample\>.test.js file (with same name).

  [[3]] Add a {{{http://api.qunitjs.com/QUnit.test/}QUnit test}} to the \<sample\>.test.js.

+----------------------------------------
  QUnit.test("Testtitle", function(assert) {
    ...
  });
+----------------------------------------

    [[a]] The test will run in a different frame.
    To get an element in the test frame use <<<jQueryFrame()>>> instead of <<<jQuery()>>>.

    [[b]] To wait for a submit use <<<jQuery("#page\\:testframe").load()>>>.

    [[c]] To wait for an AJAX event use <<<waitForAjax(waitingDone, executeWhenDone)>>>.
    The function <<<waitingDone>>> must return false if still waiting and true if the waiting is done.
    The function <<<executeWhenDone>>> is executed afterwards.

  [[4]] Add the test to QUnitTests.

+----------------------------------------
  @Test
  public void testname() throws UnsupportedEncodingException, InterruptedException {
    String page = "content/.../testname.xhtml";
    runStandardTest(page);
  }
+----------------------------------------

  [[5]] Run the tests from QUnitTests or type

+----------------------------------------
  mvn verify -Pqunit-integration-tests
+----------------------------------------
