myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch master updated: migrate QUnit tests to Jasmine
Date Wed, 01 Apr 2020 12:42:32 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 2b54656  migrate QUnit tests to Jasmine
2b54656 is described below

commit 2b546566beb1b03b323b617b106fe50f41d3115a
Author: Jasmin Kroeger <jasmin.kroeger@irian.eu>
AuthorDate: Tue Mar 31 10:17:09 2020 +0200

    migrate QUnit tests to Jasmine
    
    * migrate tests
    * replace TobagoTestTool with JasmineUtils
    * add a isDocumentReady check to JasmineTestTool
    
    Issue: TOBAGO-2022
---
 .../src/main/webapp/content/10-intro/Intro.test.js |  19 +-
 .../040-command/20-buttons/Button_Group.test.js    |  18 +-
 .../20-component/050-container/10-box/Box.test.js  | 151 ++++-----
 .../050-container/40-section/Section.test.js       |  22 +-
 .../06-validation/00/Content_Validation.test.js    | 345 +++++++++------------
 .../30-concept/51-for-each/For_Each.test.js        |  69 ++---
 .../10-collapsible-popup/Collapsible_Popup.test.js |  41 +--
 .../1500-output/21-label-for/Label_For.test.js     |  61 ++--
 .../40-test/2500-tab/Tabgroup_Style.test.js        |  66 ++--
 .../40000-style/100-headings/Headings.test.js      | 104 +++----
 .../Grid_Layout_Label_Horizontal.test.js           | 154 +++++----
 .../Grid_Layout_Label_Vertical.test.js             |  28 +-
 .../RendererBase_GetCurrentValue.test.js           |  37 ++-
 .../Ajax_Special_Character.test.js                 |  32 +-
 .../9010-mode-valueIfSet/Mode_ValueIfSet.test.js   |  31 +-
 .../src/main/webapp/error/error.test.js            |  31 +-
 .../src/main/webapp/script/tobago-test.js          |  12 +
 .../resources/tobago/test/tobago-test-tool.js      |  91 +++---
 18 files changed, 597 insertions(+), 715 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/Intro.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/Intro.test.js
