aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-02-07 09:25:59 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2019-02-07 09:26:08 +0530
commitf0931c5746f58b40a7d827b63901c9b0cf925561 (patch)
tree1c209f7c97a47caca6fa3840b9cd67c39627f07d /usecaseui-portal
parent5788be72a1515dd96d2c748d5145b8609b78a142 (diff)
Test case: ccvpn-detail.component
configured test bed for ccvpn-detail component Issue-ID: USECASEUI-195 Change-Id: I8c4ee913336d1d57760c315f023a2b83d910a1f9 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'usecaseui-portal')
-rw-r--r--usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts29
1 files changed, 28 insertions, 1 deletions
diff --git a/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts b/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts
index b8afc9c3..dcef893b 100644
--- a/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts
+++ b/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts
@@ -14,8 +14,13 @@
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { NgZorroAntdModule } from 'ng-zorro-antd';
+import { HttpClientModule } from '@angular/common/http';
+import { NZ_I18N, en_US } from 'ng-zorro-antd';
+import { TranslateModule, TranslateLoader, TranslateService, TranslateFakeLoader} from '@ngx-translate/core';
import { CcvpnDetailComponent } from './ccvpn-detail.component';
+import { MyhttpService } from '../myhttp.service';
describe('CcvpnDetailComponent', () => {
let component: CcvpnDetailComponent;
@@ -23,18 +28,40 @@ describe('CcvpnDetailComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ CcvpnDetailComponent ]
+ declarations: [ CcvpnDetailComponent ],
+ imports: [ TranslateModule.forRoot({loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }}),
+ NgZorroAntdModule.forRoot(), HttpClientModule ],
+ providers: [ MyhttpService, { provide: NZ_I18N, useValue: en_US } ]
})
.compileComponents();
}));
beforeEach(() => {
+ let detailshow = false;
+ detailData:Object;
+ let serviceDetail(service){
+ service["siteSer"]=[];
+ service["sdwanSer"]=[];
+ service["customer"]=this.customerSelected;
+ service["serviceType"] = this.serviceTypeSelected;
+
+ service.childServiceInstances.forEach((item)=>{
+ if(item.serviceDomain=="SITE"){
+ service.siteSer.push(item);
+ }else if(item.serviceDomain=="SDWAN"){
+ service.sdwanSer.push(item);
+ }
+ })
+ this.detailshow = true;
+ this.detailData = service;
+ component.detailParams = this.detailData
fixture = TestBed.createComponent(CcvpnDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
+ console.log(component);
expect(component).toBeTruthy();
});
});