diff --git a/mindplot/src/test/javascript/static/layout.html b/mindplot/src/test/javascript/static/layout.html
index 2536fae5..2fd62416 100644
--- a/mindplot/src/test/javascript/static/layout.html
+++ b/mindplot/src/test/javascript/static/layout.html
@@ -115,6 +115,9 @@
+
+ testBalancedSingleNodePredict
+
diff --git a/mindplot/src/test/javascript/static/test/BalancedTestSuite.js b/mindplot/src/test/javascript/static/test/BalancedTestSuite.js
index 0c020362..8fa82d9e 100644
--- a/mindplot/src/test/javascript/static/test/BalancedTestSuite.js
+++ b/mindplot/src/test/javascript/static/test/BalancedTestSuite.js
@@ -23,6 +23,7 @@ mindplot.layout.BalancedTestSuite = new Class({
this.testBalanced();
this.testBalancedPredict();
+ this.testBalancedSingleNodePredict();
},
testBalanced: function() {
@@ -151,7 +152,7 @@ mindplot.layout.BalancedTestSuite = new Class({
},
testBalancedPredict: function() {
- console.log("testBalancedPredict");
+ console.log("testBalancedPredict:");
var position = {x:0, y:0};
var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE);
@@ -273,5 +274,18 @@ mindplot.layout.BalancedTestSuite = new Class({
$assert(prediction5a.order == prediction5b.order, "Both predictions should be the same");
console.log("OK!\n\n");
+ },
+
+ testBalancedSingleNodePredict: function() {
+ console.log("testBalancedSingleNodePredict:");
+ var position = {x:0, y:0};
+ var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE);
+
+ manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position).connectNode(0,1,0);
+ manager.layout();
+ var graph = manager.plot("testBalancedSingleNodePredict1", {width:800, height:400});
+
+ var prediction1 = manager.predict(0, {x:50, y:50});
+ this._plotPrediction(graph, prediction1);
}
});
\ No newline at end of file