mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
Ivy compatible test modules (#5718)
* ivy compatible core unit tests * ivy compatible content tests * ivy compatible process tests * ivy compatible process cloud tests * ivy compatible insights tests * fix content test * fix content test
This commit is contained in:
parent
9f2faee027
commit
ae3ac440bc
@ -24,6 +24,7 @@ import { DocumentListComponent, DocumentListService } from '../document-list';
|
||||
import { BreadcrumbComponent } from './breadcrumb.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('Breadcrumb', () => {
|
||||
|
||||
@ -36,7 +37,10 @@ describe('Breadcrumb', () => {
|
||||
let documentListComponent: DocumentListComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
providers : [{ provide: DocumentListService, useValue: documentListService }]
|
||||
});
|
||||
|
@ -24,6 +24,7 @@ import { DocumentListComponent, DocumentListService } from '../document-list';
|
||||
import { DropdownBreadcrumbComponent } from './dropdown-breadcrumb.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DropdownBreadcrumb', () => {
|
||||
|
||||
@ -33,7 +34,10 @@ describe('DropdownBreadcrumb', () => {
|
||||
let documentListService: DocumentListService = jasmine.createSpyObj({'loadFolderByNodeId' : of(''), 'isCustomSourceService': false});
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
providers : [{ provide: DocumentListService, useValue: documentListService }]
|
||||
});
|
||||
|
@ -23,6 +23,7 @@ import { ContentMetadataComponent } from '../content-metadata/content-metadata.c
|
||||
import { setupTestBed, AllowableOperationsEnum } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContentMetadataCardComponent', () => {
|
||||
|
||||
@ -32,7 +33,10 @@ describe('ContentMetadataCardComponent', () => {
|
||||
const preset = 'custom-preset';
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -28,6 +28,7 @@ import {
|
||||
import { throwError, of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { mockGroupProperties } from './mock-data';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContentMetadataComponent', () => {
|
||||
let component: ContentMetadataComponent;
|
||||
@ -40,7 +41,10 @@ describe('ContentMetadataComponent', () => {
|
||||
const preset = 'custom-preset';
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [{ provide: LogService, useValue: { error: jasmine.createSpy('error') } }]
|
||||
});
|
||||
|
||||
|
@ -22,6 +22,7 @@ import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { ContentMetadataService } from './content-metadata.service';
|
||||
import { of } from 'rxjs';
|
||||
import { PropertyGroup } from '../interfaces/property-group.interface';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContentMetaDataService', () => {
|
||||
|
||||
@ -47,7 +48,10 @@ describe('ContentMetaDataService', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
function setConfig(presetName, presetConfig) {
|
||||
|
@ -22,6 +22,7 @@ import { of } from 'rxjs';
|
||||
import { ClassesApi } from '@alfresco/js-api';
|
||||
import { PropertyGroup } from '../interfaces/content-metadata.interfaces';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('PropertyDescriptorLoaderService', () => {
|
||||
|
||||
@ -29,7 +30,10 @@ describe('PropertyDescriptorLoaderService', () => {
|
||||
let classesApi: ClassesApi;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -29,6 +29,7 @@ import {
|
||||
setupTestBed
|
||||
} from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('PropertyGroupTranslatorService', () => {
|
||||
|
||||
@ -40,7 +41,10 @@ describe('PropertyGroupTranslatorService', () => {
|
||||
let logService: LogService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -23,6 +23,7 @@ import { ContentNodeDialogService } from './content-node-dialog.service';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { Subject, of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const fakeNodeEntry: NodeEntry = <NodeEntry> {
|
||||
entry: {
|
||||
@ -67,7 +68,10 @@ describe('ContentNodeDialogService', () => {
|
||||
let afterOpenObservable: Subject<any>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -30,6 +30,7 @@ import { DocumentListComponent } from '../document-list/components/document-list
|
||||
import { DropdownSitesComponent } from '../site-dropdown/sites-dropdown.component';
|
||||
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
|
||||
import { ShareDataRow } from '../document-list';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const ONE_FOLDER_RESULT = {
|
||||
list: {
|
||||
@ -73,7 +74,10 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
}
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -28,6 +28,7 @@ import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||
import { ShareDataRow } from '../document-list';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContentNodeSelectorDialogComponent', () => {
|
||||
|
||||
@ -43,7 +44,10 @@ describe('ContentNodeSelectorDialogComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MAT_DIALOG_DATA, useValue: data }
|
||||
],
|
||||
|
@ -20,6 +20,7 @@ import { QueryBody } from '@alfresco/js-api';
|
||||
import { SearchService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentNodeSelectorService } from './content-node-selector.service';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
class SearchServiceMock {
|
||||
public query: QueryBody;
|
||||
@ -35,7 +36,10 @@ describe('ContentNodeSelectorService', () => {
|
||||
let search: SearchServiceMock;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: SearchService, useClass: SearchServiceMock }
|
||||
]
|
||||
|
@ -24,14 +24,12 @@ import {
|
||||
NodesApiService,
|
||||
NotificationService,
|
||||
RenditionsService,
|
||||
AppConfigService,
|
||||
AppConfigServiceMock,
|
||||
AlfrescoApiService,
|
||||
AlfrescoApiServiceMock
|
||||
AppConfigService
|
||||
} from '@alfresco/adf-core';
|
||||
import { ShareDialogComponent } from './content-node-share.dialog';
|
||||
import moment from 'moment-es6';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ShareDialogComponent', () => {
|
||||
let node;
|
||||
@ -48,11 +46,10 @@ describe('ShareDialogComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
ContentTestingModule
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||
{ provide: NotificationService, useValue: notificationServiceMock },
|
||||
{ provide: MatDialogRef, useValue: { close: () => {}} },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: {} }
|
||||
|
@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Component } from '@angular/core';
|
||||
@ -23,6 +22,7 @@ import { DOCUMENT } from '@angular/common';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
import { ContentNodeShareModule } from './content-node-share.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-node-share-test-component',
|
||||
@ -52,7 +52,7 @@ describe('NodeSharedDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
ContentTestingModule,
|
||||
ContentNodeShareModule
|
||||
|
@ -40,53 +40,6 @@ import { ContentMetadataModule } from './content-metadata/content-metadata.modul
|
||||
import { PermissionManagerModule } from './permission-manager/permission-manager.module';
|
||||
import { TreeViewModule } from './tree-view/tree-view.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CoreModule,
|
||||
SocialModule,
|
||||
TagModule,
|
||||
CommonModule,
|
||||
WebScriptModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
DialogModule,
|
||||
SearchModule,
|
||||
DocumentListModule,
|
||||
UploadModule,
|
||||
MaterialModule,
|
||||
SitesDropdownModule,
|
||||
BreadcrumbModule,
|
||||
ContentNodeSelectorModule,
|
||||
ContentNodeShareModule,
|
||||
ContentMetadataModule,
|
||||
FolderDirectiveModule,
|
||||
ContentDirectiveModule,
|
||||
PermissionManagerModule,
|
||||
VersionManagerModule,
|
||||
TreeViewModule
|
||||
],
|
||||
exports: [
|
||||
SocialModule,
|
||||
TagModule,
|
||||
WebScriptModule,
|
||||
DocumentListModule,
|
||||
UploadModule,
|
||||
SearchModule,
|
||||
SitesDropdownModule,
|
||||
BreadcrumbModule,
|
||||
ContentNodeSelectorModule,
|
||||
ContentNodeShareModule,
|
||||
ContentMetadataModule,
|
||||
DialogModule,
|
||||
FolderDirectiveModule,
|
||||
ContentDirectiveModule,
|
||||
PermissionManagerModule,
|
||||
VersionManagerModule,
|
||||
TreeViewModule
|
||||
]
|
||||
})
|
||||
export class ContentModuleLazy {}
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CoreModule,
|
||||
@ -161,7 +114,7 @@ export class ContentModule {
|
||||
|
||||
static forChild(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: ContentModuleLazy
|
||||
ngModule: ContentModule
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ConfirmDialogComponent } from './confirm.dialog';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('Confirm Dialog Component', () => {
|
||||
let fixture: ComponentFixture<ConfirmDialogComponent>;
|
||||
@ -38,7 +39,10 @@ describe('Confirm Dialog Component', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: dialogRef },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: data }
|
||||
|
@ -22,6 +22,7 @@ import { FolderDialogComponent } from './folder.dialog';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('FolderDialogComponent', () => {
|
||||
|
||||
@ -33,7 +34,10 @@ describe('FolderDialogComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: dialogRef }
|
||||
]
|
||||
|
@ -21,6 +21,7 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material';
|
||||
import { AlfrescoApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('LibraryDialogComponent', () => {
|
||||
let fixture;
|
||||
@ -34,6 +35,7 @@ describe('LibraryDialogComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
|
@ -23,6 +23,7 @@ import { AlfrescoApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { NodeBodyLock } from '@alfresco/js-api';
|
||||
import { NodeLockDialogComponent } from './node-lock.dialog';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('NodeLockDialogComponent', () => {
|
||||
|
||||
@ -35,7 +36,10 @@ describe('NodeLockDialogComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: dialogRef }
|
||||
]
|
||||
|
@ -24,6 +24,7 @@ import { Node } from '@alfresco/js-api';
|
||||
import { ContentNodeDialogService } from '../content-node-selector/content-node-dialog.service';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const fakeNode: Node = <Node> {
|
||||
id: 'fake',
|
||||
@ -46,6 +47,7 @@ describe('NodeLock Directive', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -22,6 +22,7 @@ import { ContentActionModel } from './../../models/content-action.model';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentActionListComponent } from './content-action-list.component';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContentColumnList', () => {
|
||||
|
||||
@ -29,7 +30,10 @@ describe('ContentColumnList', () => {
|
||||
let actionList: ContentActionListComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -27,6 +27,7 @@ import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentActionListComponent } from './content-action-list.component';
|
||||
import { ContentActionComponent } from './content-action.component';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContentAction', () => {
|
||||
|
||||
@ -39,7 +40,10 @@ describe('ContentAction', () => {
|
||||
let nodeActionsService: NodeActionsService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -47,6 +47,7 @@ import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { DocumentListModule } from '../document-list.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DocumentList', () => {
|
||||
|
||||
@ -63,7 +64,10 @@ describe('DocumentList', () => {
|
||||
let spyFolderNode: any;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
@ -1512,6 +1516,7 @@ describe('DocumentListComponent rendering', () => {
|
||||
setupTestBed({
|
||||
declarations: [CustomTemplateComponent],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule,
|
||||
DataTableModule,
|
||||
DocumentListModule
|
||||
|
@ -20,6 +20,7 @@ import { NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { LibraryNameColumnComponent } from './library-name-column.component';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('LibraryNameColumnComponent', () => {
|
||||
let fixture: ComponentFixture<LibraryNameColumnComponent>;
|
||||
@ -27,7 +28,10 @@ describe('LibraryNameColumnComponent', () => {
|
||||
let node;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -20,13 +20,17 @@ import { LibraryRoleColumnComponent } from './library-role-column.component';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('LibraryNameColumnComponent', () => {
|
||||
let fixture: ComponentFixture<LibraryRoleColumnComponent>;
|
||||
let component: LibraryRoleColumnComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -21,6 +21,7 @@ import { ShareDataRow } from './share-data-row.model';
|
||||
import { ShareDataTableAdapter } from './share-datatable-adapter';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ShareDataTableAdapter', () => {
|
||||
|
||||
@ -28,7 +29,10 @@ describe('ShareDataTableAdapter', () => {
|
||||
let contentService: ContentService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -25,6 +25,7 @@ import { DocumentListService } from './document-list.service';
|
||||
import { of } from 'rxjs';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DocumentActionsService', () => {
|
||||
|
||||
@ -33,6 +34,7 @@ describe('DocumentActionsService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
|
@ -21,6 +21,7 @@ import { DocumentListService } from './document-list.service';
|
||||
import { CustomResourcesService } from './custom-resources.service';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@ -65,6 +66,7 @@ describe('DocumentListService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -23,6 +23,7 @@ import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { FolderActionsService } from './folder-actions.service';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('FolderActionsService', () => {
|
||||
|
||||
@ -31,6 +32,7 @@ describe('FolderActionsService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -24,6 +24,7 @@ import { ContentNodeDialogService } from '../../content-node-selector/content-no
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { MatDialogRef } from '@angular/material';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const fakeNode: Node = <Node> {
|
||||
id: 'fake'
|
||||
@ -40,6 +41,7 @@ describe('NodeActionsService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
|
@ -25,6 +25,7 @@ import { ContentService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { FolderCreateDirective } from './folder-create.directive';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@ -63,6 +64,7 @@ describe('FolderCreateDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -25,6 +25,7 @@ import { ContentService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { FolderEditDirective } from './folder-edit.directive';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
template: '<div [adf-edit-folder]="folder" (success)="success($event)" title="edit-title"></div>'
|
||||
@ -52,6 +53,7 @@ describe('FolderEditDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -27,6 +27,7 @@ import { Subject } from 'rxjs';
|
||||
import { AddPermissionDialogData } from './add-permission-dialog-data.interface';
|
||||
import { fakeAuthorityResults } from '../../../mock/add-permission.component.mock';
|
||||
import { AddPermissionPanelComponent } from './add-permission-panel.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AddPermissionDialog', () => {
|
||||
|
||||
@ -42,7 +43,10 @@ describe('AddPermissionDialog', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: dialogRef },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: data }
|
||||
|
@ -23,6 +23,7 @@ import { of } from 'rxjs';
|
||||
import { fakeAuthorityListResult, fakeNameListResult } from '../../../mock/add-permission.component.mock';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AddPermissionPanelComponent', () => {
|
||||
|
||||
@ -33,7 +34,10 @@ describe('AddPermissionPanelComponent', () => {
|
||||
let debugElement: DebugElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -25,6 +25,7 @@ import { fakeAuthorityResults } from '../../../mock/add-permission.component.moc
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { NodePermissionService } from '../../services/node-permission.service';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AddPermissionComponent', () => {
|
||||
|
||||
@ -35,6 +36,7 @@ describe('AddPermissionComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -20,6 +20,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { NodesApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const fakeNodeWithInherit: any = { id: 'fake-id', permissions : {isInheritanceEnabled : true}, allowableOperations: ['updatePermissions']};
|
||||
const fakeNodeNoInherit: any = { id: 'fake-id', permissions : {isInheritanceEnabled : false}, allowableOperations: ['updatePermissions']};
|
||||
@ -34,6 +35,7 @@ describe('InheritPermissionDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -29,6 +29,7 @@ import { fakeNodeWithPermissions,
|
||||
fakeNodeWithoutPermissions,
|
||||
fakeEmptyResponse } from '../../../mock/permission-list.component.mock';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('PermissionDisplayComponent', () => {
|
||||
|
||||
@ -40,7 +41,10 @@ describe('PermissionDisplayComponent', () => {
|
||||
let searchApiService: SearchService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -23,6 +23,7 @@ import { Subject, of, throwError } from 'rxjs';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { NodePermissionService } from './node-permission.service';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('NodePermissionDialogService', () => {
|
||||
|
||||
@ -34,7 +35,10 @@ describe('NodePermissionDialogService', () => {
|
||||
let contentService: ContentService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -24,6 +24,7 @@ import { fakeEmptyResponse, fakeNodeWithOnlyLocally, fakeSiteRoles, fakeSiteNode
|
||||
fakeNodeToRemovePermission, fakeNodeWithoutPermissions } from '../../mock/permission-list.component.mock';
|
||||
import { fakeAuthorityResults } from '../../mock/add-permission.component.mock';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('NodePermissionService', () => {
|
||||
|
||||
@ -33,6 +34,7 @@ describe('NodePermissionService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -22,13 +22,17 @@ import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { sizeOptions, stepOne, stepThree } from '../../../mock';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('SearchCheckListComponent', () => {
|
||||
let fixture: ComponentFixture<SearchCheckListComponent>;
|
||||
let component: SearchCheckListComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ ContentTestingModule ]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -21,6 +21,7 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { SelectedBucket } from '../search-filter/search-filter.component';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
@ -45,6 +46,7 @@ describe('SearchChipListComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -29,6 +29,7 @@ import { noResult, results } from '../../mock';
|
||||
import { SearchControlComponent } from './search-control.component';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@ -65,6 +66,7 @@ describe('SearchControlComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -20,6 +20,7 @@ import { MomentDateAdapter, setupTestBed } from '@alfresco/adf-core';
|
||||
import { DateAdapter } from '@angular/material/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let moment: any;
|
||||
|
||||
@ -34,6 +35,7 @@ describe('SearchDateRangeComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -37,6 +37,7 @@ import {
|
||||
stepThree,
|
||||
stepTwo
|
||||
} from '../../../mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('SearchFilterComponent', () => {
|
||||
let fixture: ComponentFixture<SearchFilterComponent>;
|
||||
@ -49,6 +50,7 @@ describe('SearchFilterComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
|
@ -21,14 +21,18 @@ import { SearchRadioComponent } from './search-radio.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('SearchRadioComponent', () => {
|
||||
let fixture: ComponentFixture<SearchRadioComponent>;
|
||||
let component: SearchRadioComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ ContentTestingModule ]
|
||||
});
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SearchRadioComponent);
|
||||
|
@ -20,6 +20,7 @@ import { SearchSliderComponent } from './search-slider.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('SearchSliderComponent', () => {
|
||||
let fixture: ComponentFixture<SearchSliderComponent>;
|
||||
@ -27,6 +28,7 @@ describe('SearchSliderComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -19,13 +19,17 @@ import { SearchTextComponent } from './search-text.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('SearchTextComponent', () => {
|
||||
let fixture: ComponentFixture<SearchTextComponent>;
|
||||
let component: SearchTextComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ ContentTestingModule ]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -20,6 +20,7 @@ import { SearchService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { differentResult, result, SimpleSearchTestComponent } from '../../mock';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('SearchComponent', () => {
|
||||
|
||||
@ -29,6 +30,7 @@ describe('SearchComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [SimpleSearchTestComponent]
|
||||
|
@ -28,6 +28,7 @@ import { getFakeSitePaging,
|
||||
getFakeSitePagingWithMembers
|
||||
} from '../mock';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const customSiteList = {
|
||||
'list': {
|
||||
@ -58,6 +59,7 @@ describe('DropdownSitesComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -22,6 +22,7 @@ import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { RatingService } from './services/rating.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('Like component', () => {
|
||||
|
||||
@ -31,7 +32,10 @@ describe('Like component', () => {
|
||||
let service: RatingService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@ -22,6 +22,7 @@ import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { RatingService } from './services/rating.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('Rating component', () => {
|
||||
|
||||
@ -31,7 +32,10 @@ describe('Rating component', () => {
|
||||
let service: RatingService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -19,6 +19,7 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { RatingService } from './rating.service';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@ -27,7 +28,10 @@ describe('Rating service', () => {
|
||||
let service;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -19,6 +19,7 @@ import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { TagService } from './tag.service';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@ -27,7 +28,10 @@ describe('TagService', () => {
|
||||
let service: TagService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -19,6 +19,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { TagActionsComponent } from './tag-actions.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@ -29,7 +30,10 @@ describe('TagActionsComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -21,6 +21,7 @@ import { TagService } from './services/tag.service';
|
||||
import { TagListComponent } from '././tag-list.component';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TagList', () => {
|
||||
|
||||
@ -47,7 +48,10 @@ describe('TagList', () => {
|
||||
let tagService: TagService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -21,6 +21,7 @@ import { TagNodeListComponent } from './tag-node-list.component';
|
||||
import { TagService } from './services/tag.service';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TagNodeList', () => {
|
||||
|
||||
@ -47,7 +48,10 @@ describe('TagNodeList', () => {
|
||||
let tagService: TagService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -36,9 +36,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
RouterTestingModule,
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
ContentModule.forRoot()
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
ContentModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
|
@ -24,6 +24,7 @@ import { of, throwError } from 'rxjs';
|
||||
import { TreeBaseNode } from '../models/tree-view.model';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TreeViewComponent', () => {
|
||||
|
||||
@ -73,6 +74,7 @@ describe('TreeViewComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: []
|
||||
|
@ -21,6 +21,7 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { TreeBaseNode } from '../models/tree-view.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TreeViewService', () => {
|
||||
|
||||
@ -37,7 +38,10 @@ describe('TreeViewService', () => {
|
||||
] } };
|
||||
|
||||
setupTestBed({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -21,6 +21,7 @@ import { TranslationService, UploadService, setupTestBed, FileModel } from '@alf
|
||||
import { UploadBase } from './upload-base';
|
||||
import { UploadFilesEvent } from '../upload-files.event';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-upload-button-test',
|
||||
@ -43,6 +44,7 @@ describe('UploadBase', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -18,11 +18,12 @@
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
|
||||
import {
|
||||
FileModel, FileUploadCompleteEvent, FileUploadErrorEvent, UploadService, setupTestBed, AlfrescoApiService, AlfrescoApiServiceMock, UserPreferencesService
|
||||
FileModel, FileUploadCompleteEvent, FileUploadErrorEvent, UploadService, setupTestBed, UserPreferencesService
|
||||
} from '@alfresco/adf-core';
|
||||
import { UploadModule } from '../upload.module';
|
||||
import { FileUploadingDialogComponent } from './file-uploading-dialog.component';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('FileUploadingDialogComponent', () => {
|
||||
let fixture: ComponentFixture<FileUploadingDialogComponent>;
|
||||
@ -34,11 +35,9 @@ describe('FileUploadingDialogComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule,
|
||||
UploadModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -19,6 +19,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FileModel, FileUploadOptions, FileUploadStatus, setupTestBed } from '@alfresco/adf-core';
|
||||
import { FileUploadingListRowComponent } from './file-uploading-list-row.component';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('FileUploadingListRowComponent', () => {
|
||||
let fixture: ComponentFixture<FileUploadingListRowComponent>;
|
||||
@ -27,6 +28,7 @@ describe('FileUploadingListRowComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -20,6 +20,7 @@ import { TranslationService, FileUploadStatus, NodesApiService, UploadService, s
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('FileUploadingListComponent', () => {
|
||||
let fixture: ComponentFixture<FileUploadingListComponent>;
|
||||
@ -35,6 +36,7 @@ describe('FileUploadingListComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -22,6 +22,7 @@ import { of, throwError } from 'rxjs';
|
||||
import { UploadButtonComponent } from './upload-button.component';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('UploadButtonComponent', () => {
|
||||
|
||||
@ -52,6 +53,7 @@ describe('UploadButtonComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -19,6 +19,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FileModel, UploadService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { UploadDragAreaComponent } from './upload-drag-area.component';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
function getFakeShareDataRow(allowableOperations = ['delete', 'update', 'create']) {
|
||||
return {
|
||||
@ -95,6 +96,7 @@ describe('UploadDragAreaComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -19,11 +19,12 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { VersionListComponent } from './version-list.component';
|
||||
import { AlfrescoApiService, setupTestBed, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { of } from 'rxjs';
|
||||
import { Node, VersionPaging, VersionEntry } from '@alfresco/js-api';
|
||||
import { CoreTestingModule } from '../../../../core/testing/core.testing.module';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('VersionListComponent', () => {
|
||||
let component: VersionListComponent;
|
||||
@ -45,13 +46,8 @@ describe('VersionListComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
VersionListComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
@ -22,6 +22,7 @@ import { AlfrescoApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { VersionManagerComponent } from './version-manager.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('VersionManagerComponent', () => {
|
||||
let component: VersionManagerComponent;
|
||||
@ -45,6 +46,7 @@ describe('VersionManagerComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
|
@ -19,6 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { AppConfigService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { WebscriptComponent } from './webscript.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@ -30,6 +31,7 @@ describe('WebscriptComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -19,16 +19,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { AboutApplicationModulesComponent } from './about-application-modules.component';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { DataTableModule } from '../../datatable/datatable.module';
|
||||
import { mockDependencies, mockPlugins } from '../about.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AboutApplicationModulesComponent', () => {
|
||||
let fixture: ComponentFixture<AboutApplicationModulesComponent>;
|
||||
let component: AboutApplicationModulesComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule, MatTableModule, DataTableModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -20,13 +20,17 @@ import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { AboutGithubLinkComponent } from './about-github-link.component';
|
||||
import { aboutGithubDetails } from '../about.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AboutGithubLinkComponent', () => {
|
||||
let fixture: ComponentFixture<AboutGithubLinkComponent>;
|
||||
let component: AboutGithubLinkComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -22,9 +22,8 @@ import { AboutProductVersionComponent } from './about-product-version.component'
|
||||
import { DiscoveryApiService } from '../../services/discovery-api.service';
|
||||
import { AuthenticationService } from '../../services/authentication.service';
|
||||
import { of } from 'rxjs';
|
||||
import { DataTableModule } from '../../datatable/datatable.module';
|
||||
import { MatCardModule } from '@angular/material';
|
||||
import { aboutAPSMockDetails, mockModules } from '../about.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AboutProductVersionComponent', () => {
|
||||
let fixture: ComponentFixture<AboutProductVersionComponent>;
|
||||
@ -32,7 +31,10 @@ describe('AboutProductVersionComponent', () => {
|
||||
let discoveryApiService: DiscoveryApiService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule, DataTableModule, MatCardModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -21,6 +21,7 @@ import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { AboutServerSettingsComponent } from './about-server-settings.component';
|
||||
import { AppConfigService } from '../../app-config/app-config.service';
|
||||
import { aboutGithubDetails } from '../about.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AboutServerSettingsComponent', () => {
|
||||
let fixture: ComponentFixture<AboutServerSettingsComponent>;
|
||||
@ -28,7 +29,10 @@ describe('AboutServerSettingsComponent', () => {
|
||||
let appConfigService: AppConfigService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -20,6 +20,7 @@ import { MaterialModule } from '../material.module';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-custom-container',
|
||||
@ -60,6 +61,7 @@ describe('ButtonsMenuComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
MaterialModule
|
||||
],
|
||||
@ -108,6 +110,7 @@ describe('ButtonsMenuComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
MaterialModule
|
||||
],
|
||||
|
@ -22,6 +22,7 @@ import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { CardViewArrayItemComponent } from './card-view-arrayitem.component';
|
||||
import { CardViewArrayItemModel, CardViewArrayItem } from '../../models/card-view-arrayitem.model';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewArrayItemComponent', () => {
|
||||
let component: CardViewArrayItemComponent;
|
||||
@ -41,7 +42,10 @@ describe('CardViewArrayItemComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -23,6 +23,7 @@ import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { CardViewBoolItemComponent } from './card-view-boolitem.component';
|
||||
import { CardViewBoolItemModel } from '../../models/card-view-boolitem.model';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewBoolItemComponent', () => {
|
||||
|
||||
@ -30,7 +31,10 @@ describe('CardViewBoolItemComponent', () => {
|
||||
let component: CardViewBoolItemComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -25,6 +25,7 @@ import { CardViewDateItemComponent } from './card-view-dateitem.component';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { ClipboardService } from '../../../clipboard/clipboard.service';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewDateItemComponent', () => {
|
||||
|
||||
@ -33,7 +34,10 @@ describe('CardViewDateItemComponent', () => {
|
||||
let appConfigService: AppConfigService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -22,6 +22,7 @@ import { CardViewKeyValuePairsItemComponent } from './card-view-keyvaluepairsite
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewKeyValuePairsItemComponent', () => {
|
||||
|
||||
@ -32,7 +33,10 @@ describe('CardViewKeyValuePairsItemComponent', () => {
|
||||
const mockData = [{ name: 'test-name', value: 'test-value' }];
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -23,6 +23,7 @@ import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { CardViewMapItemComponent } from './card-view-mapitem.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewMapItemComponent', () => {
|
||||
let service: CardViewUpdateService;
|
||||
@ -33,7 +34,10 @@ describe('CardViewMapItemComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -23,6 +23,7 @@ import { CardViewSelectItemComponent } from './card-view-selectitem.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewSelectItemComponent', () => {
|
||||
|
||||
@ -39,7 +40,10 @@ describe('CardViewSelectItemComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -26,6 +26,7 @@ import { CardViewItemFloatValidator, CardViewItemIntValidator, CardViewIntItemMo
|
||||
import { MatChipsModule } from '@angular/material';
|
||||
import { ClipboardService } from '../../../clipboard/clipboard.service';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewTextItemComponent', () => {
|
||||
|
||||
@ -34,6 +35,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
MatChipsModule
|
||||
]
|
||||
|
@ -22,6 +22,7 @@ import { CardViewDateItemModel } from '../../models/card-view-dateitem.model';
|
||||
import { CardViewTextItemModel } from '../../models/card-view-textitem.model';
|
||||
import { CardViewComponent } from './card-view.component';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CardViewComponent', () => {
|
||||
|
||||
@ -29,7 +30,10 @@ describe('CardViewComponent', () => {
|
||||
let component: CardViewComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -21,6 +21,7 @@ import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { ClipboardService } from './clipboard.service';
|
||||
import { ClipboardDirective } from './clipboard.directive';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
@ -42,6 +43,7 @@ describe('ClipboardDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
@ -84,6 +86,7 @@ describe('CopyClipboardDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -21,6 +21,7 @@ import { ClipboardService } from './clipboard.service';
|
||||
import { MatSnackBarModule } from '@angular/material';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ClipboardService', () => {
|
||||
let clipboardService: ClipboardService;
|
||||
@ -29,6 +30,7 @@ describe('ClipboardService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
MatSnackBarModule
|
||||
]
|
||||
|
@ -24,6 +24,7 @@ import { EcmUserService } from '../services/ecm-user.service';
|
||||
import { PeopleProcessService } from '../services/people-process.service';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const testUser: UserProcessModel = new UserProcessModel({
|
||||
id: '1',
|
||||
@ -111,7 +112,10 @@ describe('CommentListComponent', () => {
|
||||
let peopleProcessService: PeopleProcessService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -23,6 +23,7 @@ import { CommentsComponent } from './comments.component';
|
||||
import { CommentContentService } from '../services/comment-content.service';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CommentsComponent', () => {
|
||||
|
||||
@ -36,7 +37,10 @@ describe('CommentsComponent', () => {
|
||||
let commentContentService: CommentContentService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@ -23,6 +23,7 @@ import { ContextMenuModule } from './context-menu.module';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContextMenuHolderComponent', () => {
|
||||
let fixture: ComponentFixture<ContextMenuHolderComponent>;
|
||||
@ -54,6 +55,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
ContextMenuModule
|
||||
],
|
||||
|
@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import { Overlay } from '@angular/cdk/overlay';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { ContextMenuOverlayService } from './context-menu-overlay.service';
|
||||
import { Injector } from '@angular/core';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ContextMenuService', () => {
|
||||
let contextMenuOverlayService: ContextMenuOverlayService;
|
||||
@ -36,7 +36,10 @@ describe('ContextMenuService', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [NoopAnimationsModule, CoreTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
providers: [ Overlay ]
|
||||
});
|
||||
|
||||
|
@ -20,6 +20,7 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { ContextMenuModule } from './context-menu.module';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
@ -80,6 +81,7 @@ describe('ContextMenuDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
ContextMenuModule
|
||||
],
|
||||
|
@ -18,11 +18,15 @@
|
||||
import { DataColumnComponent } from './data-column.component';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DataColumnListComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
it('should setup screen reader title for thumbnails', () => {
|
||||
|
@ -28,6 +28,7 @@ import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { DataColumnListComponent } from '../../../data-column/data-column-list.component';
|
||||
import { DataColumnComponent } from '../../../data-column/data-column.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({selector: 'adf-custom-column-template-component', template: `
|
||||
<ng-template #tmplRef></ng-template>
|
||||
@ -69,6 +70,7 @@ describe('DataTable', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
@ -1237,6 +1239,7 @@ describe('Accesibility', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [CustomColumnTemplateComponent],
|
||||
|
@ -19,13 +19,17 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { EmptyListComponent } from './empty-list.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('EmptyListComponentComponent', () => {
|
||||
let component: EmptyListComponent;
|
||||
let fixture: ComponentFixture<EmptyListComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -22,6 +22,7 @@ import { ObjectDataColumn } from './../../data/object-datacolumn.model';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { JsonCellComponent } from './json-cell.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('JsonCellComponent', () => {
|
||||
let component: JsonCellComponent;
|
||||
@ -31,7 +32,10 @@ describe('JsonCellComponent', () => {
|
||||
let columnData;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@ -22,6 +22,7 @@ import { ObjectDataColumn } from './../../data/object-datacolumn.model';
|
||||
import { LocationCellComponent } from './location-cell.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('LocationCellComponent', () => {
|
||||
let component: LocationCellComponent;
|
||||
@ -31,7 +32,10 @@ describe('LocationCellComponent', () => {
|
||||
let columnData;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@ -20,6 +20,7 @@ import { DataTableComponent } from '../components/datatable/datatable.component'
|
||||
import { LoadingContentTemplateDirective } from './loading-template.directive';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('LoadingContentTemplateDirective', () => {
|
||||
|
||||
@ -28,7 +29,10 @@ describe('LoadingContentTemplateDirective', () => {
|
||||
let directive: LoadingContentTemplateDirective;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -20,6 +20,7 @@ import { DataTableComponent } from '../components/datatable/datatable.component'
|
||||
import { NoContentTemplateDirective } from './no-content-template.directive';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('NoContentTemplateDirective', () => {
|
||||
|
||||
@ -28,7 +29,10 @@ describe('NoContentTemplateDirective', () => {
|
||||
let directive: NoContentTemplateDirective;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -20,6 +20,7 @@ import { DataTableComponent } from '../components/datatable/datatable.component'
|
||||
import { NoPermissionTemplateDirective } from './no-permission-template.directive';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('NoPermissionTemplateDirective', () => {
|
||||
|
||||
@ -28,7 +29,10 @@ describe('NoPermissionTemplateDirective', () => {
|
||||
let directive: NoPermissionTemplateDirective;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -22,6 +22,7 @@ import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { DownloadZipService } from '../../services/download-zip.service';
|
||||
import { Observable } from 'rxjs/index';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DownloadZipDialogComponent', () => {
|
||||
|
||||
@ -40,7 +41,10 @@ describe('DownloadZipDialogComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: dialogRef },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: dataMock }
|
||||
|
@ -21,6 +21,7 @@ import { CheckAllowableOperationDirective, NodeAllowableOperationSubject } from
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-text-subject',
|
||||
@ -36,6 +37,7 @@ describe('CheckAllowableOperationDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
@ -22,6 +22,7 @@ import { HighlightTransformService } from '../services/highlight-transform.servi
|
||||
import { HighlightDirective } from './highlight.directive';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
/* spellchecker: disable */
|
||||
const template: string = `
|
||||
@ -47,6 +48,7 @@ describe('HighlightDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -23,6 +23,7 @@ import { AuthenticationService } from '../services';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { LogoutDirective } from './logout.directive';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('LogoutDirective', () => {
|
||||
|
||||
@ -43,6 +44,7 @@ describe('LogoutDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
@ -97,6 +99,7 @@ describe('LogoutDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
@ -140,6 +143,7 @@ describe('LogoutDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -22,6 +22,7 @@ import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NodeDeleteDirective } from './node-delete.directive';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@ -91,6 +92,7 @@ describe('NodeDeleteDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user