1
0
Fork 0

karma test for some models, small refactoring (renaming) of ../collections/arangoStatisticsDescriptionCollection.js

This commit is contained in:
gschwab 2014-03-25 10:20:09 +01:00
parent d0189d1f9b
commit 444a84157b
12 changed files with 387 additions and 225 deletions

View File

@ -171,8 +171,8 @@
if (!server) {
this.navigate("", {trigger: true});
}
var statisticsDescription = new window.StatisticsDescription();
statisticsDescription.fetch({
var statisticsDescriptionCollection = new window.StatisticsDescriptionCollection();
statisticsDescriptionCollection.fetch({
async: false,
beforeSend: this.addAuth.bind(this)
});
@ -184,7 +184,7 @@
server.addAuth = this.addAuth.bind(this);
this.dashboardView = new window.ServerDashboardView({
collection: statisticsCollection,
description: statisticsDescription,
description: statisticsDescriptionCollection,
documentStore: new window.arangoDocuments(),
server : server,
dygraphConfig : this.dygraphConfig

View File

@ -1,6 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */
/*global require, exports, Backbone, window */
window.StatisticsDescription = Backbone.Collection.extend({
window.StatisticsDescriptionCollection = Backbone.Collection.extend({
model: window.StatisticsDescription,
url: "/_admin/statistics-description",
parse: function(response) {

View File

@ -11,18 +11,6 @@ window.arangoDocumentModel = Backbone.Model.extend({
_rev: "",
_key: ""
},
internalAttributeChanged: function (model) {
'use strict';
var a;
for (a in this.attributes) {
if (this.attributes.hasOwnProperty(a) && arangoHelper.isSystemAttribute(a)) {
if (this.attributes[a] !== model[a]) {
return true;
}
}
}
return false;
},
getSorted: function () {
'use strict';
var self = this;

View File

@ -4,9 +4,9 @@
window.Statistics = Backbone.Model.extend({
defaults: {
},
url: function() {
'use strict';
return "/_admin/statistics";
}
});

View File

@ -11,4 +11,5 @@ window.StatisticsDescription = Backbone.Model.extend({
return "/_admin/statistics-description";
}
});

View File

@ -336,9 +336,9 @@
dashboard: function() {
this.naviView.selectMenuItem('dashboard-menu');
if (this.statisticsDescription === undefined) {
this.statisticsDescription = new window.StatisticsDescription();
this.statisticsDescription.fetch({
if (this.statisticsDescriptionCollection === undefined) {
this.statisticsDescriptionCollection = new window.StatisticsDescriptionCollection();
this.statisticsDescriptionCollection.fetch({
async:false
});
}
@ -348,7 +348,7 @@
if (this.dashboardView === undefined) {
this.dashboardView = new dashboardView({
collection: this.statisticsCollection,
description: this.statisticsDescription,
description: this.statisticsDescriptionCollection,
documentStore: window.arangoDocumentsStore,
dygraphConfig : window.dygraphConfig
});

View File

@ -1,221 +1,226 @@
{ "files": [
"test/lib/jasmine-1.3.1/jasmine-html.js",
"test/lib/jslint.js",
{ "pattern": "frontend/js/templates/*.ejs", "served": true, "included": false, "watched": true},
"frontend/js/lib/jquery-2.1.0.min.js",
"frontend/js/lib/jquery-ui-1.9.2.custom.js",
"frontend/js/lib/jquery.dataTables.js",
"frontend/js/lib/jquery.autogrow.js",
"frontend/js/lib/jquery.jeditable.js",
"frontend/js/lib/jquery.jeditable.autogrow.js",
"frontend/js/lib/jquery.snippet.js",
"frontend/js/lib/jquery.slideto.min.js",
"frontend/js/lib/jquery.wiggle.min.js",
"frontend/js/lib/jquery.contextmenu.js",
"frontend/js/lib/handlebars-1.0.rc.1.js",
"frontend/js/lib/underscore.js",
"frontend/js/lib/backbone.js",
"frontend/js/lib/d3.v3.min.js",
"frontend/js/lib/nv.d3.js",
"frontend/js/lib/d3.fisheye.js",
"frontend/js/lib/ColVis.js",
"frontend/js/lib/bootstrap.js",
"frontend/js/lib/bootstrap-pagination.js",
"frontend/src/ace.js",
"frontend/js/lib/jqconsole.min.js",
"frontend/js/lib/splitter.js",
"frontend/js/lib/swagger.js",
"frontend/js/lib/swagger-ui.js",
"frontend/js/lib/highlight.7.3.pack.js",
"test/mocks/disableEJS.js",
"frontend/js/arango/arango.js",
"frontend/js/shell/browser.js",
"frontend/js/modules/org/arangodb/arango-collection-common.js",
"frontend/js/modules/org/arangodb/arango-collection.js",
"frontend/js/modules/org/arangodb/arango-database.js",
"frontend/js/modules/org/arangodb/arango-query-cursor.js",
"frontend/js/modules/org/arangodb/arango-statement-common.js",
"frontend/js/modules/org/arangodb/arango-statement.js",
"frontend/js/modules/org/arangodb/arangosh.js",
"frontend/js/modules/org/arangodb/graph-common.js",
"frontend/js/modules/org/arangodb/graph.js",
"frontend/js/modules/org/arangodb/mimetypes.js",
"frontend/js/modules/org/arangodb/simple-query-common.js",
"frontend/js/modules/org/arangodb/simple-query.js",
"frontend/js/modules/org/arangodb/aql/functions.js",
"frontend/js/modules/org/arangodb/graph/traversal.js",
"frontend/js/modules/org/arangodb-common.js",
"frontend/js/modules/org/arangodb.js",
"frontend/js/bootstrap/errors.js",
"frontend/js/bootstrap/monkeypatches.js",
"frontend/js/bootstrap/module-internal.js",
"frontend/js/client/bootstrap/module-internal.js",
"frontend/js/client/client.js",
"test/lib/jasmine-1.3.1/jasmine-html.js",
"test/lib/jslint.js",
{ "pattern": "frontend/js/templates/*.ejs", "served": true, "included": false, "watched": true},
"frontend/js/lib/jquery-2.1.0.min.js",
"frontend/js/lib/jquery-ui-1.9.2.custom.js",
"frontend/js/lib/jquery.dataTables.js",
"frontend/js/lib/jquery.autogrow.js",
"frontend/js/lib/jquery.jeditable.js",
"frontend/js/lib/jquery.jeditable.autogrow.js",
"frontend/js/lib/jquery.snippet.js",
"frontend/js/lib/jquery.slideto.min.js",
"frontend/js/lib/jquery.wiggle.min.js",
"frontend/js/lib/jquery.contextmenu.js",
"frontend/js/lib/handlebars-1.0.rc.1.js",
"frontend/js/lib/underscore.js",
"frontend/js/lib/backbone.js",
"frontend/js/lib/d3.v3.min.js",
"frontend/js/lib/nv.d3.js",
"frontend/js/lib/d3.fisheye.js",
"frontend/js/lib/ColVis.js",
"frontend/js/lib/bootstrap.js",
"frontend/js/lib/bootstrap-pagination.js",
"frontend/src/ace.js",
"frontend/js/lib/jqconsole.min.js",
"frontend/js/lib/splitter.js",
"frontend/js/lib/swagger.js",
"frontend/js/lib/swagger-ui.js",
"frontend/js/lib/highlight.7.3.pack.js",
"test/mocks/disableEJS.js",
"frontend/js/arango/arango.js",
"frontend/js/shell/browser.js",
"frontend/js/modules/org/arangodb/arango-collection-common.js",
"frontend/js/modules/org/arangodb/arango-collection.js",
"frontend/js/modules/org/arangodb/arango-database.js",
"frontend/js/modules/org/arangodb/arango-query-cursor.js",
"frontend/js/modules/org/arangodb/arango-statement-common.js",
"frontend/js/modules/org/arangodb/arango-statement.js",
"frontend/js/modules/org/arangodb/arangosh.js",
"frontend/js/modules/org/arangodb/graph-common.js",
"frontend/js/modules/org/arangodb/graph.js",
"frontend/js/modules/org/arangodb/mimetypes.js",
"frontend/js/modules/org/arangodb/simple-query-common.js",
"frontend/js/modules/org/arangodb/simple-query.js",
"frontend/js/modules/org/arangodb/aql/functions.js",
"frontend/js/modules/org/arangodb/graph/traversal.js",
"frontend/js/modules/org/arangodb-common.js",
"frontend/js/modules/org/arangodb.js",
"frontend/js/bootstrap/errors.js",
"frontend/js/bootstrap/monkeypatches.js",
"frontend/js/bootstrap/module-internal.js",
"frontend/js/client/bootstrap/module-internal.js",
"frontend/js/client/client.js",
"test/specs/graphViewer/helper/eventHelper.js",
"test/specs/graphViewer/helper/objectsHelper.js",
"test/specs/graphViewer/helper/mocks.js",
"test/specs/graphViewer/helper/commMock.js",
"test/specs/graphViewer/helper/uiMatchers.js",
"test/specs/graphViewer/helper/eventHelper.js",
"test/specs/graphViewer/helper/objectsHelper.js",
"test/specs/graphViewer/helper/mocks.js",
"test/specs/graphViewer/helper/commMock.js",
"test/specs/graphViewer/helper/uiMatchers.js",
"frontend/js/graphViewer/graphViewer.js",
"frontend/js/graphViewer/graph/domObserverFactory.js",
"frontend/js/graphViewer/graph/colourMapper.js",
"frontend/js/graphViewer/graph/communityNode.js",
"frontend/js/graphViewer/graph/webWorkerWrapper.js",
"frontend/js/graphViewer/graph/nodeShaper.js",
"frontend/js/graphViewer/graph/abstractAdapter.js",
"frontend/js/graphViewer/graph/JSONAdapter.js",
"frontend/js/graphViewer/graph/arangoAdapter.js",
"frontend/js/graphViewer/graph/foxxAdapter.js",
"frontend/js/graphViewer/graph/previewAdapter.js",
"frontend/js/graphViewer/graph/edgeShaper.js",
"frontend/js/graphViewer/graph/forceLayouter.js",
"frontend/js/graphViewer/graph/eventDispatcher.js",
"frontend/js/graphViewer/graph/eventLibrary.js",
"frontend/js/graphViewer/graph/zoomManager.js",
"frontend/js/graphViewer/graph/nodeReducer.js",
"frontend/js/graphViewer/graph/modularityJoiner.js",
"frontend/js/graphViewer/graphViewer.js",
"frontend/js/graphViewer/graph/domObserverFactory.js",
"frontend/js/graphViewer/graph/colourMapper.js",
"frontend/js/graphViewer/graph/communityNode.js",
"frontend/js/graphViewer/graph/webWorkerWrapper.js",
"frontend/js/graphViewer/graph/nodeShaper.js",
"frontend/js/graphViewer/graph/abstractAdapter.js",
"frontend/js/graphViewer/graph/JSONAdapter.js",
"frontend/js/graphViewer/graph/arangoAdapter.js",
"frontend/js/graphViewer/graph/foxxAdapter.js",
"frontend/js/graphViewer/graph/previewAdapter.js",
"frontend/js/graphViewer/graph/edgeShaper.js",
"frontend/js/graphViewer/graph/forceLayouter.js",
"frontend/js/graphViewer/graph/eventDispatcher.js",
"frontend/js/graphViewer/graph/eventLibrary.js",
"frontend/js/graphViewer/graph/zoomManager.js",
"frontend/js/graphViewer/graph/nodeReducer.js",
"frontend/js/graphViewer/graph/modularityJoiner.js",
"frontend/js/graphViewer/ui/modalDialogHelper.js",
"frontend/js/graphViewer/ui/contextMenuHelper.js",
"frontend/js/graphViewer/ui/nodeShaperControls.js",
"frontend/js/graphViewer/ui/edgeShaperControls.js",
"frontend/js/graphViewer/ui/arangoAdapterControls.js",
"frontend/js/graphViewer/ui/layouterControls.js",
"frontend/js/graphViewer/ui/uiComponentsHelper.js",
"frontend/js/graphViewer/ui/eventDispatcherControls.js",
"frontend/js/graphViewer/ui/graphViewerUI.js",
"frontend/js/graphViewer/ui/graphViewerWidget.js",
"frontend/js/graphViewer/ui/graphViewerPreview.js",
"frontend/js/graphViewer/ui/modalDialogHelper.js",
"frontend/js/graphViewer/ui/contextMenuHelper.js",
"frontend/js/graphViewer/ui/nodeShaperControls.js",
"frontend/js/graphViewer/ui/edgeShaperControls.js",
"frontend/js/graphViewer/ui/arangoAdapterControls.js",
"frontend/js/graphViewer/ui/layouterControls.js",
"frontend/js/graphViewer/ui/uiComponentsHelper.js",
"frontend/js/graphViewer/ui/eventDispatcherControls.js",
"frontend/js/graphViewer/ui/graphViewerUI.js",
"frontend/js/graphViewer/ui/graphViewerWidget.js",
"frontend/js/graphViewer/ui/graphViewerPreview.js",
"frontend/js/models/currentDatabase.js",
"frontend/js/models/arangoCollection.js",
"frontend/js/models/arangoDatabase.js",
"frontend/js/models/arangoDocument.js",
"frontend/js/models/arangoLog.js",
"frontend/js/models/arangoStatistics.js",
"frontend/js/models/arangoStatisticsDescription.js",
"frontend/js/models/foxx.js",
"frontend/js/models/notification.js",
"frontend/js/models/graph.js",
"clusterFrontend/js/models/clusterServer.js",
"clusterFrontend/js/models/clusterCoordinator.js",
"clusterFrontend/js/models/clusterDatabase.js",
"clusterFrontend/js/models/clusterCollection.js",
"clusterFrontend/js/models/clusterShard.js",
"frontend/js/models/currentDatabase.js",
"frontend/js/models/arangoCollection.js",
"frontend/js/models/arangoDatabase.js",
"frontend/js/models/arangoDocument.js",
"frontend/js/models/arangoLog.js",
"frontend/js/models/arangoStatistics.js",
"frontend/js/models/arangoStatisticsDescription.js",
"frontend/js/models/foxx.js",
"frontend/js/models/notification.js",
"frontend/js/models/graph.js",
"clusterFrontend/js/models/clusterServer.js",
"clusterFrontend/js/models/clusterCoordinator.js",
"clusterFrontend/js/models/clusterDatabase.js",
"clusterFrontend/js/models/clusterCollection.js",
"clusterFrontend/js/models/clusterShard.js",
"frontend/js/collections/arangoCollections.js",
"frontend/js/collections/arangoDocuments.js",
"frontend/js/collections/arangoDocument.js",
"frontend/js/collections/arangoDatabase.js",
"frontend/js/collections/arangoLogs.js",
"frontend/js/collections/arangoUsers.js",
"frontend/js/collections/arangoStatisticsCollection.js",
"frontend/js/collections/arangoStatisticsDescriptionCollection.js",
"frontend/js/collections/foxxCollection.js",
"frontend/js/collections/graphCollection.js",
"clusterFrontend/js/collections/clusterServers.js",
"clusterFrontend/js/collections/clusterCoordinators.js",
"clusterFrontend/js/collections/clusterDatabases.js",
"clusterFrontend/js/collections/clusterCollections.js",
"clusterFrontend/js/collections/clusterShards.js",
"frontend/js/collections/notificationCollection.js",
"frontend/js/collections/arangoCollections.js",
"frontend/js/collections/arangoDocuments.js",
"frontend/js/collections/arangoDocument.js",
"frontend/js/collections/arangoDatabase.js",
"frontend/js/collections/arangoLogs.js",
"frontend/js/collections/arangoUsers.js",
"frontend/js/collections/arangoStatisticsCollection.js",
"frontend/js/collections/arangoStatisticsDescriptionCollection.js",
"frontend/js/collections/foxxCollection.js",
"frontend/js/collections/graphCollection.js",
"clusterFrontend/js/collections/clusterServers.js",
"clusterFrontend/js/collections/clusterCoordinators.js",
"clusterFrontend/js/collections/clusterDatabases.js",
"clusterFrontend/js/collections/clusterCollections.js",
"clusterFrontend/js/collections/clusterShards.js",
"frontend/js/collections/notificationCollection.js",
"frontend/js/views/navigationView.js",
"frontend/js/views/notificationView.js",
"frontend/js/views/apiView.js",
"frontend/js/views/footerView.js",
"frontend/js/views/queryView.js",
"frontend/js/views/shellView.js",
"frontend/js/views/dashboardView.js",
"frontend/js/views/collectionsView.js",
"frontend/js/views/collectionView.js",
"frontend/js/views/collectionInfoView.js",
"frontend/js/views/newCollectionView.js",
"frontend/js/views/collectionsItemView.js",
"frontend/js/views/documentsView.js",
"frontend/js/views/documentView.js",
"frontend/js/views/logsView.js",
"frontend/js/views/applicationsView.js",
"frontend/js/views/foxxActiveView.js",
"frontend/js/views/foxxInstalledView.js",
"frontend/js/views/foxxEditView.js",
"frontend/js/views/foxxMountView.js",
"frontend/js/views/appDocumentationView.js",
"frontend/js/views/graphView.js",
"frontend/js/views/graphManagementView.js",
"frontend/js/views/addNewGraphView.js",
"frontend/js/views/deleteGraphView.js",
"frontend/js/views/dbSelectionView.js",
"frontend/js/views/editListEntryView.js",
"frontend/js/views/loginView.js",
"frontend/js/views/clusterDashboardView.js",
"frontend/js/views/clusterOverviewView.js",
"frontend/js/views/clusterServerView.js",
"frontend/js/views/clusterCoordinatorView.js",
"frontend/js/views/clusterDatabaseView.js",
"frontend/js/views/clusterCollectionView.js",
"frontend/js/views/clusterShardsView.js",
"frontend/js/views/navigationView.js",
"frontend/js/views/notificationView.js",
"frontend/js/views/apiView.js",
"frontend/js/views/footerView.js",
"frontend/js/views/queryView.js",
"frontend/js/views/shellView.js",
"frontend/js/views/dashboardView.js",
"frontend/js/views/collectionsView.js",
"frontend/js/views/collectionView.js",
"frontend/js/views/collectionInfoView.js",
"frontend/js/views/newCollectionView.js",
"frontend/js/views/collectionsItemView.js",
"frontend/js/views/documentsView.js",
"frontend/js/views/documentView.js",
"frontend/js/views/logsView.js",
"frontend/js/views/applicationsView.js",
"frontend/js/views/foxxActiveView.js",
"frontend/js/views/foxxInstalledView.js",
"frontend/js/views/foxxEditView.js",
"frontend/js/views/foxxMountView.js",
"frontend/js/views/appDocumentationView.js",
"frontend/js/views/graphView.js",
"frontend/js/views/graphManagementView.js",
"frontend/js/views/addNewGraphView.js",
"frontend/js/views/deleteGraphView.js",
"frontend/js/views/dbSelectionView.js",
"frontend/js/views/editListEntryView.js",
"frontend/js/views/loginView.js",
"frontend/js/views/clusterDashboardView.js",
"frontend/js/views/clusterOverviewView.js",
"frontend/js/views/clusterServerView.js",
"frontend/js/views/clusterCoordinatorView.js",
"frontend/js/views/clusterDatabaseView.js",
"frontend/js/views/clusterCollectionView.js",
"frontend/js/views/clusterShardsView.js",
"frontend/js/views/statisticBarView.js",
"frontend/js/views/userBarView.js",
"frontend/js/views/statisticBarView.js",
"frontend/js/views/userBarView.js",
"clusterFrontend/js/views/planScenarioSelectorView.js",
"clusterFrontend/js/views/planSymmetricView.js",
"clusterFrontend/js/views/planTestView.js",
"clusterFrontend/js/views/planScenarioSelectorView.js",
"clusterFrontend/js/views/planSymmetricView.js",
"clusterFrontend/js/views/planTestView.js",
"clusterFrontend/js/views/showClusterView.js",
"clusterFrontend/js/views/showClusterView.js",
"frontend/js/routers/router.js",
"clusterFrontend/js/routers/clusterRouter.js",
"frontend/js/routers/router.js",
"clusterFrontend/js/routers/clusterRouter.js",
"test/specs/graphViewer/specColourMapper/colourMapperSpec.js",
"test/specs/graphViewer/specWindowObjects/domObserverFactorySpec.js",
"test/specs/graphViewer/specCommunityNode/communityNodeSpec.js",
"test/specs/graphViewer/specAdapter/interfaceSpec.js",
"test/specs/graphViewer/specAdapter/abstractAdapterSpec.js",
"test/specs/graphViewer/specAdapter/jsonAdapterSpec.js",
"test/specs/graphViewer/specAdapter/arangoAdapterSpec.js",
"test/specs/graphViewer/specAdapter/foxxAdapterSpec.js",
"test/specs/graphViewer/specAdapter/previewAdapterSpec.js",
"test/specs/graphViewer/specAdapter/arangoAdapterUISpec.js",
"test/specs/graphViewer/specNodeShaper/nodeShaperSpec.js",
"test/specs/graphViewer/specNodeShaper/nodeShaperUISpec.js",
"test/specs/graphViewer/specEdgeShaper/edgeShaperSpec.js",
"test/specs/graphViewer/specEdgeShaper/edgeShaperUISpec.js",
"test/specs/graphViewer/specForceLayouter/forceLayouterSpec.js",
"test/specs/graphViewer/specForceLayouter/forceLayouterUISpec.js",
"test/specs/graphViewer/specEvents/eventLibrarySpec.js",
"test/specs/graphViewer/specEvents/eventDispatcherSpec.js",
"test/specs/graphViewer/specEvents/eventDispatcherUISpec.js",
"test/specs/graphViewer/specZoomManager/zoomManagerSpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerSpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerUISpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerWidgetSpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerPreviewSpec.js",
"test/specs/graphViewer/specNodeReducer/nodeReducerSpec.js",
"test/specs/graphViewer/specContextMenu/contextMenuSpec.js",
"test/specs/arango/arangoSpec.js",
"test/specs/graphViewer/specColourMapper/colourMapperSpec.js",
"test/specs/graphViewer/specWindowObjects/domObserverFactorySpec.js",
"test/specs/graphViewer/specCommunityNode/communityNodeSpec.js",
"test/specs/graphViewer/specAdapter/interfaceSpec.js",
"test/specs/graphViewer/specAdapter/abstractAdapterSpec.js",
"test/specs/graphViewer/specAdapter/jsonAdapterSpec.js",
"test/specs/graphViewer/specAdapter/arangoAdapterSpec.js",
"test/specs/graphViewer/specAdapter/foxxAdapterSpec.js",
"test/specs/graphViewer/specAdapter/previewAdapterSpec.js",
"test/specs/graphViewer/specAdapter/arangoAdapterUISpec.js",
"test/specs/graphViewer/specNodeShaper/nodeShaperSpec.js",
"test/specs/graphViewer/specNodeShaper/nodeShaperUISpec.js",
"test/specs/graphViewer/specEdgeShaper/edgeShaperSpec.js",
"test/specs/graphViewer/specEdgeShaper/edgeShaperUISpec.js",
"test/specs/graphViewer/specForceLayouter/forceLayouterSpec.js",
"test/specs/graphViewer/specForceLayouter/forceLayouterUISpec.js",
"test/specs/graphViewer/specEvents/eventLibrarySpec.js",
"test/specs/graphViewer/specEvents/eventDispatcherSpec.js",
"test/specs/graphViewer/specEvents/eventDispatcherUISpec.js",
"test/specs/graphViewer/specZoomManager/zoomManagerSpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerSpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerUISpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerWidgetSpec.js",
"test/specs/graphViewer/specGraphViewer/graphViewerPreviewSpec.js",
"test/specs/graphViewer/specNodeReducer/nodeReducerSpec.js",
"test/specs/graphViewer/specContextMenu/contextMenuSpec.js",
"test/specs/arango/arangoSpec.js",
"test/specs/models/currentDatabaseSpec.js",
"test/specs/models/graphSpec.js",
"test/specs/models/currentDatabaseSpec.js",
"test/specs/models/graphSpec.js",
"test/specs/models/arangoCollectionSpec.js",
"test/specs/models/arangoDatabaseSpec.js",
"test/specs/models/arangoDocumentSpec.js",
"test/specs/models/arangoStatisticsDescriptionSpec.js",
"test/specs/models/arangoStatisticsSpec.js",
"test/specs/collections/clusterServersSpec.js",
"test/specs/collections/clusterDatabasesSpec.js",
"test/specs/collections/clusterCollectionsSpec.js",
"test/specs/collections/clusterShardsSpec.js",
"test/specs/collections/clusterServersSpec.js",
"test/specs/collections/clusterDatabasesSpec.js",
"test/specs/collections/clusterCollectionsSpec.js",
"test/specs/collections/clusterShardsSpec.js",
"test/specs/views/editListEntryViewSpec.js",
"test/specs/views/collectionViewSpec.js",
"test/specs/views/collectionsViewSpec.js",
"test/specs/views/foxxEditViewSpec.js",
"test/specs/views/dbSelectionViewSpec.js",
"test/specs/views/navigationViewSpec.js",
"test/specs/views/graphViewSpec.js",
"test/specs/views/graphManagementViewSpec.js",
"test/specs/views/addNewGraphViewSpec.js",
"test/specs/router/routerSpec.js"
]
"test/specs/views/editListEntryViewSpec.js",
"test/specs/views/collectionViewSpec.js",
"test/specs/views/collectionsViewSpec.js",
"test/specs/views/foxxEditViewSpec.js",
"test/specs/views/dbSelectionViewSpec.js",
"test/specs/views/navigationViewSpec.js",
"test/specs/views/graphViewSpec.js",
"test/specs/views/graphManagementViewSpec.js",
"test/specs/views/addNewGraphViewSpec.js",
"test/specs/router/routerSpec.js"
]
}

View File

@ -0,0 +1,48 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
/*global $*/
(function() {
"use strict";
describe("Arango Collection Model", function() {
var myCollection = new window.arangoCollection();
it("verifies urlRoot", function() {
expect(myCollection.urlRoot).toEqual('/_api/collection');
});
});
describe("Arango Database Model", function() {
it("verifies defaults", function() {
var myCollection = new window.arangoCollection();
expect(myCollection.get('id')).toEqual('');
expect(myCollection.get('name')).toEqual('');
expect(myCollection.get('status')).toEqual('');
expect(myCollection.get('type')).toEqual('');
expect(myCollection.isSystem).toBeFalsy();
expect(myCollection.get('picture')).toEqual('');
});
});
describe("Arango Database Model", function() {
it("verifies set defaults", function() {
var name = 'blub',
status = 'active',
type = 'myType',
myCollection = new window.arangoCollection(
{
name : name,
status : status,
type : type
}
);
expect(myCollection.get('id')).toEqual('');
expect(myCollection.get('name')).toEqual(name);
expect(myCollection.get('status')).toEqual(status);
expect(myCollection.get('type')).toEqual(type);
expect(myCollection.isSystem).toBeFalsy();
expect(myCollection.get('picture')).toEqual('');
});
});
}());

View File

@ -0,0 +1,22 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
/*global $*/
(function() {
"use strict";
describe("Arango Database Model", function() {
it("verifies isNew", function() {
var myDatabase = new window.Database();
expect(myDatabase.isNew()).toBeFalsy();
});
});
describe("Arango Database Model", function() {
it("verifies url", function() {
var myDatabase = new window.Database();
expect(myDatabase.url).toEqual("/_api/database");
});
});
}());

View File

@ -0,0 +1,66 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
/*global $*/
(function() {
"use strict";
describe("Arango Document Model", function() {
var myDocument = new window.arangoDocumentModel();
it("verifies urlRoot", function() {
expect(myDocument.urlRoot).toEqual('/_api/document');
});
});
describe("Arango Document Model", function() {
it("verifies defaults", function() {
var myDocument = new window.arangoDocumentModel();
expect(myDocument.get('_id')).toEqual('');
expect(myDocument.get('_rev')).toEqual('');
expect(myDocument.get('_key')).toEqual('');
});
});
describe("Arango Document Model", function() {
it("verifies set defaults", function() {
var id = 'myID',
rev = 'myRev',
key = 'myKey',
myDocument = new window.arangoDocumentModel(
{
_id : id,
_rev : rev,
_key : key
}
);
expect(myDocument.get('_id')).toEqual(id);
expect(myDocument.get('_rev')).toEqual(rev);
expect(myDocument.get('_key')).toEqual(key);
});
});
describe("Arango Document Model", function() {
it("verifies getSorted", function() {
var id = 'myID',
rev = 'myRev',
key = 'myKey',
myDocument = new window.arangoDocumentModel(
{
c : 'c',
_id : id,
_rev : rev,
_key : key,
b : 'b',
a : 'a'
}
);
expect(myDocument.getSorted()).toEqual(
{
_id: id, _key: key, _rev: rev, a: 'a', b: 'b', c: 'c'
}
);
});
});
}());

View File

@ -0,0 +1,16 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
/*global $*/
(function() {
"use strict";
describe("Arango Statistics Model", function() {
it("verifies url", function() {
var myStatisticsDescription = new window.StatisticsDescription();
expect(myStatisticsDescription.url())
.toEqual("/_admin/statistics-description");
});
});
}());

View File

@ -0,0 +1,16 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
/*global $*/
(function() {
"use strict";
describe("Arango Statistics Model", function() {
it("verifies url", function() {
var myStatistics = new window.Statistics();
expect(myStatistics.url())
.toEqual("/_admin/statistics");
});
});
}());