From 200c6e49fcc7fa800ed2125ee5f9d7fe5dddd038 Mon Sep 17 00:00:00 2001 From: Shivam Dave Date: Thu, 23 Jul 2015 16:55:45 -0700 Subject: [PATCH] [Mobile] Test QueryService (mock) added to the ContextMenuGestureSpec to account for isMobile call that allows/ disallows use of contextmenu gesture. --- .../representation/test/gestures/ContextMenuGestureSpec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/representation/test/gestures/ContextMenuGestureSpec.js b/platform/representation/test/gestures/ContextMenuGestureSpec.js index 8b91a969d4..f1a6b3419d 100644 --- a/platform/representation/test/gestures/ContextMenuGestureSpec.js +++ b/platform/representation/test/gestures/ContextMenuGestureSpec.js @@ -43,6 +43,7 @@ define( mockBody, mockWindow, mockRootScope, + mockQueryService, mockScope, mockElement, mockDomainObject, @@ -59,12 +60,14 @@ define( mockWindow = { innerWidth: MENU_DIMENSIONS[0] * 4, innerHeight: MENU_DIMENSIONS[1] * 4 }; mockRootScope = jasmine.createSpyObj("$rootScope", ["$new"]); mockScope = {}; + mockQueryService = jasmine.createSpyObj("queryService", ["isMobile"]); mockElement = jasmine.createSpyObj("element", JQLITE_FUNCTIONS); mockDomainObject = jasmine.createSpyObj("domainObject", DOMAIN_OBJECT_METHODS); mockEvent = jasmine.createSpyObj("event", ["preventDefault"]); mockEvent.pageX = 0; mockEvent.pageY = 0; - + + mockCompile.andReturn(mockCompiledTemplate); mockCompiledTemplate.andReturn(mockMenu); mockDocument.find.andReturn(mockBody); @@ -75,6 +78,7 @@ define( mockDocument, mockWindow, mockRootScope, + mockQueryService, mockElement, mockDomainObject );