mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 08:48:28 +00:00
[Timeline] Remove namespacing from specs
This commit is contained in:
parent
26db524f0e
commit
fffe07e7e6
@ -44,7 +44,7 @@ define(
|
||||
|
||||
it("applies only to activity objects", function () {
|
||||
expect(ActivityTimespanCapability.appliesTo({
|
||||
type: 'warp.activity'
|
||||
type: 'activity'
|
||||
})).toBeTruthy();
|
||||
expect(ActivityTimespanCapability.appliesTo({
|
||||
type: 'folder'
|
||||
@ -68,4 +68,4 @@ define(
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -45,16 +45,16 @@ define(
|
||||
|
||||
it("applies to subsystem modes", function () {
|
||||
expect(CostCapability.appliesTo({
|
||||
type: "warp.mode"
|
||||
type: "mode"
|
||||
})).toBeTruthy();
|
||||
expect(CostCapability.appliesTo({
|
||||
type: "warp.activity"
|
||||
type: "activity"
|
||||
})).toBeFalsy();
|
||||
expect(CostCapability.appliesTo({
|
||||
type: "warp.other"
|
||||
type: "other"
|
||||
})).toBeFalsy();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -27,7 +27,7 @@ define(
|
||||
);
|
||||
|
||||
testModel = {
|
||||
type: "warp.activity",
|
||||
type: "activity",
|
||||
resources: {
|
||||
abc: 100,
|
||||
xyz: 42
|
||||
@ -45,7 +45,7 @@ define(
|
||||
|
||||
it("is applicable to timelines", function () {
|
||||
expect(GraphCapability.appliesTo({
|
||||
type: "warp.timeline"
|
||||
type: "timeline"
|
||||
})).toBeTruthy();
|
||||
});
|
||||
|
||||
@ -82,7 +82,7 @@ define(
|
||||
it("provides a battery graph for timelines with capacity", function () {
|
||||
var mockCallback = jasmine.createSpy('callback');
|
||||
testModel.capacity = 1000;
|
||||
testModel.type = "warp.timeline";
|
||||
testModel.type = "timeline";
|
||||
mockDomainObject.useCapability.andReturn(asPromise([
|
||||
{ key: "power", start: 0, end: 15 }
|
||||
]));
|
||||
@ -95,4 +95,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -84,7 +84,7 @@ define(
|
||||
|
||||
it("applies only to timeline objects", function () {
|
||||
expect(TimelineTimespanCapability.appliesTo({
|
||||
type: 'warp.timeline'
|
||||
type: 'timeline'
|
||||
})).toBeTruthy();
|
||||
expect(TimelineTimespanCapability.appliesTo({
|
||||
type: 'folder'
|
||||
@ -112,4 +112,4 @@ define(
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -78,7 +78,7 @@ define(
|
||||
mockCallback = jasmine.createSpy('callback');
|
||||
|
||||
testModel = {
|
||||
type: "warp.activity",
|
||||
type: "activity",
|
||||
resources: {
|
||||
abc: 100,
|
||||
xyz: 42
|
||||
@ -107,7 +107,7 @@ define(
|
||||
|
||||
it("is applicable to timelines", function () {
|
||||
expect(UtilizationCapability.appliesTo({
|
||||
type: "warp.timeline"
|
||||
type: "timeline"
|
||||
})).toBeTruthy();
|
||||
});
|
||||
|
||||
@ -192,4 +192,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -2,8 +2,8 @@
|
||||
/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/
|
||||
|
||||
define(
|
||||
["../../src/controllers/WARPDateTimeController"],
|
||||
function (WARPDateTimeController) {
|
||||
["../../src/controllers/TimelineDateTimeController"],
|
||||
function (TimelineDateTimeController) {
|
||||
"use strict";
|
||||
|
||||
describe("The date-time controller for timeline creation", function () {
|
||||
@ -14,7 +14,7 @@ define(
|
||||
mockScope = jasmine.createSpyObj('$scope', ['$watchCollection']);
|
||||
mockScope.field = 'testField';
|
||||
mockScope.ngModel = { testField: { timestamp: 0, epoch: "SET" } };
|
||||
controller = new WARPDateTimeController(mockScope);
|
||||
controller = new TimelineDateTimeController(mockScope);
|
||||
});
|
||||
|
||||
|
@ -50,13 +50,13 @@ define(
|
||||
});
|
||||
|
||||
it("provides three handles for activities", function () {
|
||||
testType = "warp.activity";
|
||||
testType = "activity";
|
||||
expect(factory.handles(mockDomainObject).length)
|
||||
.toEqual(3);
|
||||
});
|
||||
|
||||
it("provides two handles for timelines", function () {
|
||||
testType = "warp.timeline";
|
||||
testType = "timeline";
|
||||
expect(factory.handles(mockDomainObject).length)
|
||||
.toEqual(2);
|
||||
});
|
||||
|
@ -61,13 +61,13 @@ define(
|
||||
it("adds a 'modes' getter-setter to activities", function () {
|
||||
expect(mockSwimlane.modes).toEqual(jasmine.any(Function));
|
||||
expect(mockCapabilities.type.instanceOf)
|
||||
.toHaveBeenCalledWith('warp.activity');
|
||||
.toHaveBeenCalledWith('activity');
|
||||
});
|
||||
|
||||
it("adds a 'link' getter-setter to activities", function () {
|
||||
expect(mockSwimlane.link).toEqual(jasmine.any(Function));
|
||||
expect(mockCapabilities.type.instanceOf)
|
||||
.toHaveBeenCalledWith('warp.activity');
|
||||
.toHaveBeenCalledWith('activity');
|
||||
});
|
||||
|
||||
it("gets modes from the domain object model", function () {
|
||||
@ -157,4 +157,4 @@ define(
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -1,11 +1,11 @@
|
||||
/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/
|
||||
|
||||
define(
|
||||
['../../src/directives/WARPSwimlaneDrag', '../../src/directives/SwimlaneDragConstants'],
|
||||
function (WARPSwimlaneDrag, SwimlaneDragConstants) {
|
||||
['../../src/directives/MCTSwimlaneDrag', '../../src/directives/SwimlaneDragConstants'],
|
||||
function (MCTSwimlaneDrag, SwimlaneDragConstants) {
|
||||
"use strict";
|
||||
|
||||
describe("The warp-swimlane-drag directive", function () {
|
||||
describe("The mct-swimlane-drag directive", function () {
|
||||
var mockDndService,
|
||||
mockScope,
|
||||
mockElement,
|
||||
@ -26,14 +26,14 @@ define(
|
||||
);
|
||||
mockScope = jasmine.createSpyObj('$scope', ['$eval']);
|
||||
mockElement = jasmine.createSpyObj('element', ['on']);
|
||||
testAttrs = { warpSwimlaneDrag: "someTestExpr" };
|
||||
testAttrs = { mctSwimlaneDrag: "someTestExpr" };
|
||||
|
||||
// Simulate evaluation of expressions in scope
|
||||
mockScope.$eval.andCallFake(function (expr) {
|
||||
return scopeExprs[expr];
|
||||
});
|
||||
|
||||
directive = new WARPSwimlaneDrag(mockDndService);
|
||||
directive = new MCTSwimlaneDrag(mockDndService);
|
||||
|
||||
// Run the link function, then capture the event handlers
|
||||
// for testing.
|
||||
@ -56,7 +56,7 @@ define(
|
||||
handlers.dragstart();
|
||||
// Should have exposed the swimlane
|
||||
expect(mockDndService.setData).toHaveBeenCalledWith(
|
||||
SwimlaneDragConstants.WARP_SWIMLANE_DRAG_TYPE,
|
||||
SwimlaneDragConstants.TIMELINE_SWIMLANE_DRAG_TYPE,
|
||||
"some swimlane"
|
||||
);
|
||||
});
|
||||
@ -68,9 +68,9 @@ define(
|
||||
handlers.dragend();
|
||||
// Should have exposed the swimlane
|
||||
expect(mockDndService.removeData).toHaveBeenCalledWith(
|
||||
SwimlaneDragConstants.WARP_SWIMLANE_DRAG_TYPE
|
||||
SwimlaneDragConstants.TIMELINE_SWIMLANE_DRAG_TYPE
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
@ -1,14 +1,14 @@
|
||||
/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/
|
||||
|
||||
define(
|
||||
['../../src/directives/WARPSwimlaneDrop'],
|
||||
function (WARPSwimlaneDrop) {
|
||||
['../../src/directives/MCTSwimlaneDrop'],
|
||||
function (MCTSwimlaneDrop) {
|
||||
"use strict";
|
||||
|
||||
var TEST_HEIGHT = 100,
|
||||
TEST_TOP = 600;
|
||||
|
||||
describe("The warp-swimlane-drop directive", function () {
|
||||
describe("The mct-swimlane-drop directive", function () {
|
||||
var mockDndService,
|
||||
mockScope,
|
||||
mockElement,
|
||||
@ -36,7 +36,7 @@ define(
|
||||
);
|
||||
mockScope = jasmine.createSpyObj('$scope', ['$eval']);
|
||||
mockElement = jasmine.createSpyObj('element', ['on']);
|
||||
testAttrs = { warpSwimlaneDrop: "mockSwimlane" };
|
||||
testAttrs = { mctSwimlaneDrop: "mockSwimlane" };
|
||||
mockSwimlane = jasmine.createSpyObj(
|
||||
"swimlane",
|
||||
[ "allowDropIn", "allowDropAfter", "drop", "highlight", "highlightBottom" ]
|
||||
@ -72,7 +72,7 @@ define(
|
||||
testEvent.dataTransfer.getData.andReturn('abc');
|
||||
mockDndService.getData.andReturn({ domainObject: 'someDomainObject' });
|
||||
|
||||
directive = new WARPSwimlaneDrop(mockDndService);
|
||||
directive = new MCTSwimlaneDrop(mockDndService);
|
||||
|
||||
// Run the link function, then capture the event handlers
|
||||
// for testing.
|
||||
@ -144,4 +144,4 @@ define(
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
@ -7,9 +7,9 @@ define(
|
||||
|
||||
describe("Timeline swimlane drag constants", function () {
|
||||
it("define a custom type for swimlane drag-drop", function () {
|
||||
expect(SwimlaneDragConstants.WARP_SWIMLANE_DRAG_TYPE)
|
||||
expect(SwimlaneDragConstants.TIMELINE_SWIMLANE_DRAG_TYPE)
|
||||
.toEqual(jasmine.any(String));
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -21,7 +21,7 @@
|
||||
"controllers/TimelineTableController",
|
||||
"controllers/TimelineTickController",
|
||||
"controllers/TimelineZoomController",
|
||||
"controllers/WARPDateTimeController",
|
||||
"controllers/TimelineDateTimeController",
|
||||
|
||||
"controllers/drag/TimelineDragHandler",
|
||||
"controllers/drag/TimelineDragHandleFactory",
|
||||
@ -43,8 +43,8 @@
|
||||
"controllers/swimlane/TimelineSwimlanePopulator",
|
||||
|
||||
"directives/SwimlaneDragConstants",
|
||||
"directives/WARPSwimlaneDrag",
|
||||
"directives/WARPSwimlaneDrop",
|
||||
"directives/MCTSwimlaneDrag",
|
||||
"directives/MCTSwimlaneDrop",
|
||||
|
||||
"services/ObjectLoader"
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user