mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +00:00
[Fixed Postion] Update unit tests for new code
This commit is contained in:
parent
b9ab97eb7f
commit
65500736da
@ -157,9 +157,9 @@ define(
|
|||||||
};
|
};
|
||||||
testValues = { a: 10, b: 42, c: 31.42 };
|
testValues = { a: 10, b: 42, c: 31.42 };
|
||||||
testConfiguration = { elements: [
|
testConfiguration = { elements: [
|
||||||
{ type: "fixed.telemetry", id: 'a', x: 1, y: 1 },
|
{ type: "fixed.telemetry", id: 'a', x: 1, y: 1, useGrid: true},
|
||||||
{ type: "fixed.telemetry", id: 'b', x: 1, y: 1 },
|
{ type: "fixed.telemetry", id: 'b', x: 1, y: 1, useGrid: true},
|
||||||
{ type: "fixed.telemetry", id: 'c', x: 1, y: 1 }
|
{ type: "fixed.telemetry", id: 'c', x: 1, y: 1, useGrid: true}
|
||||||
]};
|
]};
|
||||||
|
|
||||||
mockChildren = testModel.composition.map(makeMockDomainObject);
|
mockChildren = testModel.composition.map(makeMockDomainObject);
|
||||||
|
@ -35,13 +35,14 @@ define(
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockElementHandle = jasmine.createSpyObj(
|
mockElementHandle = jasmine.createSpyObj(
|
||||||
'elementHandle',
|
'elementHandle',
|
||||||
['x', 'y']
|
['x', 'y','getGridSize']
|
||||||
);
|
);
|
||||||
mockUpdate = jasmine.createSpy('update');
|
mockUpdate = jasmine.createSpy('update');
|
||||||
mockCommit = jasmine.createSpy('commit');
|
mockCommit = jasmine.createSpy('commit');
|
||||||
|
|
||||||
mockElementHandle.x.andReturn(6);
|
mockElementHandle.x.andReturn(6);
|
||||||
mockElementHandle.y.andReturn(8);
|
mockElementHandle.y.andReturn(8);
|
||||||
|
mockElementHandle.getGridSize.andReturn(TEST_GRID_SIZE);
|
||||||
|
|
||||||
handle = new FixedDragHandle(
|
handle = new FixedDragHandle(
|
||||||
mockElementHandle,
|
mockElementHandle,
|
||||||
|
@ -61,7 +61,8 @@ define(
|
|||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
width: 1,
|
width: 1,
|
||||||
height: 1
|
height: 1,
|
||||||
|
useGrid: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user