preferences-defaults-browser.it.test.js 2.09 KB
/*
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2016 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 */

/* eslint max-nested-callbacks: [2, 10]*/
/* eslint no-new: 0 */

/* globals describe, expect, it */
define([
    'screens/player/shared/serviceadmin',
    'screens/player/shared/test-helper/service',
    'screens/player/firmware/preferences/spi/defaults',
    'screens/player/firmware/preferences/impl/preferences-defaults-browser'
], function(ServiceAdmin, serviceTestHelper, DefaultsSpi, DefaultsSpiService) {
    'use strict';

    describe('PreferencesDefaultsSpiService', function() {

        serviceTestHelper.runDefaultTests(DefaultsSpiService, DefaultsSpi.serviceName);

        describe('API', function() {
            describe('getDefaults', function() {
                it('returns Promise with defaults', function() {
                    return DefaultsSpiService.getDefaults().then(function(defaults) {
                        expect(defaults).to.eql({
                            server: 'http://localhost:4502',
                            device: '',
                            user: '',
                            password: '',
                            resolution: 'auto',
                            rebootSchedule: 'at 4:00 am',
                            enableAdminUI: true,
                            enableOSD: true,
                            enableActivityUI: true,
                            enableRemoteInspect: false,
                            enableNativeVideo: false
                        });
                    });
                });
            });
        });

    });
});