mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix unit tests
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
import { it, describe, expect, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
||||
import { PLATFORM_PIPES } from '@angular/core';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
||||
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
||||
@@ -26,7 +27,8 @@ import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoTranslationService
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoPipeTranslate
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
@@ -66,6 +68,7 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||
AlfrescoThumbnailService,
|
||||
AlfrescoSettingsService,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { provide } from '@angular/core';
|
||||
import { provide, PLATFORM_PIPES } from '@angular/core';
|
||||
import { it, describe, expect, inject, beforeEachProviders, beforeEach } from '@angular/core/testing';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
import { AlfrescoSearchControlComponent } from './alfresco-search-control.component';
|
||||
@@ -26,7 +26,8 @@ import {
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoTranslationService
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoPipeTranslate
|
||||
} from 'ng2-alfresco-core';
|
||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||
|
||||
@@ -37,6 +38,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||
AlfrescoSearchService,
|
||||
provide(AlfrescoTranslationService, {useClass: TranslationMock}),
|
||||
AlfrescoThumbnailService,
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { PLATFORM_PIPES } from '@angular/core';
|
||||
import { it, describe, expect, inject, beforeEachProviders, beforeEach } from '@angular/core/testing';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
import { RouteParams } from '@angular/router-deprecated';
|
||||
@@ -27,7 +28,8 @@ import {
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoTranslationService
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoPipeTranslate
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
@@ -67,6 +69,7 @@ describe('AlfrescoSearchComponent', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||
AlfrescoSearchService,
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||
AlfrescoThumbnailService,
|
||||
|
Reference in New Issue
Block a user