diff options
author | CNlucius <lukai1@huawei.com> | 2016-09-13 11:40:12 +0800 |
---|---|---|
committer | CNlucius <lukai1@huawei.com> | 2016-09-13 11:41:53 +0800 |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/web/gui/src/test/webapp/_sdh | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/web/gui/src/test/webapp/_sdh')
-rw-r--r-- | framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch03-controllerSpec.js | 35 | ||||
-rw-r--r-- | framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch09-01-time-agoSpec.js | 40 |
2 files changed, 0 insertions, 75 deletions
diff --git a/framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch03-controllerSpec.js b/framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch03-controllerSpec.js deleted file mode 100644 index b2d4947b..00000000 --- a/framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch03-controllerSpec.js +++ /dev/null @@ -1,35 +0,0 @@ -// Jasmine unit tests for ch03-controller.js - -describe('Controller: ListCtrl', function () { - // instantiate a new version of my module before each test - beforeEach(module('notesApp')); - - var ctrl; - - // before each unit test, instantiate a new instance of the controller - beforeEach(inject(function ($controller) { - ctrl = $controller('ListCtrl'); - })); - - it('should have items available on load', function () { - expect(ctrl.items).toEqual([ - {id: 1, label: 'First', done: true}, - {id: 2, label: 'Second', done: false} - ]); - }); - - it('should have highlight items based on state', function () { - var item = {id: 1, label: 'First', done: true}; - - var actualClass = ctrl.getDoneClass(item); - expect(actualClass.finished).toBeTruthy(); - expect(actualClass.unfinished).toBeFalsy(); - - item.done = false; - - actualClass = ctrl.getDoneClass(item); - expect(actualClass.finished).toBeFalsy(); - expect(actualClass.unfinished).toBeTruthy(); - }); - -});
\ No newline at end of file diff --git a/framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch09-01-time-agoSpec.js b/framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch09-01-time-agoSpec.js deleted file mode 100644 index a518ae2b..00000000 --- a/framework/src/onos/web/gui/src/test/webapp/_sdh/ng-examples/js/ch09-01-time-agoSpec.js +++ /dev/null @@ -1,40 +0,0 @@ -// ch09-01-time-agoSpec.js - -describe('timeAgo Filter', function () { - beforeEach(module('filterApp')); - - var filter; - beforeEach(inject(function (timeAgoFilter) { - filter = timeAgoFilter; - })); - - it('should respond based on timestamp', function() { - // The presence of new Date().getTime() makes it slightly - // hard to unit test deterministically. - // Ideally, we would inject a dateProvider into the timeAgo - // filter, but we are trying to keep it simple for now. - // So, we assume that our tests are fast enough to execute - // in mere milliseconds. - - var t = new Date().getTime(); - t -= 10000; - expect(filter(t)).toEqual('seconds ago'); - expect(filter(t, true)).toEqual('minutes ago'); - - var fmin = t - 1000 * 60; - expect(filter(fmin)).toEqual('minutes ago'); - expect(filter(fmin, true)).toEqual('minutes ago'); - - var fhour = t - 1000 * 60 * 68; - expect(filter(fhour)).toEqual('hours ago'); - expect(filter(fhour, true)).toEqual('hours ago'); - - var fday = t - 1000 * 60 * 60 * 26; - expect(filter(fday)).toEqual('days ago'); - expect(filter(fday, true)).toEqual('days ago'); - - var fmon = t - 1000 * 60 * 60 * 24 * 34; - expect(filter(fmon)).toEqual('months ago'); - expect(filter(fmon, true)).toEqual('months ago'); - }); -}); |