[ADF-3126] i18n support for info drawer tabs (#4698)

* [ADF-3126] i18n support for info drawer tabs

* fix tests

* code fixes
This commit is contained in:
Denys Vuika
2019-05-07 17:31:22 +01:00
committed by Eugenio Romano
parent 58f7a2d0ee
commit 0e2e5e35a0
8 changed files with 27 additions and 15 deletions

View File

@@ -23,11 +23,14 @@ import { InfoDrawerComponent } from './info-drawer.component';
import { setupTestBed } from '../testing/setupTestBed';
import { CoreModule } from '../core.module';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { of } from 'rxjs';
import { TranslateService } from '@ngx-translate/core';
describe('InfoDrawerComponent', () => {
let element: HTMLElement;
let component: InfoDrawerComponent;
let fixture: ComponentFixture<InfoDrawerComponent>;
let translateService: TranslateService;
setupTestBed({
imports: [
@@ -37,6 +40,9 @@ describe('InfoDrawerComponent', () => {
});
beforeEach(() => {
translateService = TestBed.get(TranslateService);
spyOn(translateService, 'get').and.callFake((key) => of(key));
fixture = TestBed.createComponent(InfoDrawerComponent);
element = fixture.nativeElement;
component = fixture.componentInstance;
@@ -87,6 +93,7 @@ class CustomInfoDrawerComponent extends InfoDrawerComponent {
describe('Custom InfoDrawer', () => {
let fixture: ComponentFixture<CustomInfoDrawerComponent>;
let component: CustomInfoDrawerComponent;
let translateService: TranslateService;
setupTestBed({
imports: [
@@ -99,6 +106,9 @@ describe('Custom InfoDrawer', () => {
});
beforeEach(() => {
translateService = TestBed.get(TranslateService);
spyOn(translateService, 'get').and.callFake((key) => of(key));
fixture = TestBed.createComponent(CustomInfoDrawerComponent);
fixture.detectChanges();
component = fixture.componentInstance;