mirror of
https://github.com/nasa/openmct.git
synced 2025-06-05 09:00:49 +00:00
[Build] Fix FullscreenAction spec
...to reflect acquisition of screenfull dependency via AMD
This commit is contained in:
parent
65095d18f2
commit
4f85616632
@ -24,26 +24,25 @@
|
|||||||
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
||||||
*/
|
*/
|
||||||
define(
|
define(
|
||||||
["../../src/windowing/FullscreenAction"],
|
["../../src/windowing/FullscreenAction", "screenfull"],
|
||||||
function (FullscreenAction) {
|
function (FullscreenAction, screenfull) {
|
||||||
|
|
||||||
describe("The fullscreen action", function () {
|
describe("The fullscreen action", function () {
|
||||||
var action,
|
var action,
|
||||||
oldScreenfull;
|
oldToggle;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
// Screenfull is not shimmed or injected, so
|
// Screenfull is not shimmed or injected, so
|
||||||
// we need to spy on it in the global scope.
|
// we need to spy on it in the global scope.
|
||||||
oldScreenfull = window.screenfull;
|
oldToggle = screenfull.toggle;
|
||||||
|
|
||||||
window.screenfull = {};
|
screenfull.toggle = jasmine.createSpy("toggle");
|
||||||
window.screenfull.toggle = jasmine.createSpy("toggle");
|
|
||||||
|
|
||||||
action = new FullscreenAction({});
|
action = new FullscreenAction({});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
window.screenfull = oldScreenfull;
|
screenfull.toggle = oldToggle;
|
||||||
});
|
});
|
||||||
|
|
||||||
it("toggles fullscreen mode when performed", function () {
|
it("toggles fullscreen mode when performed", function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user