index 6d990c3..72a2a3d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/Intro.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/Intro.test.js
@@ -15,18 +15,13 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("First section title is 'Intro'", function (assert) {
-  assert.expect(1);
-  let titleOfFirstSectionHeader = testFrameQuerySelectorFn(".tobago-section-header > h1 > span");
-  assert.equal(titleOfFirstSectionHeader().textContent, "Intro");
-});
-
-describe("Intro", function () {
-  it("First section title is 'Intro'", function () {
-    let titleOfFirstSectionHeader = testFrameQuerySelectorFn(".tobago-section-header > h1 > span");
+it("First section title is 'Intro'", function (done) {
+  let titleOfFirstSectionHeader = querySelectorFn(".tobago-section-header > h1 > span");
 
-    expect(titleOfFirstSectionHeader().textContent).toEqual("Intro");
-  });
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(titleOfFirstSectionHeader().textContent).toEqual("Intro"));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-buttons/Button_Group.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-buttons/Button_Group.test.js
index f0cf784..f3cdc1c 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-buttons/Button_Group.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-buttons/Button_Group.test.js
@@ -15,17 +15,13 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Dropdown button has 'btn-group'", function (assert) {
-  let buttonFn = testFrameQuerySelectorFn("#page\\:mainForm\\:buttonWithLinks");
-  assert.ok(buttonFn().classList.contains("btn-group"), "id=buttonWithLinks must have 'btn-group'");
-});
-
-describe("Button group", function () {
-  it("Dropdown button has 'btn-group'", function () {
-    let buttonFn = testFrameQuerySelectorFn("#page\\:mainForm\\:buttonWithLinks");
+it("Dropdown button has 'btn-group'", function (done) {
+  let buttonFn = querySelectorFn("#page\\:mainForm\\:buttonWithLinks");
 
-    expect(buttonFn().classList.contains("btn-group")).toBe(true, "id=buttonWithLinks must have 'btn-group'");
-  });
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(buttonFn().classList.contains("btn-group")).toBe(true, "id=buttonWithLinks must have 'btn-group'"));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/Box.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/Box.test.js
index dcda4b5..562322d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/Box.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/Box.test.js
@@ -15,103 +15,72 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Accordion: Box 1: 'hide' to 'show' to 'hide'", function (assert) {
-  let boxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:accordionBox1");
-  let showBoxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:showBox1");
-  let hideBoxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:hideBox1");
-  let boxBodyFn = testFrameQuerySelectorFn("#page\\:mainForm\\:accordionBox1 .card-body");
+it("Accordion: Box 1: 'hide' to 'show' to 'hide'", function (done) {
+  let boxFn = querySelectorFn("#page\\:mainForm\\:accordionBox1");
+  let showBoxFn = querySelectorFn("#page\\:mainForm\\:showBox1");
+  let hideBoxFn = querySelectorFn("#page\\:mainForm\\:hideBox1");
+  let boxBodyFn = querySelectorFn("#page\\:mainForm\\:accordionBox1 .card-body");
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.asserts(3, function () {
-    assert.ok(showBoxFn() !== null);
-    assert.ok(hideBoxFn() === null);
-    assert.equal(boxBodyFn().textContent.trim(), "");
-  });
-  TTT.action(function () {
-    showBoxFn().click();
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.ok(showBoxFn() === null);
-    assert.ok(hideBoxFn() !== null);
-    assert.notEqual(boxBodyFn().textContent.trim(), null);
-  });
-  TTT.action(function () {
-    hideBoxFn().click();
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.ok(showBoxFn() !== null);
-    assert.ok(hideBoxFn() === null);
-    assert.equal(boxBodyFn().textContent.trim(), "");
-  });
-  TTT.startTest();
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(showBoxFn() !== null).toBe(true));
+  test.do(() => expect(hideBoxFn() === null).toBe(true));
+  test.do(() => expect(boxBodyFn().textContent.trim()).toBe(""));
+  test.do(() => showBoxFn().click());
+  test.wait(() => showBoxFn() === null && hideBoxFn() !== null && boxBodyFn().textContent.trim() !== null);
+  test.do(() => expect(showBoxFn() === null).toBe(true));
+  test.do(() => expect(hideBoxFn() !== null).toBe(true));
+  test.do(() => expect(boxBodyFn().textContent.trim()).not.toBe(null));
+  test.do(() => hideBoxFn().click());
+  test.wait(() => showBoxFn() !== null && hideBoxFn() === null && boxBodyFn().textContent.trim() === "");
+  test.do(() => expect(showBoxFn() !== null).toBe(true));
+  test.do(() => expect(hideBoxFn() === null).toBe(true));
+  test.do(() => expect(boxBodyFn().textContent.trim()).toBe(""));
+  test.start();
 });
 
-QUnit.test("Accordion: Box 2: 'hide' to 'show' to 'hide'", function (assert) {
-  let boxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:accordionBox2");
-  let showBoxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:showBox2");
-  let hideBoxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:hideBox2");
-  let boxBodyFn = testFrameQuerySelectorFn("#page\\:mainForm\\:accordionBox2 .card-body");
+it("Accordion: Box 2: 'hide' to 'show' to 'hide'", function (done) {
+  let boxFn = querySelectorFn("#page\\:mainForm\\:accordionBox2");
+  let showBoxFn = querySelectorFn("#page\\:mainForm\\:showBox2");
+  let hideBoxFn = querySelectorFn("#page\\:mainForm\\:hideBox2");
+  let boxBodyFn = querySelectorFn("#page\\:mainForm\\:accordionBox2 .card-body");
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.asserts(3, function () {
-    assert.ok(showBoxFn() !== null);
-    assert.ok(hideBoxFn() === null);
-    assert.equal(boxBodyFn().textContent.trim(), "");
-  });
-  TTT.action(function () {
-    showBoxFn().click();
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.ok(showBoxFn() === null);
-    assert.ok(hideBoxFn() !== null);
-    assert.notEqual(boxBodyFn().textContent.trim(), null);
-  });
-  TTT.action(function () {
-    hideBoxFn().click();
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.ok(showBoxFn() !== null);
-    assert.ok(hideBoxFn() === null);
-    assert.equal(boxBodyFn().textContent.trim(), "");
-  });
-  TTT.startTest();
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(showBoxFn() !== null).toBe(true));
+  test.do(() => expect(hideBoxFn() === null).toBe(true));
+  test.do(() => expect(boxBodyFn().textContent.trim()).toBe(""));
+  test.do(() => showBoxFn().click());
+  test.wait(() => showBoxFn() === null && hideBoxFn() !== null && boxBodyFn().textContent.trim() !== null);
+  test.do(() => expect(showBoxFn() === null).toBe(true));
+  test.do(() => expect(hideBoxFn() !== null).toBe(true));
+  test.do(() => expect(boxBodyFn().textContent.trim()).not.toBe(null));
+  test.do(() => hideBoxFn().click());
+  test.wait(() => showBoxFn() !== null && hideBoxFn() === null && boxBodyFn().textContent.trim() === "");
+  test.do(() => expect(showBoxFn() !== null).toBe(true));
+  test.do(() => expect(hideBoxFn() === null).toBe(true));
+  test.do(() => expect(boxBodyFn().textContent.trim()).toBe(""));
+  test.start();
 });
 
-QUnit.test("Accordion: Box 3: 'hide' to 'show' to 'hide'", function (assert) {
-  let boxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:accordionBox3");
-  let showBoxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:showBox3");
-  let hideBoxFn = testFrameQuerySelectorFn("#page\\:mainForm\\:hideBox3");
+it("Accordion: Box 3: 'hide' to 'show' to 'hide'", function (done) {
+  let boxFn = querySelectorFn("#page\\:mainForm\\:accordionBox3");
+  let showBoxFn = querySelectorFn("#page\\:mainForm\\:showBox3");
+  let hideBoxFn = querySelectorFn("#page\\:mainForm\\:hideBox3");
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.asserts(3, function () {
-    assert.ok(boxFn().classList.contains("tobago-collapsed"));
-    assert.ok(showBoxFn() !== null);
-    assert.ok(hideBoxFn() === null);
-  });
-  TTT.action(function () {
-    showBoxFn().click();
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.notOk(boxFn().classList.contains("tobago-collapsed"));
-    assert.ok(showBoxFn() === null);
-    assert.ok(hideBoxFn() !== null);
-  });
-  TTT.action(function () {
-    hideBoxFn().click();
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.ok(boxFn().classList.contains("tobago-collapsed"));
-    assert.ok(showBoxFn() !== null);
-    assert.ok(hideBoxFn() === null);
-  });
-  TTT.startTest();
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(boxFn().classList.contains("tobago-collapsed")).toBe(true));
+  test.do(() => expect(showBoxFn() !== null).toBe(true));
+  test.do(() => expect(hideBoxFn() === null).toBe(true));
+  test.do(() => showBoxFn().click());
+  test.wait(() => boxFn() && boxFn().classList.contains("tobago-collapsed") !== true);
+  test.do(() => expect(boxFn().classList.contains("tobago-collapsed")).not.toBe(true));
+  test.do(() => expect(showBoxFn() === null).toBe(true));
+  test.do(() => expect(hideBoxFn() !== null).toBe(true));
+  test.do(() => hideBoxFn().click());
+  test.wait(() => boxFn() && boxFn().classList.contains("tobago-collapsed") === true);
+  test.do(() => expect(showBoxFn() !== null).toBe(true));
+  test.do(() => expect(hideBoxFn() === null).toBe(true));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/40-section/Section.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/40-section/Section.test.js
index 6243add..32e1e4f 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/40-section/Section.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/40-section/Section.test.js
@@ -15,22 +15,14 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Attribute 'level'", function (assert) {
-  assert.expect(1);
-
-  let sectionLevel5Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:sectionLevel5");
+it("Attribute 'level'", function (done) {
+  let sectionLevel5Fn = querySelectorFn("#page\\:mainForm\\:sectionLevel5");
   let header5 = sectionLevel5Fn().querySelector("h5");
 
-  assert.ok(header5 !== null);
-});
-
-describe("Section", function() {
-  it("Attribute 'level'", function() {
-    let sectionLevel5Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:sectionLevel5");
-    let header5 = sectionLevel5Fn().querySelector("h5");
-
-    expect(header5).not.toBe(null);
-  });
+  let test = new JasmineTestTool(done);
+  test.do(() =>  expect(header5).not.toBe(null));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/06-validation/00/Content_Validation.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/06-validation/00/Content_Validation.test.js
index fe976fb..462a9da 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/06-validation/00/Content_Validation.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/06-validation/00/Content_Validation.test.js
@@ -15,229 +15,178 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorAllFn, testFrameQuerySelectorFn} from "/script/tobago-test.js";
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {querySelectorAllFn, querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Required: Submit without content.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let textareaFn = testFrameQuerySelectorFn("#page\\:mainForm\\:required\\:textarea\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:required\\:submit_r");
+it("Required: Submit without content.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let textareaFn = querySelectorFn("#page\\:mainForm\\:required\\:textarea\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:required\\:submit_r");
   let textareaValue = textareaFn().value;
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    textareaFn().value = "";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(2, function () {
-    assert.equal(messagesFn().length, 1);
-    assert.equal(textareaFn().value, textareaValue);
-  });
-  TTT.startTest();
+  let test = new JasmineTestTool(done);
+  test.do(() => textareaFn().value = "");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.do(() => expect(textareaFn().value).toBe(textareaValue));
+  test.start();
 });
 
-QUnit.test("Required: Submit with content.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let textareaFn = testFrameQuerySelectorFn("#page\\:mainForm\\:required\\:textarea\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:required\\:submit_r");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    textareaFn().value = "some content";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(2, function () {
-    assert.equal(messagesFn().length, 0);
-    assert.equal(textareaFn().value, "some content");
-  });
-  TTT.startTest();
+it("Required: Submit with content.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let textareaFn = querySelectorFn("#page\\:mainForm\\:required\\:textarea\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:required\\:submit_r");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => textareaFn().value = "some content");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 0
+      && textareaFn().value && textareaFn().value === "some content");
+  test.do(() => expect(messagesFn().length).toBe(0));
+  test.do(() => expect(textareaFn().value).toBe("some content"));
+  test.start();
 });
 
-QUnit.test("Validate Length: Submit single character.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateLength\\:in_vl\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateLength\\:submit_vl");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "a";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Validate Length: Submit single character.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:validateLength\\:in_vl\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:validateLength\\:submit_vl");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "a");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Validate Length: Submit two character.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateLength\\:in_vl\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateLength\\:submit_vl");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "ab";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 0);
-  });
-  TTT.startTest();
+it("Validate Length: Submit two character.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:validateLength\\:in_vl\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:validateLength\\:submit_vl");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "ab");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 0);
+  test.do(() => expect(messagesFn().length).toBe(0));
+  test.start();
 });
 
