blob: 8d372bd91c72baf25870296d8710b46161b2a145 [file] [log] [blame]
Simon Hunt08f841d02015-02-10 14:39:20 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Simon Hunt08f841d02015-02-10 14:39:20 -08003 *
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 Selection Service - Unit Tests
19 */
20describe('factory: view/topo/topoSelect.js', function() {
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070021 var $log, fs, tss, bns;
Simon Hunt08f841d02015-02-10 14:39:20 -080022
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070023 beforeEach(module('ovTopo', 'onosUtil', 'onosLayer', 'ngRoute', 'onosNav',
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070024 'onosWidget', 'onosMast'));
Simon Hunt08f841d02015-02-10 14:39:20 -080025
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070026 beforeEach(inject(function (_$log_, FnService,
27 TopoSelectService, ButtonService) {
Simon Hunt08f841d02015-02-10 14:39:20 -080028 $log = _$log_;
29 fs = FnService;
30 tss = TopoSelectService;
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -070031 bns = ButtonService;
Simon Hunt08f841d02015-02-10 14:39:20 -080032 }));
33
34 it('should define TopoSelectService', function () {
35 expect(tss).toBeDefined();
36 });
37
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070038 xit('should define api functions', function () {
Simon Hunt08f841d02015-02-10 14:39:20 -080039 expect(fs.areFunctions(tss, [
Simon Hunt3074fb22015-03-31 15:06:25 -070040 'initSelect', 'destroySelect',
41 'showDetails',
Simon Hunt08f841d02015-02-10 14:39:20 -080042 'nodeMouseOver', 'nodeMouseOut', 'selectObject', 'deselectObject',
Simon Hunt3074fb22015-03-31 15:06:25 -070043 'deselectAll',
44 'hovered', 'selectOrder',
45 'validateSelectionContext',
46 'clickConsumed'
Simon Hunt08f841d02015-02-10 14:39:20 -080047 ])).toBeTruthy();
48 });
49
50 // TODO: more tests...
51});