Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Simon Hunt
2015-03-02 15:51:18 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
14caf7ce37ccc4b12e39a7b181da4673b80732a5
14caf7ce
1 parent
30a57f89
GUI -- Fixing broken unit tests.
Change-Id: Ibb5dd090e300ae3f7046144c825d8f5d53e7e24e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
web/gui/src/main/webapp/onos.js
web/gui/src/main/webapp/tests/app/view/device/device-spec.js
web/gui/src/main/webapp/tests/app/view/topo/topoEvent-spec.js
web/gui/src/main/webapp/tests/app/view/topo/topoForce-spec.js
web/gui/src/main/webapp/tests/app/view/topo/topoModel-spec.js
web/gui/src/main/webapp/onos.js
View file @
14caf7c
...
...
@@ -35,7 +35,6 @@
// view IDs.. note the first view listed is loaded at startup
var
viewIds
=
[
// TODO: inject view IDs server side
// {INJECTED-VIEW-IDS-START}
'sample'
,
'topo'
,
...
...
web/gui/src/main/webapp/tests/app/view/device/device-spec.js
View file @
14caf7c
...
...
@@ -18,9 +18,6 @@
ONOS GUI -- Device Controller - Unit Tests
*/
describe
(
'Controller: OvDeviceCtrl'
,
function
()
{
// instantiate the Device module
beforeEach
(
module
(
'ovDevice'
,
'onosRemote'
));
var
$log
,
$scope
,
$controller
,
ctrl
,
$mockHttp
;
var
fakeData
=
{
...
...
@@ -40,6 +37,9 @@ describe('Controller: OvDeviceCtrl', function () {
}]
};
// instantiate the Device module
beforeEach
(
module
(
'ovDevice'
,
'onosRemote'
,
'onosLayer'
,
'onosSvg'
,
'ngRoute'
));
beforeEach
(
inject
(
function
(
_$log_
,
$rootScope
,
_$controller_
,
$httpBackend
)
{
$log
=
_$log_
;
$scope
=
$rootScope
.
$new
();
...
...
@@ -48,7 +48,6 @@ describe('Controller: OvDeviceCtrl', function () {
}));
beforeEach
(
function
()
{
$scope
=
{};
ctrl
=
$controller
(
'OvDeviceCtrl'
,
{
$scope
:
$scope
});
$mockHttp
.
whenGET
(
/
\/
device$/
).
respond
(
fakeData
);
});
...
...
web/gui/src/main/webapp/tests/app/view/topo/topoEvent-spec.js
View file @
14caf7c
...
...
@@ -20,7 +20,7 @@
describe
(
'factory: view/topo/topoEvent.js'
,
function
()
{
var
$log
,
fs
,
tes
;
beforeEach
(
module
(
'ovTopo'
,
'onosUtil'
,
'onosLayer'
));
beforeEach
(
module
(
'ovTopo'
,
'onosUtil'
,
'onosLayer'
,
'ngRoute'
));
beforeEach
(
inject
(
function
(
_$log_
,
FnService
,
TopoEventService
)
{
$log
=
_$log_
;
...
...
web/gui/src/main/webapp/tests/app/view/topo/topoForce-spec.js
View file @
14caf7c
...
...
@@ -20,7 +20,7 @@
describe
(
'factory: view/topo/topoForce.js'
,
function
()
{
var
$log
,
fs
,
tfs
;
beforeEach
(
module
(
'ovTopo'
,
'onosUtil'
,
'onosLayer'
));
beforeEach
(
module
(
'ovTopo'
,
'onosUtil'
,
'onosLayer'
,
'ngRoute'
));
beforeEach
(
inject
(
function
(
_$log_
,
FnService
,
TopoForceService
)
{
$log
=
_$log_
;
...
...
@@ -36,7 +36,8 @@ describe('factory: view/topo/topoForce.js', function() {
expect
(
fs
.
areFunctions
(
tfs
,
[
'initForce'
,
'newDim'
,
'destroyForce'
,
'updateDeviceColors'
,
'toggleHosts'
,
'toggleOffline'
,
'updateDeviceColors'
,
'toggleHosts'
,
'togglePorts'
,
'toggleOffline'
,
'cycleDeviceLabels'
,
'unpin'
,
'showMastership'
,
'addDevice'
,
'updateDevice'
,
'removeDevice'
,
...
...
web/gui/src/main/webapp/tests/app/view/topo/topoModel-spec.js
View file @
14caf7c
...
...
@@ -138,8 +138,10 @@ describe('factory: view/topo/topoModel.js', function() {
compare
:
function
(
actual
,
xy1
,
xy2
)
{
var
result
=
{};
result
.
pass
=
(
actual
.
x1
===
xy1
[
0
])
&&
(
actual
.
y1
===
xy1
[
1
])
&&
(
actual
.
x2
===
xy2
[
0
])
&&
(
actual
.
y2
===
xy2
[
1
]);
result
.
pass
=
(
actual
.
source
.
x
===
xy1
[
0
])
&&
(
actual
.
source
.
y
===
xy1
[
1
])
&&
(
actual
.
target
.
x
===
xy2
[
0
])
&&
(
actual
.
target
.
y
===
xy2
[
1
]);
if
(
result
.
pass
)
{
// for negation with ".not"
...
...
Please
register
or
login
to post a comment