-QUnit.test("Validate Range: Submit no number.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "no number";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Validate Range: Submit no number.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "no number");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Validate Range: Submit number '2' which is out of range.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "2";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Validate Range: Submit number '2' which is out of range.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "2");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Validate Range: Submit number '78' which is out of range.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "78";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Validate Range: Submit number '78' which is out of range.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "78");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Validate Range: Submit number '64' which is within the range.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "64";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 0);
-  });
-  TTT.startTest();
+it("Validate Range: Submit number '64' which is within the range.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:in_vr\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:validateRange\\:submit_vr");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "64");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 0);
+  test.do(() => expect(messagesFn().length).toBe(0));
+  test.start();
 });
 
-QUnit.test("Regex Validation: Submit 'T' which violates the pattern.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:regexValidation\\:in_rv\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:regexValidation\\:submit_rv");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "T";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Regex Validation: Submit 'T' which violates the pattern.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:regexValidation\\:in_rv\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:regexValidation\\:submit_rv");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "T");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Regex Validation: Submit '3' which violates the pattern.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:regexValidation\\:in_rv\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:regexValidation\\:submit_rv");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "3";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Regex Validation: Submit '3' which violates the pattern.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:regexValidation\\:in_rv\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:regexValidation\\:submit_rv");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "3");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Regex Validation: Submit 'T3' which is accepted.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:regexValidation\\:in_rv\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:regexValidation\\:submit_rv");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "T3";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 0);
-  });
-  TTT.startTest();
+it("Regex Validation: Submit 'T3' which is accepted.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:regexValidation\\:in_rv\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:regexValidation\\:submit_rv");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "T3");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 0);
+  test.do(() => expect(messagesFn().length).toBe(0));
+  test.start();
 });
 
-QUnit.test("Custom Validator: Submit rejected string.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:customValidator\\:in_cv\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:customValidator\\:submit_cv");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "java";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 1);
-  });
-  TTT.startTest();
+it("Custom Validator: Submit rejected string.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:customValidator\\:in_cv\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:customValidator\\:submit_cv");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "java");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 1);
+  test.do(() => expect(messagesFn().length).toBe(1));
+  test.start();
 });
 
