1 import { HttpClientTestingModule } from '@angular/common/http/testing';
2 import { ComponentFixture, TestBed } from '@angular/core/testing';
3 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4 import { RouterTestingModule } from '@angular/router/testing';
6 import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
7 import { ToastrModule } from 'ngx-toastr';
13 } from '../../../../../testing/unit-test-helper';
14 import { CoreModule } from '../../../../core/core.module';
15 import { Permissions } from '../../../../shared/models/permissions';
16 import { SharedModule } from '../../../../shared/shared.module';
17 import { CephModule } from '../../../ceph.module';
18 import { CephSharedModule } from '../../../shared/ceph-shared.module';
19 import { HostDetailsComponent } from './host-details.component';
21 describe('HostDetailsComponent', () => {
22 let component: HostDetailsComponent;
23 let fixture: ComponentFixture<HostDetailsComponent>;
27 BrowserAnimationsModule,
28 HttpClientTestingModule,
29 NgBootstrapFormValidationModule.forRoot(),
35 ToastrModule.forRoot()
38 providers: [i18nProviders]
42 fixture = TestBed.createComponent(HostDetailsComponent);
43 component = fixture.componentInstance;
44 component.selection = undefined;
45 component.permissions = new Permissions({
51 it('should create', () => {
52 expect(component).toBeTruthy();
55 describe('Host details tabset', () => {
57 component.selection = { hostname: 'localhost' };
58 fixture.detectChanges();
61 it('should recognize a tabset child', () => {
62 const tabsetChild = TabHelper.getNgbNav(fixture);
63 expect(tabsetChild).toBeDefined();
66 it('should show tabs', () => {
67 expect(TabHelper.getTextContents(fixture)).toEqual([
71 'Performance Details',