Fixed ui routing conflict with syncNotification
Change-Id: I94e0f91ee35ed90ad73798de5d635abc4addbd4b
Removed backbone deps and views
Change-Id: I77185488ffd5415e4815de59cc44ee24420071db
Started E2E UI Tests with selenium
Test running locally, still broken in container because of phantomjs
Removed backone templates
Change-Id: I788cfda3d12e3d1c2828c9ee9f6eb7e4431eae52
diff --git a/views/ngXosViews/tenant/spec/sample.test.js b/views/ngXosViews/tenant/spec/sample.test.js
index bd0fd92..3bd610b 100644
--- a/views/ngXosViews/tenant/spec/sample.test.js
+++ b/views/ngXosViews/tenant/spec/sample.test.js
@@ -10,6 +10,7 @@
beforeEach(inject(function($httpBackend, $compile, $rootScope){
httpBackend = $httpBackend;
+ httpBackend.whenGET('/api/core/sites/?no_hyperlinks=1').respond(200, []);
// Setting up mock request
scope = $rootScope.$new();
element = angular.element('<users-list></users-list>');
@@ -17,38 +18,40 @@
scope.$digest();
isolatedScope = element.isolateScope().vm;
}));
-describe('site list table',() =>{
- it('site list ', () => {
- var sites = [
- {
- 'name':'Mysite',
- 'id':'1'
-
- }];
- var slices = [{
- 'site':'1',
- 'instance_total':1,
- 'instance_total_ready':1
- },
- {
- 'site':'1',
- 'instance_total':2,
- 'instance_total_ready':3
- },
- {
- 'site':'2',
- 'instance_total':'1',
- 'instance_total_ready':'2'
- }];
- var result = isolatedScope.returnData(sites,slices);
- expect(result).toEqual([{
- 'name':'Mysite',
- 'id':'1',
- 'instance_total':3,
- 'instance_total_ready':4
- }
-])
-//httpBackend.flush();
+ describe('site list table',() =>{
+ it('site list ', () => {
+ var sites = [
+ {
+ 'name':'Mysite',
+ 'id':'1'
+ }
+ ];
+ var slices = [
+ {
+ 'site': '1',
+ 'instance_total' :1,
+ 'instance_total_ready' :1
+ },
+ {
+ 'site': '1',
+ 'instance_total': 2,
+ 'instance_total_ready': 3
+ },
+ {
+ 'site': '2',
+ 'instance_total': '1',
+ 'instance_total_ready': '2'
+ }
+ ];
+ var result = isolatedScope.returnData(sites,slices);
+ expect(result).toEqual([
+ {
+ 'name':'Mysite',
+ 'id':'1',
+ 'instance_total':3,
+ 'instance_total_ready':4
+ }
+ ]);
+ });
});
-});
});
\ No newline at end of file