1
0
Fork 0

GraphViewer: Added test for reshaping if community is formed

This commit is contained in:
Michael Hackstein 2013-05-21 14:02:43 +02:00
parent bb92f2ee29
commit 7ced744d21
2 changed files with 10 additions and 1 deletions

View File

@ -85,7 +85,7 @@ function GraphViewer(svg, width, height, adapterConfig, config) {
},
nodeLimitCallBack = function(limit) {
self.adapter.setNodeLimit(limit);
self.adapter.setNodeLimit(limit, self.start);
},
parseZoomConfig = function(config) {

View File

@ -270,6 +270,15 @@ describe("Graph Viewer", function() {
expect(viewer.adapter.setNodeLimit).wasCalled();
});
it('should trigger the start function if node limit is reduced to far', function() {
spyOn(viewer.adapter, "setNodeLimit").andCallFake(function(l, callback) {
callback();
});
spyOn(viewer, "start");
helper.simulateScrollUpMouseEvent("outersvg");
expect(viewer.start).wasCalled();
});
});