mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
fix unit tests
This commit is contained in:
parent
2c830d9693
commit
34e46b32cc
@ -23,7 +23,8 @@ import {
|
|||||||
beforeEach,
|
beforeEach,
|
||||||
beforeEachProviders
|
beforeEachProviders
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
import { PLATFORM_PIPES } from '@angular/core';
|
||||||
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoPipeTranslate } from 'ng2-alfresco-core';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoLoginComponent } from './alfresco-login.component';
|
import { AlfrescoLoginComponent } from './alfresco-login.component';
|
||||||
@ -37,6 +38,7 @@ describe('AlfrescoLogin', () => {
|
|||||||
|
|
||||||
beforeEachProviders(() => {
|
beforeEachProviders(() => {
|
||||||
return [
|
return [
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
{ provide: AlfrescoAuthenticationService, useClass: AuthenticationMock },
|
{ provide: AlfrescoAuthenticationService, useClass: AuthenticationMock },
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock }
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock }
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
|
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 { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
||||||
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
||||||
@ -26,7 +27,8 @@ import {
|
|||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoTranslationService
|
AlfrescoTranslationService,
|
||||||
|
AlfrescoPipeTranslate
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
@ -66,6 +68,7 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
|||||||
|
|
||||||
beforeEachProviders(() => {
|
beforeEachProviders(() => {
|
||||||
return [
|
return [
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||||
AlfrescoThumbnailService,
|
AlfrescoThumbnailService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { it, describe, expect, inject, beforeEachProviders, beforeEach } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { AlfrescoSearchControlComponent } from './alfresco-search-control.component';
|
import { AlfrescoSearchControlComponent } from './alfresco-search-control.component';
|
||||||
@ -26,7 +26,8 @@ import {
|
|||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoTranslationService
|
AlfrescoTranslationService,
|
||||||
|
AlfrescoPipeTranslate
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
|
|
||||||
beforeEachProviders(() => {
|
beforeEachProviders(() => {
|
||||||
return [
|
return [
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
AlfrescoSearchService,
|
AlfrescoSearchService,
|
||||||
provide(AlfrescoTranslationService, {useClass: TranslationMock}),
|
provide(AlfrescoTranslationService, {useClass: TranslationMock}),
|
||||||
AlfrescoThumbnailService,
|
AlfrescoThumbnailService,
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { PLATFORM_PIPES } from '@angular/core';
|
||||||
import { it, describe, expect, inject, beforeEachProviders, beforeEach } from '@angular/core/testing';
|
import { it, describe, expect, inject, beforeEachProviders, beforeEach } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { RouteParams } from '@angular/router-deprecated';
|
import { RouteParams } from '@angular/router-deprecated';
|
||||||
@ -27,7 +28,8 @@ import {
|
|||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoTranslationService
|
AlfrescoTranslationService,
|
||||||
|
AlfrescoPipeTranslate
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
@ -67,6 +69,7 @@ describe('AlfrescoSearchComponent', () => {
|
|||||||
|
|
||||||
beforeEachProviders(() => {
|
beforeEachProviders(() => {
|
||||||
return [
|
return [
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
AlfrescoSearchService,
|
AlfrescoSearchService,
|
||||||
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||||
AlfrescoThumbnailService,
|
AlfrescoThumbnailService,
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { PLATFORM_PIPES } from '@angular/core';
|
||||||
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
@ -24,7 +25,8 @@ import {
|
|||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService,
|
||||||
|
AlfrescoPipeTranslate
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { FileUploadingDialogComponent } from './file-uploading-dialog.component';
|
import { FileUploadingDialogComponent } from './file-uploading-dialog.component';
|
||||||
@ -43,6 +45,7 @@ describe('FileUploadDialog', () => {
|
|||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
UploadService
|
UploadService
|
||||||
];
|
];
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { PLATFORM_PIPES } from '@angular/core';
|
||||||
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
import { HTTP_PROVIDERS } from '@angular/http';
|
||||||
@ -23,7 +24,8 @@ import {
|
|||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService,
|
||||||
|
AlfrescoPipeTranslate
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { UploadButtonComponent } from './upload-button.component';
|
import { UploadButtonComponent } from './upload-button.component';
|
||||||
@ -79,6 +81,7 @@ describe('AlfrescoUploadButton', () => {
|
|||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
UploadService
|
UploadService
|
||||||
];
|
];
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { PLATFORM_PIPES } from '@angular/core';
|
||||||
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { UploadDragAreaComponent } from './upload-drag-area.component';
|
import { UploadDragAreaComponent } from './upload-drag-area.component';
|
||||||
import { AlfrescoTranslationService, AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoApiService, AlfrescoPipeTranslate } from 'ng2-alfresco-core';
|
||||||
import { TranslationMock } from '../assets/translation.service.mock';
|
import { TranslationMock } from '../assets/translation.service.mock';
|
||||||
import { UploadService } from '../services/upload.service';
|
import { UploadService } from '../services/upload.service';
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
import { HTTP_PROVIDERS } from '@angular/http';
|
||||||
@ -40,6 +41,7 @@ describe('AlfrescoUploadDragArea', () => {
|
|||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
||||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
UploadService
|
UploadService
|
||||||
];
|
];
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { PLATFORM_PIPES } from '@angular/core';
|
||||||
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing';
|
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing';
|
||||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import { WebscriptComponent } from '../src/webscript.component';
|
import { WebscriptComponent } from '../src/webscript.component';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService, AlfrescoPipeTranslate } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@ -30,7 +31,8 @@ describe('Test ng2-alfresco-webscript', () => {
|
|||||||
return [
|
return [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoApiService
|
AlfrescoApiService,
|
||||||
|
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true }
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user