-QUnit.test("Custom Validator: Submit accepted string.", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:customValidator\\:in_cv\\:\\:field");
-  let submitFn = testFrameQuerySelectorFn("#page\\:mainForm\\:customValidator\\:submit_cv");
-
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    inFn().value = "tobago";
-    submitFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(1, function () {
-    assert.equal(messagesFn().length, 0);
-  });
-  TTT.startTest();
+it("Custom Validator: Submit accepted string.", function (done) {
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let inFn = querySelectorFn("#page\\:mainForm\\:customValidator\\:in_cv\\:\\:field");
+  let submitFn = querySelectorFn("#page\\:mainForm\\:customValidator\\:submit_cv");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => inFn().value = "tobago");
+  test.do(() => submitFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => messagesFn() && messagesFn().length === 0);
+  test.do(() => expect(messagesFn().length).toBe(0));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/51-for-each/For_Each.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/51-for-each/For_Each.test.js
index fc6e743..e0cd7d0 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/51-for-each/For_Each.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/51-for-each/For_Each.test.js
@@ -15,45 +15,36 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorAllFn, testFrameQuerySelectorFn} from "/script/tobago-test.js";
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {querySelectorAllFn, querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Add a river and reset.", function (assert) {
-  let nameFn = testFrameQuerySelectorFn("#page\\:mainForm\\:add\\:inName\\:\\:field");
-  let lengthFn = testFrameQuerySelectorFn("#page\\:mainForm\\:add\\:inLength\\:\\:field");
-  let dischargeFn = testFrameQuerySelectorFn("#page\\:mainForm\\:add\\:inDischarge\\:\\:field");
-  let addFn = testFrameQuerySelectorFn("#page\\:mainForm\\:add\\:buttonAdd");
-  let resetFn = testFrameQuerySelectorFn("#page\\:mainForm\\:reset\\:buttonReset");
-  let forEachBoxesFn = testFrameQuerySelectorAllFn("#page\\:mainForm\\:forEach .tobago-box");
-  let uiRepeatSectionsFn = testFrameQuerySelectorAllFn("#page\\:mainForm\\:uiRepeat .tobago-section");
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    resetFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(2, function () {
-    assert.equal(forEachBoxesFn().length, 3);
-    assert.equal(uiRepeatSectionsFn().length, 3);
-  });
-  TTT.action(function () {
-    nameFn().value = "Mississippi";
-    lengthFn().value = "6275";
-    dischargeFn().value = "16200";
-    addFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(2, function () {
-    assert.equal(forEachBoxesFn().length, 4);
-    assert.equal(uiRepeatSectionsFn().length, 4);
-  });
-  TTT.action(function () {
-    resetFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(2, function () {
-    assert.equal(forEachBoxesFn().length, 3);
-    assert.equal(uiRepeatSectionsFn().length, 3);
-  });
-  TTT.startTest();
+it("Add a river and reset.", function (done) {
+  let nameFn = querySelectorFn("#page\\:mainForm\\:add\\:inName\\:\\:field");
+  let lengthFn = querySelectorFn("#page\\:mainForm\\:add\\:inLength\\:\\:field");
+  let dischargeFn = querySelectorFn("#page\\:mainForm\\:add\\:inDischarge\\:\\:field");
+  let addFn = querySelectorFn("#page\\:mainForm\\:add\\:buttonAdd");
+  let resetFn = querySelectorFn("#page\\:mainForm\\:reset\\:buttonReset");
+  let forEachBoxesFn = querySelectorAllFn("#page\\:mainForm\\:forEach .tobago-box");
+  let uiRepeatSectionsFn = querySelectorAllFn("#page\\:mainForm\\:uiRepeat .tobago-section");
+
+  let test = new JasmineTestTool(done);
+  test.do(() => resetFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => forEachBoxesFn() && forEachBoxesFn().length !== 0);
+  test.do(() => expect(forEachBoxesFn().length).toBe(3));
+  test.do(() => expect(uiRepeatSectionsFn().length).toBe(3));
+  test.do(() => nameFn().value = "Mississippi");
+  test.do(() => lengthFn().value = "6275");
+  test.do(() => dischargeFn().value = "16200");
+  test.do(() => addFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => forEachBoxesFn() && forEachBoxesFn().length === 4
+      && uiRepeatSectionsFn() && uiRepeatSectionsFn().length === 4);
+  test.do(() => expect(forEachBoxesFn().length).toBe(4));
+  test.do(() => expect(uiRepeatSectionsFn().length).toBe(4));
+  test.do(() => resetFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => forEachBoxesFn() && forEachBoxesFn().length === 3
+      && uiRepeatSectionsFn() && uiRepeatSectionsFn().length === 3);
+  test.do(() => expect(forEachBoxesFn().length).toBe(3));
+  test.do(() => expect(uiRepeatSectionsFn().length).toBe(3));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/Collapsible_Popup.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/Collapsible_Popup.test.js
index bf85409..a9f45db 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/Collapsible_Popup.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/Collapsible_Popup.test.js
@@ -15,16 +15,17 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorAllFn, testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorAllFn, querySelectorFn} from "/script/tobago-test.js";
 import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
 QUnit.test("Simple Popup", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let openFn = testFrameQuerySelectorFn("#page\\:mainForm\\:simple\\:open1");
-  let submitOnPageFn = testFrameQuerySelectorFn("#page\\:mainForm\\:simple\\:submitOnPage1");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:simple\\:controllerPopup\\:in1\\:\\:field");
-  let submitOnPopupFn = testFrameQuerySelectorFn("#page\\:mainForm\\:simple\\:controllerPopup\\:submitOnPopup1");
-  let closeFn = testFrameQuerySelectorFn("#page\\:mainForm\\:simple\\:controllerPopup\\:close1");
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let openFn = querySelectorFn("#page\\:mainForm\\:simple\\:open1");
+  let submitOnPageFn = querySelectorFn("#page\\:mainForm\\:simple\\:submitOnPage1");
+  let inFn = querySelectorFn("#page\\:mainForm\\:simple\\:controllerPopup\\:in1\\:\\:field");
+  let submitOnPopupFn = querySelectorFn("#page\\:mainForm\\:simple\\:controllerPopup\\:submitOnPopup1");
+  let closeFn = querySelectorFn("#page\\:mainForm\\:simple\\:controllerPopup\\:close1");
 
   let TTT = new TobagoTestTool(assert);
   TTT.action(function () {
@@ -72,12 +73,12 @@ QUnit.test("Simple Popup", function (assert) {
 });
 
 QUnit.test("Full Server Request", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let openFn = testFrameQuerySelectorFn("#page\\:mainForm\\:server\\:open2");
-  let submitOnPageFn = testFrameQuerySelectorFn("#page\\:mainForm\\:server\\:submitOnPage2");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:server\\:fullServerRequestPopup\\:in2\\:\\:field");
-  let submitOnPopupFn = testFrameQuerySelectorFn("#page\\:mainForm\\:server\\:fullServerRequestPopup\\:submitOnPopup2");
-  let closeFn = testFrameQuerySelectorFn("#page\\:mainForm\\:server\\:fullServerRequestPopup\\:close2");
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let openFn = querySelectorFn("#page\\:mainForm\\:server\\:open2");
+  let submitOnPageFn = querySelectorFn("#page\\:mainForm\\:server\\:submitOnPage2");
+  let inFn = querySelectorFn("#page\\:mainForm\\:server\\:fullServerRequestPopup\\:in2\\:\\:field");
+  let submitOnPopupFn = querySelectorFn("#page\\:mainForm\\:server\\:fullServerRequestPopup\\:submitOnPopup2");
+  let closeFn = querySelectorFn("#page\\:mainForm\\:server\\:fullServerRequestPopup\\:close2");
 
   let TTT = new TobagoTestTool(assert);
   TTT.action(function () {
@@ -125,13 +126,13 @@ QUnit.test("Full Server Request", function (assert) {
 });
 
 QUnit.test("Client Side", function (assert) {
-  let messagesFn = testFrameQuerySelectorAllFn("#page\\:messages.tobago-messages div");
-  let openFn = testFrameQuerySelectorFn("#page\\:mainForm\\:client\\:open3");
-  let submitOnPageFn = testFrameQuerySelectorFn("#page\\:mainForm\\:client\\:submitOnPage3");
-  let popupCollapsedFn = testFrameQuerySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:\\:collapse");
-  let inFn = testFrameQuerySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:in3\\:\\:field");
-  let submitOnPopupFn = testFrameQuerySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:submitOnPopup3");
-  let closeFn = testFrameQuerySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:close3");
+  let messagesFn = querySelectorAllFn("#page\\:messages.tobago-messages div");
+  let openFn = querySelectorFn("#page\\:mainForm\\:client\\:open3");
+  let submitOnPageFn = querySelectorFn("#page\\:mainForm\\:client\\:submitOnPage3");
+  let popupCollapsedFn = querySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:\\:collapse");
+  let inFn = querySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:in3\\:\\:field");
+  let submitOnPopupFn = querySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:submitOnPopup3");
+  let closeFn = querySelectorFn("#page\\:mainForm\\:client\\:clientPopup\\:close3");
 
   let TTT = new TobagoTestTool(assert);
   TTT.action(function () {
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1500-output/21-label-for/Label_For.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1500-output/21-label-for/Label_For.test.js
index 665066e..515d3f6 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1500-output/21-label-for/Label_For.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1500-output/21-label-for/Label_For.test.js
@@ -15,36 +15,37 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Test for required CSS class", function (assert) {
-  assert.expect(13);
+it("Test for required CSS class", function (done) {
+  let inLabel = querySelectorFn("#page\\:mainForm\\:inLabel");
+  let dateLabel = querySelectorFn("#page\\:mainForm\\:dateLabel");
+  let fileLabel = querySelectorFn("#page\\:mainForm\\:fileLabel");
+  let textareaLabel = querySelectorFn("#page\\:mainForm\\:textareaLabel");
+  let selectBooleanCheckboxLabel = querySelectorFn("#page\\:mainForm\\:selectBooleanCheckboxLabel");
+  let selectBooleanToggleLabel = querySelectorFn("#page\\:mainForm\\:selectBooleanToggleLabel");
+  let selectOneRadioLabel = querySelectorFn("#page\\:mainForm\\:selectOneRadioLabel");
+  let selectManyCheckboxLabel = querySelectorFn("#page\\:mainForm\\:selectManyCheckboxLabel");
+  let selectOneChoiceLabel = querySelectorFn("#page\\:mainForm\\:selectOneChoiceLabel");
+  let selectOneListboxLabel = querySelectorFn("#page\\:mainForm\\:selectOneListboxLabel");
+  let selectManyListboxLabel = querySelectorFn("#page\\:mainForm\\:selectManyListboxLabel");
+  let selectManyShuttleLabel = querySelectorFn("#page\\:mainForm\\:selectManyShuttleLabel");
+  let starsLabel = querySelectorFn("#page\\:mainForm\\:starsLabel");
 
-  let inLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:inLabel");
-  let dateLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:dateLabel");
-  let fileLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:fileLabel");
-  let textareaLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:textareaLabel");
-  let selectBooleanCheckboxLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectBooleanCheckboxLabel");
-  let selectBooleanToggleLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectBooleanToggleLabel");
-  let selectOneRadioLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectOneRadioLabel");
-  let selectManyCheckboxLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectManyCheckboxLabel");
-  let selectOneChoiceLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectOneChoiceLabel");
-  let selectOneListboxLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectOneListboxLabel");
-  let selectManyListboxLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectManyListboxLabel");
-  let selectManyShuttleLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:selectManyShuttleLabel");
-  let starsLabel = testFrameQuerySelectorFn("#page\\:mainForm\\:starsLabel");
-
-  assert.ok(inLabel().classList.contains("tobago-required"));
-  assert.ok(dateLabel().classList.contains("tobago-required"));
-  assert.ok(fileLabel().classList.contains("tobago-required"));
-  assert.ok(textareaLabel().classList.contains("tobago-required"));
-  assert.ok(selectBooleanCheckboxLabel().classList.contains("tobago-required"));
-  assert.ok(selectBooleanToggleLabel().classList.contains("tobago-required"));
-  assert.ok(selectOneRadioLabel().classList.contains("tobago-required"));
-  assert.ok(selectManyCheckboxLabel().classList.contains("tobago-required"));
-  assert.ok(selectOneChoiceLabel().classList.contains("tobago-required"));
-  assert.ok(selectOneListboxLabel().classList.contains("tobago-required"));
-  assert.ok(selectManyListboxLabel().classList.contains("tobago-required"));
-  assert.ok(selectManyShuttleLabel().classList.contains("tobago-required"));
-  assert.ok(starsLabel().classList.contains("tobago-required"));
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(inLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(dateLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(fileLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(textareaLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectBooleanCheckboxLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectBooleanToggleLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectOneRadioLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectManyCheckboxLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectOneChoiceLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectOneListboxLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectManyListboxLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(selectManyShuttleLabel().classList.contains("tobago-required")).toBe(true));
+  test.do(() => expect(starsLabel().classList.contains("tobago-required")).toBe(true));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2500-tab/Tabgroup_Style.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2500-tab/Tabgroup_Style.test.js
index 2c76580..6a52cb0 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2500-tab/Tabgroup_Style.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2500-tab/Tabgroup_Style.test.js
@@ -15,39 +15,39 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("test numbers of tab-group-index", function (assert) {
-  let tab1Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabOne");
-  let tab2Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabTwo");
-  let tab3Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabThree");
-  let tab4Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabFour");
-  let tab5Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabFive");
-  let tabContent1Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabOne\\:\\:content");
-  let tabContent2Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabTwo\\:\\:content");
-  let tabContent3Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabThree\\:\\:content");
-  let tabContent4Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabFour\\:\\:content");
-  let tabContent5Fn = testFrameQuerySelectorFn("#page\\:mainForm\\:tabFive\\:\\:content");
+it("test numbers of tab-group-index", function (done) {
+  let tab1Fn = querySelectorFn("#page\\:mainForm\\:tabOne");
+  let tab2Fn = querySelectorFn("#page\\:mainForm\\:tabTwo");
+  let tab3Fn = querySelectorFn("#page\\:mainForm\\:tabThree");
+  let tab4Fn = querySelectorFn("#page\\:mainForm\\:tabFour");
+  let tab5Fn = querySelectorFn("#page\\:mainForm\\:tabFive");
+  let tabContent1Fn = querySelectorFn("#page\\:mainForm\\:tabOne\\:\\:content");
+  let tabContent2Fn = querySelectorFn("#page\\:mainForm\\:tabTwo\\:\\:content");
+  let tabContent3Fn = querySelectorFn("#page\\:mainForm\\:tabThree\\:\\:content");
+  let tabContent4Fn = querySelectorFn("#page\\:mainForm\\:tabFour\\:\\:content");
+  let tabContent5Fn = querySelectorFn("#page\\:mainForm\\:tabFive\\:\\:content");
 
-  assert.equal(tab1Fn().index, 0);
-  assert.equal(tab2Fn().index, 1);
-  assert.equal(tab3Fn(), null, "Tab three is not rendered");
-  assert.equal(tab4Fn().index, 3);
-  assert.equal(tab5Fn().index, 4);
-
-  assert.equal(tabContent1Fn().index, 0);
-  assert.equal(tabContent2Fn().index, 1);
-  assert.equal(tabContent3Fn(), null, "Tab three content is not rendered");
-  assert.equal(tabContent4Fn(), null, "Tab four content is not rendered (disabled)");
-  assert.equal(tabContent5Fn().index, 4);
-
-  assert.ok(tab1Fn().querySelector(".nav-link").classList.contains("active"));
-  assert.notOk(tab2Fn().querySelector(".nav-link").classList.contains("active"));
-  assert.notOk(tab4Fn().querySelector(".nav-link").classList.contains("active"));
-  assert.notOk(tab5Fn().querySelector(".nav-link").classList.contains("active"));
-
-  assert.ok(tabContent1Fn().classList.contains("active"));
-  assert.notOk(tabContent2Fn().classList.contains("active"));
-  assert.equal(tabContent4Fn(), null);
-  assert.notOk(tabContent5Fn().classList.contains("active"));
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(tab1Fn().index).toBe(0));
+  test.do(() => expect(tab2Fn().index).toBe(1));
+  test.do(() => expect(tab3Fn()).toBe(null, "Tab three is not rendered"));
+  test.do(() => expect(tab4Fn().index).toBe(3));
+  test.do(() => expect(tab5Fn().index).toBe(4));
+  test.do(() => expect(tabContent1Fn().index).toBe(0));
+  test.do(() => expect(tabContent2Fn().index).toBe(1));
+  test.do(() => expect(tabContent3Fn()).toBe(null, "Tab three content is not rendered"));
+  test.do(() => expect(tabContent4Fn()).toBe(null, "Tab four content is not rendered (disabled)"));
+  test.do(() => expect(tabContent5Fn().index).toBe(4));
+  test.do(() => expect(tab1Fn().querySelector(".nav-link").classList.contains("active")).toBe(true));
+  test.do(() => expect(tab2Fn().querySelector(".nav-link").classList.contains("active")).not.toBe(true));
+  test.do(() => expect(tab4Fn().querySelector(".nav-link").classList.contains("active")).not.toBe(true));
+  test.do(() => expect(tab5Fn().querySelector(".nav-link").classList.contains("active")).not.toBe(true));
+  test.do(() => expect(tabContent1Fn().classList.contains("active")).toBe(true));
+  test.do(() => expect(tabContent2Fn().classList.contains("active")).not.toBe(true));
+  test.do(() => expect(tabContent4Fn()).toBe(null));
+  test.do(() => expect(tabContent5Fn().classList.contains("active")).not.toBe("active"));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/40000-style/100-headings/Headings.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/40000-style/100-headings/Headings.test.js
index b572d5a..4c57bc5 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/40000-style/100-headings/Headings.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/40000-style/100-headings/Headings.test.js
@@ -15,80 +15,74 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("Test h1", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link1");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink1");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test h1", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link1");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink1");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-QUnit.test("Test h2", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link2");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink2");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test h2", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link2");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink2");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-QUnit.test("Test h3", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link3");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink3");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test h3", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link3");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink3");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-QUnit.test("Test h4", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link4");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink4");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test h4", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link4");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink4");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-QUnit.test("Test h5", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link5");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink5");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test h5", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link5");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink5");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-QUnit.test("Test h6", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link6");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink6");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test h6", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link6");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink6");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-QUnit.test("Test no heading", function (assert) {
-  let alinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:link0");
-  let buttonlinkFn = testFrameQuerySelectorFn("#page\\:mainForm\\:actionLink0");
-  testFont(assert, alinkFn, buttonlinkFn);
+it("Test no heading", function (done) {
+  let alinkFn = querySelectorFn("#page\\:mainForm\\:link0");
+  let buttonlinkFn = querySelectorFn("#page\\:mainForm\\:actionLink0");
+  testFont(done, alinkFn, buttonlinkFn);
 });
 
-function testFont(assert, alinkFn, buttonlinkFn) {
-  assert.expect(5);
-
+function testFont(done, alinkFn, buttonlinkFn) {
+  let test = new JasmineTestTool(done);
   const alinkComputedStyle = getComputedStyle(alinkFn());
   const buttonlinkFnComputedStyle = getComputedStyle(buttonlinkFn());
-  assert.equal(alinkComputedStyle.color, buttonlinkFnComputedStyle.color);
-  assert.equal(alinkComputedStyle.fontFamily, buttonlinkFnComputedStyle.fontFamily);
-  assert.equal(alinkComputedStyle.fontSize, buttonlinkFnComputedStyle.fontSize);
-  assert.equal(alinkComputedStyle.fontWeight, buttonlinkFnComputedStyle.fontWeight);
-  assert.equal(alinkComputedStyle.textDecoration, buttonlinkFnComputedStyle.textDecoration);
+  test.do(() => expect(alinkComputedStyle.color).toBe(buttonlinkFnComputedStyle.color));
+  test.do(() => expect(alinkComputedStyle.fontFamily).toBe(buttonlinkFnComputedStyle.fontFamily));
+  test.do(() => expect(alinkComputedStyle.fontSize).toBe(buttonlinkFnComputedStyle.fontSize));
+  test.do(() => expect(alinkComputedStyle.fontWeight).toBe(buttonlinkFnComputedStyle.fontWeight));
+  test.do(() => expect(alinkComputedStyle.textDecoration).toBe(buttonlinkFnComputedStyle.textDecoration));
+  test.start();
 }
 
-QUnit.test("Ajax reload for section 2", function (assert) {
-  let reloadButtonFn = testFrameQuerySelectorFn("#page\\:mainForm\\:reloadSection2");
-  let section2HeaderFn = testFrameQuerySelectorFn("#page\\:mainForm\\:levelTwoSection h3");
-  let timestampFn = testFrameQuerySelectorFn("#page\\:mainForm\\:timestamp span");
+it("Ajax reload for section 2", function (done) {
+  let reloadButtonFn = querySelectorFn("#page\\:mainForm\\:reloadSection2");
+  let section2HeaderFn = querySelectorFn("#page\\:mainForm\\:levelTwoSection h3");
+  let timestampFn = querySelectorFn("#page\\:mainForm\\:timestamp span");
   let firstTimestamp = timestampFn().textContent;
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.asserts(1, function () {
-    assert.ok(section2HeaderFn() !== null);
-  });
-  TTT.action(function () {
-    reloadButtonFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(2, function () {
-    assert.ok(section2HeaderFn() !== null);
-    assert.ok(firstTimestamp < timestampFn().textContent, "value of new timestamp must be higher");
-  });
-  TTT.startTest();
+  let test = new JasmineTestTool(done);
+  test.do(() => expect(section2HeaderFn() !== null).toBe(true));
+  test.do(() => reloadButtonFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => reloadButtonFn() && section2HeaderFn() !== null);
+  test.do(() => expect(section2HeaderFn() !== null).toBe(true));
+  test.do(() => expect(firstTimestamp < timestampFn().textContent).toBe(true, "value of new timestamp must be higher"));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/10-label-horizontal/Grid_Layout_Label_Horizontal.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/10-label-horizontal/Grid_Layout_Label_Horizontal.test.js
index d84353d..d9f8ea2 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/10-label-horizontal/Grid_Layout_Label_Horizontal.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/10-label-horizontal/Grid_Layout_Label_Horizontal.test.js
@@ -15,125 +15,109 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineUtils} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("test CSS of the fields and labels of 'first1'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'first1'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first1");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first1\\:\\:label");
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first1");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first1\\:\\:label");
-
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "2", "auto", "3", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "1", "auto", "3", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "2", "auto", "3", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "1", "auto", "3", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last1'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last1");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last1\\:\\:label");
+it("test CSS of the fields and labels of 'last1'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last1");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last1\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "3", "auto", "3", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "4", "auto", "3", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "3", "auto", "3", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "4", "auto", "3", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'first2'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'last1'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last1");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last1\\:\\:label");
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first2");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first2\\:\\:label");
-
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "1", "auto", "5", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "2", "auto", "5", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "3", "auto", "3", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "4", "auto", "3", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last2'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last2");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last2\\:\\:label");
+it("test CSS of the fields and labels of 'first2'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first2");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first2\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "4", "auto", "5", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "3", "auto", "5", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "1", "auto", "5", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "2", "auto", "5", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'first3'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'last2'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last2");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last2\\:\\:label");
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first3");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first3\\:\\:label");
-
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "2", "span 3", "7", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "1", "auto", "7", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "4", "auto", "5", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "3", "auto", "5", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last3'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last3");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last3\\:\\:label");
+it("test CSS of the fields and labels of 'first3'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first3");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first3\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "1", "span 3", "8", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "4", "auto", "8", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "2", "span 3", "7", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "1", "auto", "7", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'first4'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first4");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first4\\:\\:label");
+it("test CSS of the fields and labels of 'last3'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last3");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last3\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "2", "span 2", "10", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "1", "auto", "10", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "1", "span 3", "8", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "4", "auto", "8", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last4'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'first4'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first4");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first4\\:\\:label");
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last4");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last4\\:\\:label");
-
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "1", "span 2", "11", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "3", "auto", "11", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "2", "span 2", "10", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "1", "auto", "10", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'first5'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first5");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first5\\:\\:label");
+it("test CSS of the fields and labels of 'last4'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last4");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last4\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "3", "span 2", "13", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "2", "auto", "13", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "1", "span 2", "11", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "3", "auto", "11", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last5'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last5");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last5\\:\\:label");
+it("test CSS of the fields and labels of 'first5'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first5");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first5\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "2", "span 2", "14", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "4", "auto", "14", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "3", "span 2", "13", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "2", "auto", "13", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'first6'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'last5'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last5");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last5\\:\\:label");
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first6");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first6\\:\\:label");
-
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "2", "span 4", "16", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "1", "auto", "16", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "2", "span 2", "14", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "4", "auto", "14", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last6'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'first6'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first6");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first6\\:\\:label");
+
+  JasmineUtils.checkGridCss(fieldFn(), "2", "span 4", "16", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "1", "auto", "16", "auto");
+});
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last6");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last6\\:\\:label");
+it("test CSS of the fields and labels of 'last6'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last6");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last6\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "1", "span 4", "17", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "5", "auto", "17", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "1", "span 4", "17", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "5", "auto", "17", "auto");
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.test.js
index 1b3f759..e6cb9c8 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.test.js
@@ -15,25 +15,21 @@
  * limitations under the License.
  */
 
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineUtils} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("test CSS of the fields and labels of 'first1'", function (assert) {
-  assert.expect(8);
+it("test CSS of the fields and labels of 'first1'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:first1");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:first1\\:\\:label");
 
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first1");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:first1\\:\\:label");
-
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "1", "auto", "2", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "1", "auto", "1", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "1", "auto", "2", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "1", "auto", "1", "auto");
 });
 
-QUnit.test("test CSS of the fields and labels of 'last1'", function (assert) {
-  assert.expect(8);
-
-  let fieldFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last1");
-  let labelFn = testFrameQuerySelectorFn("#page\\:mainForm\\:last1\\:\\:label");
+it("test CSS of the fields and labels of 'last1'", function () {
+  let fieldFn = querySelectorFn("#page\\:mainForm\\:last1");
+  let labelFn = querySelectorFn("#page\\:mainForm\\:last1\\:\\:label");
 
-  TobagoTestTool.checkGridCss(assert, fieldFn(), "2", "auto", "1", "auto");
-  TobagoTestTool.checkGridCss(assert, labelFn(), "2", "auto", "2", "auto");
+  JasmineUtils.checkGridCss(fieldFn(), "2", "auto", "1", "auto");
+  JasmineUtils.checkGridCss(labelFn(), "2", "auto", "2", "auto");
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/10-rendererBase-getCurrentValue/RendererBase_GetCurrentValue.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/10-rendererBase-getCurrentValue/RendererBase_GetCurrentValue.test.js
index 92f38d1..ef93991 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/10-rendererBase-getCurrentValue/RendererBase_GetCurrentValue.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/10-rendererBase-getCurrentValue/RendererBase_GetCurrentValue.test.js
@@ -15,33 +15,36 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
-
-function test(assert, idSuffix, expectedText) {
-  let outFn = testFrameQuerySelectorFn("#page\\:mainForm\\:" + idSuffix);
-  assert.equal(outFn().textContent.trim(), expectedText);
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
+
+function test(done, idSuffix, expectedText) {
+  let test = new JasmineTestTool(done);
+  let outFn = querySelectorFn("#page\\:mainForm\\:" + idSuffix);
+  test.do(() => expect(outFn().textContent.trim()).toBe(expectedText));
+  test.start();
 }
 
-QUnit.test("formatted values: out string", function (assert) {
-  test(assert, "outString", "simple string");
+it("formatted values: out string", function (done) {
+  test(done, "outString", "simple string");
 });
 
-QUnit.test("formatted values: out string from method", function (assert) {
-  test(assert, "outStringFromMethod", "HELLO WORLD!");
+it("formatted values: out string from method", function (done) {
+  test(done, "outStringFromMethod", "HELLO WORLD!");
 });
 
-QUnit.test("formatted values: out date", function (assert) {
-  test(assert, "outDate", "24.07.1969");
+it("formatted values: out date", function (done) {
+  test(done, "outDate", "24.07.1969");
 });
 
-QUnit.test("formatted values: out date from method", function (assert) {
-  test(assert, "outDateFromMethod", "24.07.2019");
+it("formatted values: out date from method", function (done) {
+  test(done, "outDateFromMethod", "24.07.2019");
 });
 
-QUnit.test("formatted values: out currency", function (assert) {
-  test(assert, "outCurrency", "TTD");
+it("formatted values: out currency", function (done) {
+  test(done, "outCurrency", "TTD");
 });
 
-QUnit.test("formatted values: out currency from method", function (assert) {
-  test(assert, "outCurrencyFromMethod", "ISK");
+it("formatted values: out currency from method", function (done) {
+  test(done, "outCurrencyFromMethod", "ISK");
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/30-ajax-special-character/Ajax_Special_Character.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/30-ajax-special-character/Ajax_Special_Character.test.js
index 227248c..b58a59d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/30-ajax-special-character/Ajax_Special_Character.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/50000-java/30-ajax-special-character/Ajax_Special_Character.test.js
@@ -15,28 +15,24 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("ajax excecute", function (assert) {
-  let timestampFn = testFrameQuerySelectorFn("#page\\:mainForm\\:timestamp span");
-  let textFn = testFrameQuerySelectorFn("#page\\:mainForm\\:outText span");
-  let tipFn = testFrameQuerySelectorFn("#page\\:mainForm\\:outTip span");
-  let buttonFn = testFrameQuerySelectorFn("#page\\:mainForm\\:ajaxButton");
+it("ajax execute", function (done) {
+  let timestampFn = querySelectorFn("#page\\:mainForm\\:timestamp span");
+  let textFn = querySelectorFn("#page\\:mainForm\\:outText span");
+  let tipFn = querySelectorFn("#page\\:mainForm\\:outTip span");
+  let buttonFn = querySelectorFn("#page\\:mainForm\\:ajaxButton");
 
   let timestampValue = timestampFn().textContent;
   let textValue = textFn().textContent;
   let tipValue = tipFn().getAttribute('title');
 
-  let TTT = new TobagoTestTool(assert);
-  TTT.action(function () {
-    buttonFn().dispatchEvent(new Event("click", {bubbles: true}));
-  });
-  TTT.waitForResponse();
-  TTT.asserts(3, function () {
-    assert.notEqual(timestampFn().textContent, timestampValue);
-    assert.equal(textFn().textContent, textValue);
-    assert.equal(tipFn().getAttribute('title'), tipValue);
-  });
-  TTT.startTest();
+  let test = new JasmineTestTool(done);
+  test.do(() => buttonFn().dispatchEvent(new Event("click", {bubbles: true})));
+  test.wait(() => timestampFn() && timestampFn().textContent !== timestampValue);
+  test.do(() => expect(timestampFn().textContent).not.toBe(timestampValue));
+  test.do(() => expect(textFn().textContent).toBe(textValue));
+  test.do(() => expect(tipFn().getAttribute('title')).toBe(tipValue));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/9010-mode-valueIfSet/Mode_ValueIfSet.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/9010-mode-valueIfSet/Mode_ValueIfSet.test.js
index 5e041cf..fe00a20 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/9010-mode-valueIfSet/Mode_ValueIfSet.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/9010-mode-valueIfSet/Mode_ValueIfSet.test.js
@@ -15,20 +15,20 @@
  * limitations under the License.
  */
 
-import {testFrameQuerySelectorFn} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
 function escapeClientId(clientId) {
   return '#' + clientId.replace(/([:\.])/g, '\\$1');
 }
 
-QUnit.test("inputfield with label", function (assert) {
-
-  assert.expect(6);
+it("inputfield with label", function (done) {
+  let test = new JasmineTestTool(done);
 
   function testValueEquals(id) {
-    let fieldFn = testFrameQuerySelectorFn(escapeClientId(id));
-    let labelFn = testFrameQuerySelectorFn("[for='" + id + "']");
-    assert.equal(fieldFn().value, labelFn().textContent);
+    let fieldFn = querySelectorFn(escapeClientId(id));
+    let labelFn = querySelectorFn("[for='" + id + "']");
+    test.do(() => expect(fieldFn().value).toBe(labelFn().textContent));
   }
 
   testValueEquals("page:mainForm:direct::field");
@@ -38,20 +38,21 @@ QUnit.test("inputfield with label", function (assert) {
   testValueEquals("page:mainForm:v4::field");
 
   const testVuId = "page:mainForm:vu::field";
-  let fieldVuFn = testFrameQuerySelectorFn(escapeClientId(testVuId));
-  assert.equal(fieldVuFn().value, "");
+  let fieldVuFn = querySelectorFn(escapeClientId(testVuId));
+  test.do(() => expect(fieldVuFn().value).toBe(""));
+  test.start();
 });
 
-QUnit.test("inputfield with label", function (assert) {
-
-  assert.expect(2);
+it("inputfield with label", function (done) {
+  let test = new JasmineTestTool(done);
 
   function testValueEquals(id) {
-    let fieldFn = testFrameQuerySelectorFn(escapeClientId(id));
-    let labelFn = testFrameQuerySelectorFn("[for='" + id + "']");
-    assert.equal(fieldFn().id, labelFn().textContent);
+    let fieldFn = querySelectorFn(escapeClientId(id));
+    let labelFn = querySelectorFn("[for='" + id + "']");
+    test.do(() => expect(fieldFn().id).toBe(labelFn().textContent));
   }
 
   testValueEquals("page:mainForm:my_number_1::field");
   testValueEquals("page:mainForm:my_number_3::field");
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/error/error.test.js b/tobago-example/tobago-example-demo/src/main/webapp/error/error.test.js
index 84e5feb..772fe1d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/error/error.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/error/error.test.js
@@ -15,28 +15,21 @@
  * limitations under the License.
  */
 
-import {jQueryFrame} from "/script/tobago-test.js";
+import {querySelectorFn} from "/script/tobago-test.js";
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
 
-QUnit.test("has no exception", function (assert) {
-  var $error = jQueryFrame("#page\\:mainForm\\:errorSection .tobago-section-header span");
-  assert.notEqual($error.text(), "An error has occurred!");
-});
+it("has no exception", function (done) {
+  const error = querySelectorFn("#page\\:mainForm\\:errorSection .tobago-section-header span");
 
-QUnit.test("has no 404", function (assert) {
-  var $error404 = jQueryFrame("#page\\:mainForm\\:pageNotFoundMessage span");
-  assert.notEqual($error404.text(), "The page was not found!");
+  const test = new JasmineTestTool(done);
+  test.do(() => expect(error.textContent).not.toEqual("An error has occurred!"));
+  test.start();
 });
 
-describe("Error", function () {
-  it("has no exception", function () {
-    var $error = jQueryFrame("#page\\:mainForm\\:errorSection .tobago-section-header span");
-
-    expect($error.text()).not.toEqual("An error has occurred!");
-  });
-
-  it("has no 404", function () {
-    var $error404 = jQueryFrame("#page\\:mainForm\\:pageNotFoundMessage span");
+it("has no 404", function (done) {
+  const error404 = querySelectorFn("#page\\:mainForm\\:pageNotFoundMessage span");
 
-    expect($error404.text()).not.toEqual("The page was not found!");
-  });
+  const test = new JasmineTestTool(done);
+  test.do(() => expect(error404.textContent).not.toEqual("The page was not found!"));
+  test.start();
 });
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js b/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js
index d6d01a6..7441b5c 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
+
 function querySelectorFn(expression) {
   return function () {
     return document.getElementById("page:testframe").contentWindow.document.querySelector(expression);
@@ -82,6 +84,16 @@ QUnit.test("test '???'", function (assert) {
       "There must no '???' on the site.");
 });
 
+beforeEach(function (done) {
+  const test = new JasmineTestTool(done);
+  test.wait(() => document.getElementById("page:testframe")
+      && document.getElementById("page:testframe").contentWindow
+      && document.getElementById("page:testframe").contentWindow.name
+      && document.getElementById("page:testframe").contentWindow.name !== "page:testframe"
+      && document.getElementById("page:testframe").contentWindow.name !== "ds-tempWindowId");
+  test.do(() => expect("waiting for testframe is done").toBe("waiting for testframe is done"));
+  test.start();
+});
 
 describe("general", function () {
   it("duplicated IDs", function () {
diff --git a/tobago-tool/tobago-tool-test/src/main/resources/META-INF/resources/tobago/test/tobago-test-tool.js b/tobago-tool/tobago-tool-test/src/main/resources/META-INF/resources/tobago/test/tobago-test-tool.js
index d120769..b5e12e8 100644
--- a/tobago-tool/tobago-tool-test/src/main/resources/META-INF/resources/tobago/test/tobago-test-tool.js
+++ b/tobago-tool/tobago-tool-test/src/main/resources/META-INF/resources/tobago/test/tobago-test-tool.js
@@ -27,43 +27,47 @@ TobagoTestTool.stepType = {
   ASSERTS: 4
 };
 
-TobagoTestTool.msie = navigator.userAgent.indexOf("MSIE") > -1 || navigator.userAgent.indexOf("Trident") > -1;
-
-TobagoTestTool.checkGridCss = function (assert, element, columnStart, columnEnd, rowStart, rowEnd) {
-  columnEnd = TobagoTestTool.convertGridCss(columnEnd);
-  rowEnd = TobagoTestTool.convertGridCss(rowEnd);
-
-  if (TobagoTestTool.msie) {
-    assert.equal(getComputedStyle(element).msGridColumn, columnStart);
-    assert.equal(getComputedStyle(element).msGridColumnSpan, columnEnd);
-    assert.equal(getComputedStyle(element).msGridRow, rowStart);
-    assert.equal(getComputedStyle(element).msGridRowSpan, rowEnd);
-  } else {
-    assert.equal(getComputedStyle(element).gridColumnStart, columnStart);
-    assert.equal(getComputedStyle(element).gridColumnEnd, columnEnd);
-    assert.equal(getComputedStyle(element).gridRowStart, rowStart);
-    assert.equal(getComputedStyle(element).gridRowEnd, rowEnd);
-  }
-};
-
-TobagoTestTool.convertGridCss = function (end) {
-  if (TobagoTestTool.msie) {
-    switch (end) {
-      case "auto":
-        return "1";
-      case "span 2":
-        return "2";
-      case "span 3":
-        return "3";
-      case "span 4":
-        return "4";
-      default:
-        return end;
+class JasmineUtils {
+  static isMsie() {
+    return navigator.userAgent.indexOf("MSIE") > -1 || navigator.userAgent.indexOf("Trident") > -1;
+  };
+
+  static checkGridCss(element, columnStart, columnEnd, rowStart, rowEnd) {
+    columnEnd = this.convertGridCss(columnEnd);
+    rowEnd = this.convertGridCss(rowEnd);
+
+    if (this.isMsie()) {
+      expect(getComputedStyle(element).msGridColumn).toBe(columnStart);
+      expect(getComputedStyle(element).msGridColumnSpan).toBe(columnEnd);
+      expect(getComputedStyle(element).msGridRow).toBe(rowStart);
+      expect(getComputedStyle(element).msGridRowSpan).toBe(rowEnd);
+    } else {
+      expect(getComputedStyle(element).gridColumnStart).toBe(columnStart);
+      expect(getComputedStyle(element).gridColumnEnd).toBe(columnEnd);
+      expect(getComputedStyle(element).gridRowStart).toBe(rowStart);
+      expect(getComputedStyle(element).gridRowEnd).toBe(rowEnd);
     }
-  } else {
-    return end;
-  }
-};
+  };
+
+  static convertGridCss(end) {
+    if (JasmineTestTool.msie) {
+      switch (end) {
+        case "auto":
+          return "1";
+        case "span 2":
+          return "2";
+        case "span 3":
+          return "3";
+        case "span 4":
+          return "4";
+        default:
+          return end;
+      }
+    } else {
+      return end;
+    }
+  };
+}
 
 TobagoTestTool.prototype = {
   action: function (func) {
@@ -229,7 +233,6 @@ export {TobagoTestTool};
 class JasmineTestTool {
 
   steps = [];
-  cycleTiming = 50;
   done;
   timeout;
   lastStepExecution;
@@ -269,18 +272,20 @@ class JasmineTestTool {
       fail("Timeout of '" + nextStep.type + "'-step: " + nextStep.func);
       nextStep.done = true;
       this.resetTimeout();
-      window.setTimeout(this.cycle.bind(this), this.cycleTiming);
+      window.setTimeout(this.cycle.bind(this), 0);
+    } else if (!this.isDocumentReady()) {
+      window.setTimeout(this.cycle.bind(this), 50);
     } else if (nextStep.type === "do") {
       nextStep.func();
       nextStep.done = true;
       this.resetTimeout();
-      window.setTimeout(this.cycle.bind(this), this.cycleTiming);
+      window.setTimeout(this.cycle.bind(this), 0);
     } else if (nextStep.type === "wait") {
       if (nextStep.func()) {
         nextStep.done = true;
         this.resetTimeout();
       }
-      window.setTimeout(this.cycle.bind(this), this.cycleTiming);
+      window.setTimeout(this.cycle.bind(this), 50);
     } else {
       fail("an unexpected error has occurred!");
       this.done();
@@ -296,6 +301,10 @@ class JasmineTestTool {
     return true;
   }
 
+  isDocumentReady() {
+    return document.getElementById("page:testframe").contentWindow.document.readyState === "complete";
+  }
+
   getNextStep() {
     for (let step of this.steps) {
       if (!step.done) {
@@ -314,4 +323,4 @@ class JasmineTestTool {
   }
 }
 
-export {JasmineTestTool};
+export {JasmineUtils, JasmineTestTool};


Mime
View raw message