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 { SharedModule } from '~/app/shared/shared.module';
7 import { RgwMultisiteDetailsComponent } from './rgw-multisite-details.component';
9 describe('RgwMultisiteDetailsComponent', () => {
10 let component: RgwMultisiteDetailsComponent;
11 let fixture: ComponentFixture<RgwMultisiteDetailsComponent>;
12 let debugElement: DebugElement;
14 beforeEach(async () => {
15 await TestBed.configureTestingModule({
16 declarations: [RgwMultisiteDetailsComponent],
17 imports: [HttpClientTestingModule, TreeModule, SharedModule]
18 }).compileComponents();
22 fixture = TestBed.createComponent(RgwMultisiteDetailsComponent);
23 component = fixture.componentInstance;
24 debugElement = fixture.debugElement;
25 fixture.detectChanges();
28 it('should create', () => {
29 expect(component).toBeTruthy();
32 it('should display right title', () => {
33 const span = debugElement.nativeElement.querySelector('.card-header');
34 expect(span.textContent).toBe('Multi-site Topology viewer');