diff --git a/html/admin/js/graphViewer/graph/foxxAdapter.js b/html/admin/js/graphViewer/graph/foxxAdapter.js index d86d6871b8..94f5e1efcd 100644 --- a/html/admin/js/graphViewer/graph/foxxAdapter.js +++ b/html/admin/js/graphViewer/graph/foxxAdapter.js @@ -40,9 +40,7 @@ function FoxxAdapter(nodes, edges, route, config) { if (route === undefined) { throw "The route has to be given."; } - - var self = this, absAdapter = new AbstractAdapter(nodes, edges), routes = {}, diff --git a/html/admin/js/graphViewer/graphViewer.js b/html/admin/js/graphViewer/graphViewer.js index cbcec9a334..e2cda91728 100644 --- a/html/admin/js/graphViewer/graphViewer.js +++ b/html/admin/js/graphViewer/graphViewer.js @@ -1,6 +1,6 @@ /*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true */ /*global _*/ -/*global ArangoAdapter, JSONAdapter */ +/*global ArangoAdapter, JSONAdapter, FoxxAdapter */ /*global ForceLayouter, EdgeShaper, NodeShaper, ZoomManager */ //////////////////////////////////////////////////////////////////////////////// /// @brief Graph functionality diff --git a/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerSpec.js b/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerSpec.js index 4dc6c49423..e53058edf2 100644 --- a/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerSpec.js +++ b/html/admin/js/graphViewer/jasmine_test/specGraphViewer/graphViewerSpec.js @@ -113,6 +113,19 @@ describe("Graph Viewer", function() { ).not.toThrow(); }); + it('should be able to be setup with a foxx adapter', function() { + var route = "foxx/route", + adapterConfig = {type: "foxx", route: route}, + gv; + spyOn(window, "FoxxAdapter"); + gv = new GraphViewer(svg, 10, 10, adapterConfig); + expect(window.FoxxAdapter).wasCalledWith( + jasmine.any(Array), + jasmine.any(Array), + route, + jasmine.any(Object) + ); + }); });