diff --git a/app/src/app/app.module.ts b/app/src/app/app.module.ts index 0f1fdb390e..0b9a1295a7 100644 --- a/app/src/app/app.module.ts +++ b/app/src/app/app.module.ts @@ -25,8 +25,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations'; - -import { TRANSLATION_PROVIDER, AppConfigService, DebugAppConfigService, CoreModule, AuthGuard } from '@alfresco/adf-core'; +import { TRANSLATION_PROVIDER, AppConfigService, DebugAppConfigService, CoreModule, AuthGuard, AuthModule } from '@alfresco/adf-core'; import { AppService } from '@alfresco/aca-shared'; import { AppExtensionsModule } from './extensions.module'; @@ -102,7 +101,8 @@ registerLocaleData(localeSv); ShellModule.withRoutes({ shellChildren: [CONTENT_LAYOUT_ROUTES] }), - ContentServiceExtensionModule + ContentServiceExtensionModule, + AuthModule.forRoot({ useHash: true }) ], providers: [ { provide: AppService, useClass: AppService }, diff --git a/projects/aca-content/ms-office/src/aos-extension.service.spec.ts b/projects/aca-content/ms-office/src/aos-extension.service.spec.ts index 2dccd84951..17db372563 100644 --- a/projects/aca-content/ms-office/src/aos-extension.service.spec.ts +++ b/projects/aca-content/ms-office/src/aos-extension.service.spec.ts @@ -24,7 +24,7 @@ import { TestBed } from '@angular/core/testing'; import { AosEditOnlineService } from './aos-extension.service'; -import { AppConfigService, AuthenticationService, LogService, NotificationService } from '@alfresco/adf-core'; +import { AppConfigService, AuthenticationService, AuthModule, LogService, NotificationService } from '@alfresco/adf-core'; import { LibTestingModule } from '@alfresco/aca-shared'; import { MatSnackBarModule } from '@angular/material/snack-bar'; @@ -37,7 +37,7 @@ describe('AosEditOnlineService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [LibTestingModule, MatSnackBarModule], + imports: [LibTestingModule, MatSnackBarModule, AuthModule.forRoot()], providers: [{ provide: LogService, useValue: { error() {} } }] }); diff --git a/projects/aca-content/src/lib/components/context-menu/context-menu.service.spec.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.service.spec.ts index dadaf3e4ab..82a94d9cf7 100644 --- a/projects/aca-content/src/lib/components/context-menu/context-menu.service.spec.ts +++ b/projects/aca-content/src/lib/components/context-menu/context-menu.service.spec.ts @@ -27,7 +27,7 @@ import { Overlay } from '@angular/cdk/overlay'; import { Injector } from '@angular/core'; import { Store } from '@ngrx/store'; import { of } from 'rxjs'; -import { CoreModule, UserPreferencesService } from '@alfresco/adf-core'; +import { AuthModule, CoreModule, UserPreferencesService } from '@alfresco/adf-core'; import { ContextMenuService } from './context-menu.service'; import { TranslateModule } from '@ngx-translate/core'; import { ContextMenuComponent } from './context-menu.component'; @@ -51,7 +51,7 @@ describe('ContextMenuService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), CoreModule.forRoot(), ContextMenuComponent], + imports: [TranslateModule.forRoot(), CoreModule.forRoot(), ContextMenuComponent, AuthModule.forRoot()], providers: [Overlay, { provide: Store, useValue: { select: () => of() } }, UserPreferencesService] }); diff --git a/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.spec.ts b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.spec.ts index fde887f474..56a61293ed 100644 --- a/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.spec.ts +++ b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.spec.ts @@ -32,6 +32,7 @@ import { AppExtensionService } from '@alfresco/aca-shared'; import { of } from 'rxjs'; import { ContentActionType } from '@alfresco/adf-extensions'; import { By } from '@angular/platform-browser'; +import { AuthModule } from '@alfresco/adf-core'; describe('CustomNameColumnComponent', () => { let fixture: ComponentFixture; @@ -44,6 +45,7 @@ describe('CustomNameColumnComponent', () => { HttpClientModule, TranslateModule.forRoot(), CustomNameColumnComponent, + AuthModule.forRoot(), StoreModule.forRoot( { app: (state) => state }, { diff --git a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts index d6517af7d1..13de1f575e 100644 --- a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts +++ b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.spec.ts @@ -22,9 +22,9 @@ * from Hyland Software. If not, see . */ -import { TestBed, ComponentFixture } from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { PageComponent } from './document-base-page.component'; -import { ReloadDocumentListAction, SetSelectedNodesAction, AppState, ViewNodeAction } from '@alfresco/aca-shared/store'; +import { AppState, ReloadDocumentListAction, SetSelectedNodesAction, ViewNodeAction } from '@alfresco/aca-shared/store'; import { AppExtensionService } from '@alfresco/aca-shared'; import { NodeEntry, NodePaging, RepositoryInfo, VersionInfo } from '@alfresco/js-api'; import { DocumentBasePageService } from './document-base-page.service'; @@ -32,12 +32,12 @@ import { Store, StoreModule } from '@ngrx/store'; import { Component, Injectable } from '@angular/core'; import { DiscoveryApiService, DocumentListComponent } from '@alfresco/adf-content-services'; import { MockStore, provideMockStore } from '@ngrx/store/testing'; -import { MaterialModule, PipeModule } from '@alfresco/adf-core'; +import { AuthModule, MaterialModule, PipeModule } from '@alfresco/adf-core'; import { HttpClientModule } from '@angular/common/http'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { EffectsModule } from '@ngrx/effects'; -import { BehaviorSubject, Observable, Subscription, of } from 'rxjs'; +import { BehaviorSubject, Observable, of, Subscription } from 'rxjs'; export const INITIAL_APP_STATE: AppState = { appName: 'Alfresco Content Application', @@ -112,6 +112,7 @@ describe('PageComponent', () => { HttpClientModule, RouterTestingModule, MaterialModule, + AuthModule.forRoot(), StoreModule.forRoot( { app: (state) => state }, { @@ -292,7 +293,7 @@ describe('Info Drawer state', () => { }; TestBed.configureTestingModule({ - imports: [NoopAnimationsModule, HttpClientModule, RouterTestingModule, MaterialModule], + imports: [NoopAnimationsModule, HttpClientModule, RouterTestingModule, MaterialModule, AuthModule.forRoot()], declarations: [TestComponent], providers: [ { provide: DocumentBasePageService, useClass: DocumentBasePageServiceMock }, diff --git a/projects/aca-shared/src/lib/services/app.extension.service.spec.ts b/projects/aca-shared/src/lib/services/app.extension.service.spec.ts index f7faa7e5c6..6f6af0ceab 100644 --- a/projects/aca-shared/src/lib/services/app.extension.service.spec.ts +++ b/projects/aca-shared/src/lib/services/app.extension.service.spec.ts @@ -25,20 +25,20 @@ import { TestBed } from '@angular/core/testing'; import { initialState, LibTestingModule } from '../testing/lib-testing-module'; import { AppExtensionService } from './app.extension.service'; -import { Store, Action } from '@ngrx/store'; +import { Action, Store } from '@ngrx/store'; import { AppStore } from '@alfresco/aca-shared/store'; import { ContentActionType, - mergeArrays, - sortByOrder, + ExtensionConfig, + ExtensionService, filterEnabled, - reduceSeparators, + mergeArrays, + NavBarGroupRef, reduceEmptyMenus, - ExtensionService, - ExtensionConfig, - NavBarGroupRef + reduceSeparators, + sortByOrder } from '@alfresco/adf-extensions'; -import { AppConfigService, LogService } from '@alfresco/adf-core'; +import { AppConfigService, AuthModule, LogService } from '@alfresco/adf-core'; import { provideMockStore } from '@ngrx/store/testing'; import { hasQuickShareEnabled } from '@alfresco/aca-shared/rules'; import { MatIconRegistry } from '@angular/material/icon'; @@ -56,7 +56,7 @@ describe('AppExtensionService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [LibTestingModule], + imports: [LibTestingModule, AuthModule.forRoot()], providers: [provideMockStore({ initialState })] });