summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.spec.ts')
-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();
});
});