[Common UI] Complete remaining specs
Complete remaining specs to achieve full test coverage for common user interface bundles being transitioned as part of WTD-574.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
||||
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,afterEach,screenfull*/
|
||||
|
||||
/**
|
||||
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
|
||||
@@ -9,6 +9,31 @@ define(
|
||||
"use strict";
|
||||
|
||||
describe("The fullscreen action", function () {
|
||||
var action,
|
||||
oldToggle;
|
||||
|
||||
beforeEach(function () {
|
||||
// Screenfull is not shimmed or injected, so
|
||||
// we need to spy on it in the global scope.
|
||||
oldToggle = screenfull.toggle;
|
||||
|
||||
screenfull.toggle = jasmine.createSpy("toggle");
|
||||
|
||||
action = new FullscreenAction({});
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
screenfull.toggle = oldToggle;
|
||||
});
|
||||
|
||||
it("toggles fullscreen mode when performed", function () {
|
||||
action.perform();
|
||||
expect(screenfull.toggle).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("provides displayable metadata", function () {
|
||||
expect(action.getMetadata().glyph).toBeDefined();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user