2014-12-05 23:39:07 +00:00
|
|
|
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
|
|
|
|
|
|
define(
|
|
|
|
["../../src/gestures/GestureRepresenter"],
|
|
|
|
function (GestureRepresenter) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
describe("A gesture representer", function () {
|
2014-12-05 23:48:13 +00:00
|
|
|
|
|
|
|
// it("attaches declared gestures, and detaches on refresh", function () {
|
|
|
|
// mctRepresentation.link(mockScope, mockElement);
|
|
|
|
//
|
|
|
|
// mockScope.key = "uvw";
|
|
|
|
// mockScope.domainObject = mockDomainObject;
|
|
|
|
//
|
|
|
|
// // Trigger the watch
|
|
|
|
// mockScope.$watch.mostRecentCall.args[1]();
|
|
|
|
//
|
|
|
|
// expect(mockGestureService.attachGestures).toHaveBeenCalledWith(
|
|
|
|
// mockElement,
|
|
|
|
// mockDomainObject,
|
|
|
|
// [ "testGesture", "otherTestGesture" ]
|
|
|
|
// );
|
|
|
|
//
|
|
|
|
// expect(mockGestureHandle.destroy).not.toHaveBeenCalled();
|
|
|
|
//
|
|
|
|
// // Refresh, expect a detach
|
|
|
|
// mockScope.key = "abc";
|
|
|
|
// mockScope.$watch.mostRecentCall.args[1]();
|
|
|
|
//
|
|
|
|
// // Should have destroyed those old gestures
|
|
|
|
// expect(mockGestureHandle.destroy).toHaveBeenCalled();
|
|
|
|
// });
|
|
|
|
|
2014-12-05 23:39:07 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|