mirror of
https://github.com/nasa/openmct.git
synced 2025-06-09 10:51:39 +00:00
[Mobile] Test agentService.isTouch
This commit is contained in:
parent
560825cc86
commit
fcee30c27e
@ -82,6 +82,15 @@ define(
|
|||||||
expect(agentService.isLandscape()).toBeFalsy();
|
expect(agentService.isLandscape()).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("detects touch support", function () {
|
||||||
|
testWindow.ontouchstart = null;
|
||||||
|
expect(new AgentService(testWindow).isTouch())
|
||||||
|
.toBe(true);
|
||||||
|
delete testWindow.ontouchstart;
|
||||||
|
expect(new AgentService(testWindow).isTouch())
|
||||||
|
.toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it("allows for checking browser type", function () {
|
it("allows for checking browser type", function () {
|
||||||
testWindow.navigator.userAgent = "Chromezilla Safarifox";
|
testWindow.navigator.userAgent = "Chromezilla Safarifox";
|
||||||
agentService = new AgentService(testWindow);
|
agentService = new AgentService(testWindow);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user