[Mobile] CleanUp/Tests
Added tests inside spec files for the QueryService, TreeNodeController, and InfoGesture. Also cleaned up the tree so that padding is used between buttons instead of margins.
This commit is contained in:
@@ -51,15 +51,17 @@ define(
|
||||
});
|
||||
|
||||
it("get current device user agent", function () {
|
||||
queryService.isMobile();
|
||||
mockNavigator.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36";
|
||||
queryService.isMobile(mockNavigator.userAgent);
|
||||
mockNavigator.userAgent = "Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53";
|
||||
queryService.isMobile();
|
||||
queryService.isMobile(mockNavigator.userAgent);
|
||||
});
|
||||
|
||||
it("get orientation of the current device", function () {
|
||||
mockWindow.outerWidth = 768;
|
||||
mockWindow.outerHeight = 1024;
|
||||
queryService.getOrientation();
|
||||
|
||||
mockWindow.outerWidth = 1024;
|
||||
mockWindow.outerHeight = 768;
|
||||
queryService.getOrientation();
|
||||
|
||||
Reference in New Issue
Block a user