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