Skip to content

Commit

Permalink
SHIBUI-814 Fixed for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 20, 2018
1 parent f3d5223 commit 153e2c7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ui/src/testing/i18n.stub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore */

import { PipeTransform, Pipe, NgModule, Directive, Component } from '@angular/core';
import { PipeTransform, Pipe, NgModule, Directive, Component, Input } from '@angular/core';

import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
Expand All @@ -9,7 +9,7 @@ import { CommonModule } from '@angular/common';
/*tslint:disable:component-selector */

@Pipe({
name: 'i18n',
name: 'translate',
pure: false
})
export class MockTranslatePipe implements PipeTransform {
Expand All @@ -24,14 +24,20 @@ export class MockTranslatePipe implements PipeTransform {
@Directive({
selector: '[translate]'
})
export class MockTranslateDirective {}
export class MockTranslateDirective {
@Input() translate: any | null;
@Input() translateParams: any | null;
}


@Component({
selector: 'translate-18n',
selector: 'translate-i18n',
template: '<ng-content></ng-content>'
})
export class MockTranslateComponent { }
export class MockTranslateComponent {
@Input() key: any | null;
@Input() params: any | null;
}

@Injectable()
export class MockI18nService {
Expand Down

0 comments on commit 153e2c7

Please sign in to comment.