1 import { HttpClientTestingModule } from '@angular/common/http/testing';
2 import { ComponentFixture, TestBed } from '@angular/core/testing';
3 import { FormsModule } from '@angular/forms';
4 import { By } from '@angular/platform-browser';
5 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
6 import { RouterTestingModule } from '@angular/router/testing';
8 import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
10 import { SharedModule } from '~/app/shared/shared.module';
11 import { configureTestBed } from '~/testing/unit-test-helper';
12 import { ConfigurationDetailsComponent } from './configuration-details/configuration-details.component';
13 import { ConfigurationComponent } from './configuration.component';
15 describe('ConfigurationComponent', () => {
16 let component: ConfigurationComponent;
17 let fixture: ComponentFixture<ConfigurationComponent>;
20 declarations: [ConfigurationComponent, ConfigurationDetailsComponent],
22 BrowserAnimationsModule,
26 HttpClientTestingModule,
32 fixture = TestBed.createComponent(ConfigurationComponent);
33 component = fixture.componentInstance;
34 fixture.detectChanges();
37 it('should create', () => {
38 expect(component).toBeTruthy();
41 it('should check header text', () => {
42 expect(fixture.debugElement.query(By.css('.datatable-header')).nativeElement.textContent).toBe(
43 ['Name', 'Description', 'Current value', 'Default', 'Editable'].join('')