Experimental unit tests for the Telemetry Table component (#2533)
* Initial commit of telemetry table spec * Added example directory to linter paths. Fixed outstanding linting issues
This commit is contained in:
@@ -49,8 +49,7 @@ define([
|
||||
"./src/services/Now",
|
||||
"./src/services/Throttle",
|
||||
"./src/services/Topic",
|
||||
"./src/services/Instantiate",
|
||||
'legacyRegistry'
|
||||
"./src/services/Instantiate"
|
||||
], function (
|
||||
DomainObjectProvider,
|
||||
CoreCapabilityProvider,
|
||||
@@ -80,312 +79,314 @@ define([
|
||||
Now,
|
||||
Throttle,
|
||||
Topic,
|
||||
Instantiate,
|
||||
legacyRegistry
|
||||
Instantiate
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/core", {
|
||||
"name": "Open MCT Core",
|
||||
"description": "Defines core concepts of Open MCT.",
|
||||
"sources": "src",
|
||||
"configuration": {
|
||||
"paths": {
|
||||
"uuid": "uuid"
|
||||
}
|
||||
},
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "objectService",
|
||||
"type": "provider",
|
||||
"implementation": DomainObjectProvider,
|
||||
"depends": [
|
||||
"modelService",
|
||||
"instantiate"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "capabilityService",
|
||||
"type": "provider",
|
||||
"implementation": CoreCapabilityProvider,
|
||||
"depends": [
|
||||
"capabilities[]",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "provider",
|
||||
"implementation": StaticModelProvider,
|
||||
"depends": [
|
||||
"models[]",
|
||||
"$q",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "aggregator",
|
||||
"implementation": ModelAggregator,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "provider",
|
||||
"implementation": PersistedModelProvider,
|
||||
"depends": [
|
||||
"persistenceService",
|
||||
"$q",
|
||||
"now",
|
||||
"PERSISTENCE_SPACE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "decorator",
|
||||
"implementation": CachingModelDecorator,
|
||||
"depends": [
|
||||
"cacheService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "decorator",
|
||||
"priority": "fallback",
|
||||
"implementation": MissingModelDecorator
|
||||
},
|
||||
{
|
||||
"provides": "typeService",
|
||||
"type": "provider",
|
||||
"implementation": TypeProvider,
|
||||
"depends": [
|
||||
"types[]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "actionService",
|
||||
"type": "provider",
|
||||
"implementation": ActionProvider,
|
||||
"depends": [
|
||||
"actions[]",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "actionService",
|
||||
"type": "aggregator",
|
||||
"implementation": ActionAggregator
|
||||
},
|
||||
{
|
||||
"provides": "actionService",
|
||||
"type": "decorator",
|
||||
"implementation": LoggingActionDecorator,
|
||||
"depends": [
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "viewService",
|
||||
"type": "provider",
|
||||
"implementation": ViewProvider,
|
||||
"depends": [
|
||||
"views[]",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "identifierService",
|
||||
"type": "provider",
|
||||
"implementation": IdentifierProvider,
|
||||
"depends": [
|
||||
"PERSISTENCE_SPACE"
|
||||
]
|
||||
return {
|
||||
name:"platform/core",
|
||||
definition: {
|
||||
"name": "Open MCT Core",
|
||||
"description": "Defines core concepts of Open MCT.",
|
||||
"sources": "src",
|
||||
"configuration": {
|
||||
"paths": {
|
||||
"uuid": "uuid"
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"control": "textfield",
|
||||
"name": "Title",
|
||||
"key": "name",
|
||||
"property": "name",
|
||||
"pattern": "\\S+",
|
||||
"required": true,
|
||||
"cssClass": "l-input-lg"
|
||||
},
|
||||
{
|
||||
"name": "Notes",
|
||||
"key": "notes",
|
||||
"property": "notes",
|
||||
"control": "textarea",
|
||||
"required": false,
|
||||
"cssClass": "l-textarea-sm"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "root",
|
||||
"name": "Root",
|
||||
"cssClass": "icon-folder"
|
||||
},
|
||||
{
|
||||
"key": "folder",
|
||||
"name": "Folder",
|
||||
"cssClass": "icon-folder",
|
||||
"features": "creation",
|
||||
"description": "Create folders to organize other objects or links to objects.",
|
||||
"priority": 1000,
|
||||
"model": {
|
||||
"composition": []
|
||||
},
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "objectService",
|
||||
"type": "provider",
|
||||
"implementation": DomainObjectProvider,
|
||||
"depends": [
|
||||
"modelService",
|
||||
"instantiate"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "capabilityService",
|
||||
"type": "provider",
|
||||
"implementation": CoreCapabilityProvider,
|
||||
"depends": [
|
||||
"capabilities[]",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "provider",
|
||||
"implementation": StaticModelProvider,
|
||||
"depends": [
|
||||
"models[]",
|
||||
"$q",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "aggregator",
|
||||
"implementation": ModelAggregator,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "provider",
|
||||
"implementation": PersistedModelProvider,
|
||||
"depends": [
|
||||
"persistenceService",
|
||||
"$q",
|
||||
"now",
|
||||
"PERSISTENCE_SPACE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "decorator",
|
||||
"implementation": CachingModelDecorator,
|
||||
"depends": [
|
||||
"cacheService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "modelService",
|
||||
"type": "decorator",
|
||||
"priority": "fallback",
|
||||
"implementation": MissingModelDecorator
|
||||
},
|
||||
{
|
||||
"provides": "typeService",
|
||||
"type": "provider",
|
||||
"implementation": TypeProvider,
|
||||
"depends": [
|
||||
"types[]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "actionService",
|
||||
"type": "provider",
|
||||
"implementation": ActionProvider,
|
||||
"depends": [
|
||||
"actions[]",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "actionService",
|
||||
"type": "aggregator",
|
||||
"implementation": ActionAggregator
|
||||
},
|
||||
{
|
||||
"provides": "actionService",
|
||||
"type": "decorator",
|
||||
"implementation": LoggingActionDecorator,
|
||||
"depends": [
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "viewService",
|
||||
"type": "provider",
|
||||
"implementation": ViewProvider,
|
||||
"depends": [
|
||||
"views[]",
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "identifierService",
|
||||
"type": "provider",
|
||||
"implementation": IdentifierProvider,
|
||||
"depends": [
|
||||
"PERSISTENCE_SPACE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "unknown",
|
||||
"name": "Unknown Type",
|
||||
"cssClass": "icon-object-unknown"
|
||||
},
|
||||
{
|
||||
"name": "Unknown Type",
|
||||
"cssClass": "icon-object-unknown"
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
{
|
||||
"key": "composition",
|
||||
"implementation": CompositionCapability,
|
||||
"depends": [
|
||||
"$injector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "relationship",
|
||||
"implementation": RelationshipCapability,
|
||||
"depends": [
|
||||
"$injector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "type",
|
||||
"implementation": TypeCapability,
|
||||
"depends": [
|
||||
"typeService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "action",
|
||||
"implementation": ActionCapability,
|
||||
"depends": [
|
||||
"$q",
|
||||
"actionService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "view",
|
||||
"implementation": ViewCapability,
|
||||
"depends": [
|
||||
"viewService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "persistence",
|
||||
"implementation": PersistenceCapability,
|
||||
"depends": [
|
||||
"cacheService",
|
||||
"persistenceService",
|
||||
"identifierService",
|
||||
"notificationService",
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "metadata",
|
||||
"implementation": MetadataCapability
|
||||
},
|
||||
{
|
||||
"key": "mutation",
|
||||
"implementation": MutationCapability,
|
||||
"depends": [
|
||||
"topic",
|
||||
"now"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "delegation",
|
||||
"implementation": DelegationCapability,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "instantiation",
|
||||
"implementation": InstantiationCapability,
|
||||
"depends": [
|
||||
"$injector",
|
||||
"identifierService",
|
||||
"now"
|
||||
]
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "cacheService",
|
||||
"implementation": ModelCacheService
|
||||
},
|
||||
{
|
||||
"key": "now",
|
||||
"implementation": Now
|
||||
},
|
||||
{
|
||||
"key": "throttle",
|
||||
"implementation": Throttle,
|
||||
"depends": [
|
||||
"$timeout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "topic",
|
||||
"implementation": Topic,
|
||||
"depends": [
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "instantiate",
|
||||
"implementation": Instantiate,
|
||||
"depends": [
|
||||
"capabilityService",
|
||||
"identifierService",
|
||||
"cacheService"
|
||||
]
|
||||
}
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"implementation": TransactingMutationListener,
|
||||
"depends": ["topic", "transactionService", "cacheService"]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"name": "Math.uuid.js",
|
||||
"version": "1.4.7",
|
||||
"description": "Unique identifer generation (code adapted.)",
|
||||
"author": "Robert Kieffer",
|
||||
"website": "https://github.com/broofa/node-uuid",
|
||||
"copyright": "Copyright (c) 2010-2012 Robert Kieffer",
|
||||
"license": "license-mit",
|
||||
"link": "http://opensource.org/licenses/MIT"
|
||||
}
|
||||
]
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"control": "textfield",
|
||||
"name": "Title",
|
||||
"key": "name",
|
||||
"property": "name",
|
||||
"pattern": "\\S+",
|
||||
"required": true,
|
||||
"cssClass": "l-input-lg"
|
||||
},
|
||||
{
|
||||
"name": "Notes",
|
||||
"key": "notes",
|
||||
"property": "notes",
|
||||
"control": "textarea",
|
||||
"required": false,
|
||||
"cssClass": "l-textarea-sm"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "root",
|
||||
"name": "Root",
|
||||
"cssClass": "icon-folder"
|
||||
},
|
||||
{
|
||||
"key": "folder",
|
||||
"name": "Folder",
|
||||
"cssClass": "icon-folder",
|
||||
"features": "creation",
|
||||
"description": "Create folders to organize other objects or links to objects.",
|
||||
"priority": 1000,
|
||||
"model": {
|
||||
"composition": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "unknown",
|
||||
"name": "Unknown Type",
|
||||
"cssClass": "icon-object-unknown"
|
||||
},
|
||||
{
|
||||
"name": "Unknown Type",
|
||||
"cssClass": "icon-object-unknown"
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
{
|
||||
"key": "composition",
|
||||
"implementation": CompositionCapability,
|
||||
"depends": [
|
||||
"$injector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "relationship",
|
||||
"implementation": RelationshipCapability,
|
||||
"depends": [
|
||||
"$injector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "type",
|
||||
"implementation": TypeCapability,
|
||||
"depends": [
|
||||
"typeService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "action",
|
||||
"implementation": ActionCapability,
|
||||
"depends": [
|
||||
"$q",
|
||||
"actionService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "view",
|
||||
"implementation": ViewCapability,
|
||||
"depends": [
|
||||
"viewService"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "persistence",
|
||||
"implementation": PersistenceCapability,
|
||||
"depends": [
|
||||
"cacheService",
|
||||
"persistenceService",
|
||||
"identifierService",
|
||||
"notificationService",
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "metadata",
|
||||
"implementation": MetadataCapability
|
||||
},
|
||||
{
|
||||
"key": "mutation",
|
||||
"implementation": MutationCapability,
|
||||
"depends": [
|
||||
"topic",
|
||||
"now"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "delegation",
|
||||
"implementation": DelegationCapability,
|
||||
"depends": [
|
||||
"$q"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "instantiation",
|
||||
"implementation": InstantiationCapability,
|
||||
"depends": [
|
||||
"$injector",
|
||||
"identifierService",
|
||||
"now"
|
||||
]
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "cacheService",
|
||||
"implementation": ModelCacheService
|
||||
},
|
||||
{
|
||||
"key": "now",
|
||||
"implementation": Now
|
||||
},
|
||||
{
|
||||
"key": "throttle",
|
||||
"implementation": Throttle,
|
||||
"depends": [
|
||||
"$timeout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "topic",
|
||||
"implementation": Topic,
|
||||
"depends": [
|
||||
"$log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "instantiate",
|
||||
"implementation": Instantiate,
|
||||
"depends": [
|
||||
"capabilityService",
|
||||
"identifierService",
|
||||
"cacheService"
|
||||
]
|
||||
}
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"implementation": TransactingMutationListener,
|
||||
"depends": ["topic", "transactionService", "cacheService"]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"name": "Math.uuid.js",
|
||||
"version": "1.4.7",
|
||||
"description": "Unique identifer generation (code adapted.)",
|
||||
"author": "Robert Kieffer",
|
||||
"website": "https://github.com/broofa/node-uuid",
|
||||
"copyright": "Copyright (c) 2010-2012 Robert Kieffer",
|
||||
"license": "license-mit",
|
||||
"link": "http://opensource.org/licenses/MIT"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user