]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.spec.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / rgw / rgw-multisite-details / rgw-multisite-details.component.spec.ts
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 import { RouterTestingModule } from '@angular/router/testing';
10 import { configureTestBed } from '~/testing/unit-test-helper';
11
12 describe('RgwMultisiteDetailsComponent', () => {
13 let component: RgwMultisiteDetailsComponent;
14 let fixture: ComponentFixture<RgwMultisiteDetailsComponent>;
15 let debugElement: DebugElement;
16
17 configureTestBed({
18 declarations: [RgwMultisiteDetailsComponent],
19 imports: [
20 HttpClientTestingModule,
21 TreeModule,
22 SharedModule,
23 ToastrModule.forRoot(),
24 RouterTestingModule
25 ]
26 });
27
28 beforeEach(() => {
29 fixture = TestBed.createComponent(RgwMultisiteDetailsComponent);
30 component = fixture.componentInstance;
31 debugElement = fixture.debugElement;
32 fixture.detectChanges();
33 });
34
35 it('should create', () => {
36 expect(component).toBeTruthy();
37 });
38
39 it('should display right title', () => {
40 const span = debugElement.nativeElement.querySelector('.card-header');
41 expect(span.textContent).toBe('Topology Viewer');
42 });
43 });