mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
[Common UI] Test agentService.isBrowser
This commit is contained in:
@ -81,6 +81,13 @@ define(
|
|||||||
expect(agentService.isPortrait()).toBeTruthy();
|
expect(agentService.isPortrait()).toBeTruthy();
|
||||||
expect(agentService.isLandscape()).toBeFalsy();
|
expect(agentService.isLandscape()).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("allows for checking browser type", function () {
|
||||||
|
testWindow.navigator.userAgent = "Chromezilla Safarifox";
|
||||||
|
agentService = new AgentService(testWindow);
|
||||||
|
expect(agentService.isBrowser("Chrome")).toBe(true);
|
||||||
|
expect(agentService.isBrowser("Firefox")).toBe(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user