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';
10 describe('RgwMultisiteDetailsComponent', () => {
11 let component: RgwMultisiteDetailsComponent;
12 let fixture: ComponentFixture<RgwMultisiteDetailsComponent>;
13 let debugElement: DebugElement;
15 beforeEach(async () => {
16 await TestBed.configureTestingModule({
17 declarations: [RgwMultisiteDetailsComponent],
18 imports: [HttpClientTestingModule, TreeModule, SharedModule, ToastrModule.forRoot()]
19 }).compileComponents();
23 fixture = TestBed.createComponent(RgwMultisiteDetailsComponent);
24 component = fixture.componentInstance;
25 debugElement = fixture.debugElement;
26 fixture.detectChanges();
29 it('should create', () => {
30 expect(component).toBeTruthy();
33 it('should display right title', () => {
34 const span = debugElement.nativeElement.querySelector('.card-header');
35 expect(span.textContent).toBe('Multi-site Topology viewer');