diff --git a/platform/representation/bundle.json b/platform/representation/bundle.json index 43ba1ec5e7..534e05813d 100644 --- a/platform/representation/bundle.json +++ b/platform/representation/bundle.json @@ -67,8 +67,7 @@ "$document", "$rootScope", "popupService", - "agentService", - "navigationService" + "agentService" ] } ] diff --git a/platform/representation/src/gestures/ContextMenuGesture.js b/platform/representation/src/gestures/ContextMenuGesture.js index 97d500defb..f425a93a83 100644 --- a/platform/representation/src/gestures/ContextMenuGesture.js +++ b/platform/representation/src/gestures/ContextMenuGesture.js @@ -64,8 +64,7 @@ define( domainObject.getCapability('action').perform({ key: 'menu', domainObject: domainObject, - event: event, - element: element + event: event }); } } diff --git a/platform/representation/test/gestures/ContextMenuGestureSpec.js b/platform/representation/test/gestures/ContextMenuGestureSpec.js index 6938dee33d..1ed9d628ec 100644 --- a/platform/representation/test/gestures/ContextMenuGestureSpec.js +++ b/platform/representation/test/gestures/ContextMenuGestureSpec.js @@ -30,14 +30,16 @@ define( function (ContextMenuGesture) { "use strict"; - var JQLITE_FUNCTIONS = [ "on", "off", "find", "append", "remove" ], + var JQLITE_FUNCTIONS = [ "on", "off", "find", "append", "remove", "attr" ], DOMAIN_OBJECT_METHODS = [ "getId", "getModel", "getCapability", "hasCapability", "useCapability"]; describe("The 'context menu' gesture", function () { var mockTimeout, + mockParse, mockElement, mockAgentService, + mockNavigationService, mockDomainObject, mockEvent, mockTouchEvent, @@ -51,6 +53,7 @@ define( beforeEach(function () { mockTimeout = jasmine.createSpy("$timeout"); + mockParse = jasmine.createSpy("$parse"); mockElement = jasmine.createSpyObj("element", JQLITE_FUNCTIONS); mockAgentService = jasmine.createSpyObj("agentService", ["isMobile"]); mockDomainObject = jasmine.createSpyObj("domainObject", DOMAIN_OBJECT_METHODS); @@ -69,8 +72,7 @@ define( mockContextMenuAction.perform.andReturn(jasmine.any(Function)); mockAgentService.isMobile.andReturn(false); - - gesture = new ContextMenuGesture(mockTimeout, mockAgentService, mockElement, mockDomainObject); + gesture = new ContextMenuGesture(mockTimeout, mockParse, mockAgentService, mockNavigationService, mockElement, mockDomainObject); // Capture the contextmenu callback fireGesture = mockElement.on.mostRecentCall.args[1]; @@ -106,7 +108,7 @@ define( mockAgentService.isMobile.andReturn(true); // Then create new (mobile) gesture - gesture = new ContextMenuGesture(mockTimeout, mockAgentService, mockElement, mockDomainObject); + gesture = new ContextMenuGesture(mockTimeout, mockParse, mockAgentService, mockNavigationService, mockElement, mockDomainObject); // Set calls for the touchstart and touchend gestures fireTouchStartGesture = mockElement.on.calls[1].args[1];