blob: 45e3f72bb93fc0371c584655a16ff584ec4379ea [file] [log] [blame]
Simon Huntb0ec1e52015-01-28 18:13:49 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 ONOS GUI -- Topo View -- Topo Panel Service - Unit Tests
19 */
20describe('factory: view/topo/topoPanel.js', function() {
21 var $log, fs, tps;
22
Simon Hunt2d16fc82015-03-10 20:19:52 -070023 beforeEach(module('ovTopo', 'onosUtil', 'onosLayer', 'ngRoute', 'onosNav'));
Simon Huntb0ec1e52015-01-28 18:13:49 -080024
25 beforeEach(inject(function (_$log_, FnService, TopoPanelService) {
26 $log = _$log_;
27 fs = FnService;
28 tps = TopoPanelService;
29 }));
30
31 it('should define TopoPanelService', function () {
32 expect(tps).toBeDefined();
33 });
34
35 it('should define api functions', function () {
36 expect(fs.areFunctions(tps, [
Simon Hunt08f841d02015-02-10 14:39:20 -080037 'initPanels',
38 'destroyPanels',
39 'showSummary',
Simon Hunt6036b192015-02-11 11:20:26 -080040 'toggleSummary',
Simon Hunt08f841d02015-02-10 14:39:20 -080041 'displaySingle',
42 'displayMulti',
43 'addAction',
Simon Huntc252aa62015-02-10 16:45:39 -080044 'hideSummaryPanel',
Simon Hunt08f841d02015-02-10 14:39:20 -080045 'showDetailPanel',
46 'hideDetailPanel',
47 'detailVisible',
48 'summaryVisible'
Simon Huntb0ec1e52015-01-28 18:13:49 -080049 ])).toBeTruthy();
50 });
51
52 // TODO: more tests...
53});