]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { HttpClientTestingModule } from '@angular/common/http/testing'; |
2 | import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
3 | import { FormsModule } from '@angular/forms'; | |
9f95a23c | 4 | import { By } from '@angular/platform-browser'; |
11fdf7f2 TL |
5 | import { RouterTestingModule } from '@angular/router/testing'; |
6 | ||
7 | import { TabsModule } from 'ngx-bootstrap/tabs'; | |
8 | ||
9 | import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper'; | |
10 | import { SharedModule } from '../../../shared/shared.module'; | |
11 | import { ConfigurationDetailsComponent } from './configuration-details/configuration-details.component'; | |
12 | import { ConfigurationComponent } from './configuration.component'; | |
13 | ||
14 | describe('ConfigurationComponent', () => { | |
15 | let component: ConfigurationComponent; | |
16 | let fixture: ComponentFixture<ConfigurationComponent>; | |
17 | ||
18 | configureTestBed({ | |
19 | declarations: [ConfigurationComponent, ConfigurationDetailsComponent], | |
20 | imports: [ | |
21 | SharedModule, | |
22 | FormsModule, | |
23 | TabsModule.forRoot(), | |
24 | HttpClientTestingModule, | |
25 | RouterTestingModule | |
26 | ], | |
27 | providers: i18nProviders | |
28 | }); | |
29 | ||
30 | beforeEach(() => { | |
31 | fixture = TestBed.createComponent(ConfigurationComponent); | |
32 | component = fixture.componentInstance; | |
33 | fixture.detectChanges(); | |
34 | }); | |
35 | ||
36 | it('should create', () => { | |
37 | expect(component).toBeTruthy(); | |
38 | }); | |
9f95a23c TL |
39 | |
40 | it('should check header text', () => { | |
41 | expect(fixture.debugElement.query(By.css('.datatable-header')).nativeElement.textContent).toBe( | |
42 | ['Name', 'Description', 'Current value', 'Default', 'Editable'].join('') | |
43 | ); | |
44 | }); | |
11fdf7f2 | 45 | }); |