mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
58f7a2d0ee
commit
0e2e5e35a0
@@ -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;
|
||||
|
Reference in New Issue
Block a user