1 import { HttpClientTestingModule } from '@angular/common/http/testing';
2 import { DebugElement } from '@angular/core';
3 import { ComponentFixture, TestBed } from '@angular/core/testing';
4 import { TreeModule } from '@circlon/angular-tree-component';
5 import { ToastrModule } from 'ngx-toastr';
6 import { SharedModule } from '~/app/shared/shared.module';
8 import { RgwMultisiteDetailsComponent } from './rgw-multisite-details.component';
9 import { RouterTestingModule } from '@angular/router/testing';
10 import { configureTestBed } from '~/testing/unit-test-helper';
12 describe('RgwMultisiteDetailsComponent', () => {
13 let component: RgwMultisiteDetailsComponent;
14 let fixture: ComponentFixture<RgwMultisiteDetailsComponent>;
15 let debugElement: DebugElement;
18 declarations: [RgwMultisiteDetailsComponent],
20 HttpClientTestingModule,
23 ToastrModule.forRoot(),
29 fixture = TestBed.createComponent(RgwMultisiteDetailsComponent);
30 component = fixture.componentInstance;
31 debugElement = fixture.debugElement;
32 fixture.detectChanges();
35 it('should create', () => {
36 expect(component).toBeTruthy();
39 it('should display right title', () => {
40 const span = debugElement.nativeElement.querySelector('.card-header');
41 expect(span.textContent).toBe('Topology Viewer');