mirror of
https://github.com/nasa/openmct.git
synced 2025-05-28 13:14:20 +00:00
[Mobile, Gestures] Tests
Adjusted tests to call to correct firedGesture.
This commit is contained in:
parent
3031579a62
commit
caf1e3aea9
@ -31,7 +31,7 @@ define(
|
||||
|
||||
var JQLITE_FUNCTIONS = [ "on", "off", "unbind" ],
|
||||
LOG_FUNCTIONS = [ "error", "warn", "info", "debug"],
|
||||
DOMAIN_OBJECT_METHODS = [ "getId", "getModel",
|
||||
DOMAIN_OBJECT_METHODS = [ "getName", "getModel",
|
||||
"getCapability", "hasCapability", "useCapability"],
|
||||
TEST_NAME = "Not Folder";
|
||||
|
||||
@ -63,9 +63,13 @@ define(
|
||||
|
||||
gesture = new PanGesture(mockLog, mockAgentService,
|
||||
mockElement, mockObject);
|
||||
fireStartGesture = mockElement.on.calls[0];
|
||||
fireMoveGesture = mockElement.on.calls[1];
|
||||
fireEndGesture = mockElement.on.calls[2];
|
||||
fireStartGesture = mockElement.on.calls[0].args[1];
|
||||
fireMoveGesture = mockElement.on.calls[1].args[1];
|
||||
fireEndGesture = mockElement.on.calls[2].args[1];
|
||||
});
|
||||
|
||||
it("pan", function () {
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -41,6 +41,9 @@ define(
|
||||
mockElement,
|
||||
mockDomainObject,
|
||||
mockObject,
|
||||
mockEvent,
|
||||
mockTouchEvent,
|
||||
mockChangedTouches,
|
||||
gesture,
|
||||
fireStartGesture,
|
||||
fireMoveGesture,
|
||||
@ -59,15 +62,27 @@ define(
|
||||
return c === 'type' && mockDomainObject;
|
||||
});
|
||||
mockAgentService.isMobile.andReturn(true);
|
||||
|
||||
|
||||
|
||||
gesture = new PinchGesture(mockLog, mockAgentService,
|
||||
mockElement, mockObject);
|
||||
fireStartGesture = mockElement.on.calls[0];
|
||||
fireMoveGesture = mockElement.on.calls[1];
|
||||
fireEndGesture = mockElement.on.calls[2];
|
||||
|
||||
fireStartGesture = mockElement.on.calls[0].args[1];
|
||||
fireMoveGesture = mockElement.on.calls[1].args[1];
|
||||
fireEndGesture = mockElement.on.calls[2].args[1];
|
||||
});
|
||||
|
||||
it("pinch", function () {
|
||||
mockTouchEvent = jasmine.createSpyObj("event", ["preventDefault", "stopPropagation",
|
||||
"changedTouches"]);
|
||||
mockChangedTouches = jasmine.createSpyObj("changedTouch", ["length"]);
|
||||
mockChangedTouches.length.andReturn(2);
|
||||
mockTouchEvent.changedTouches.andReturn(mockChangedTouches);
|
||||
|
||||
fireStartGesture(mockTouchEvent);
|
||||
// fireMoveGesture(mockTouchEvent);
|
||||
// fireEndGesture(mockTouchEvent);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user