mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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:
@@ -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
|
||||
]
|
||||
});
|
||||
|
Reference in New Issue
Block a user