mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-08 14:51:14 +00:00
unit test cleanup (#454)
* auth mock * avoid using jasmine * cleanup preview tests * cleanup recent files tests * cleanup shared files tests * remove fdescribe * update tests * move adf services to single place * move app specific services to single place * cleanup directive tests * cleanup directive tests * update directive tests
This commit is contained in:
@@ -24,23 +24,14 @@
|
||||
*/
|
||||
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import {
|
||||
PeopleContentService, AppConfigService,
|
||||
AuthenticationService, UserPreferencesService, TranslationService,
|
||||
TranslationMock, StorageService, AlfrescoApiService, CookieService,
|
||||
LogService
|
||||
} from '@alfresco/adf-core';
|
||||
import { PeopleContentService, AppConfigService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { BrowsingFilesService } from '../../common/services/browsing-files.service';
|
||||
import { NodePermissionService } from '../../common/services/node-permission.service';
|
||||
import { LayoutComponent } from './layout.component';
|
||||
import { SidenavViewsManagerDirective } from './sidenav-views-manager.directive';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
|
||||
describe('LayoutComponent', () => {
|
||||
let fixture: ComponentFixture<LayoutComponent>;
|
||||
@@ -58,26 +49,12 @@ describe('LayoutComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
HttpClientModule,
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule
|
||||
],
|
||||
imports: [ AppTestingModule ],
|
||||
declarations: [
|
||||
LayoutComponent,
|
||||
SidenavViewsManagerDirective
|
||||
],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
AlfrescoApiService,
|
||||
StorageService,
|
||||
CookieService,
|
||||
LogService,
|
||||
UserPreferencesService,
|
||||
AuthenticationService,
|
||||
AppConfigService,
|
||||
NodePermissionService,
|
||||
BrowsingFilesService,
|
||||
{
|
||||
provide: PeopleContentService,
|
||||
useValue: {
|
||||
|
Reference in New Issue
Block a user