Upgrade the testing framework to allow multiple tests

This commit is contained in:
Caleb James DeLisle
2017-12-20 18:36:53 +01:00
parent d54a010bf4
commit c928be028a
4 changed files with 58 additions and 9 deletions

View File

@@ -74,6 +74,15 @@ define([
var contentContainer = options.contentContainer ||
(function () { throw new Error("contentContainer must be specified"); }());
Test(function (t) {
console.log("Here is the test");
evOnReady.reg(function () {
cpNfInner.chainpad.onSettle(function () {
console.log("The test has passed")
t.pass();
});
});
});
var titleRecommender = function () { return false; };
var contentGetter = function () { return UNINITIALIZED; };
@@ -294,12 +303,6 @@ define([
if (newPad && !AppConfig.displayCreationScreen) {
common.openTemplatePicker();
}
Test(function () {
cpNfInner.chainpad.onSettle(function () {
Test.passed();
});
});
};
var onConnectionChange = function (info) {
stateChange(info.state ? STATE.INITIALIZING : STATE.DISCONNECTED);