]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
1b0c0d65a41a64818da92ea7b321edce739fb9cc
[ceph.git] /
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';
6
7 import { RgwMultisiteDetailsComponent } from './rgw-multisite-details.component';
8
9 describe('RgwMultisiteDetailsComponent', () => {
10   let component: RgwMultisiteDetailsComponent;
11   let fixture: ComponentFixture<RgwMultisiteDetailsComponent>;
12   let debugElement: DebugElement;
13
14   beforeEach(async () => {
15     await TestBed.configureTestingModule({
16       declarations: [RgwMultisiteDetailsComponent],
17       imports: [HttpClientTestingModule, TreeModule, SharedModule]
18     }).compileComponents();
19   });
20
21   beforeEach(() => {
22     fixture = TestBed.createComponent(RgwMultisiteDetailsComponent);
23     component = fixture.componentInstance;
24     debugElement = fixture.debugElement;
25     fixture.detectChanges();
26   });
27
28   it('should create', () => {
29     expect(component).toBeTruthy();
30   });
31
32   it('should display right title', () => {
33     const span = debugElement.nativeElement.querySelector('.card-header');
34     expect(span.textContent).toBe('Multi-site Topology viewer');
35   });
36 });