mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
ACS-8770: imports adjust after project structure change
This commit is contained in:
@@ -18,8 +18,9 @@
|
|||||||
import { HttpHandler, HttpHeaders, HttpRequest } from '@angular/common/http';
|
import { HttpHandler, HttpHeaders, HttpRequest } from '@angular/common/http';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
import { Authentication } from '../authentication';
|
|
||||||
import { AuthenticationInterceptor, SHOULD_ADD_AUTH_TOKEN } from './authentication.interceptor';
|
import { AuthenticationInterceptor, SHOULD_ADD_AUTH_TOKEN } from './authentication.interceptor';
|
||||||
|
import { Authentication } from '@alfresco/adf-core';
|
||||||
|
|
||||||
class MockAuthentication extends Authentication {
|
class MockAuthentication extends Authentication {
|
||||||
addTokenToHeader(_: string, httpHeaders: HttpHeaders): Observable<HttpHeaders> {
|
addTokenToHeader(_: string, httpHeaders: HttpHeaders): Observable<HttpHeaders> {
|
||||||
|
@@ -30,7 +30,7 @@ import {
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, throwError as observableThrowError } from 'rxjs';
|
import { Observable, throwError as observableThrowError } from 'rxjs';
|
||||||
import { catchError, mergeMap } from 'rxjs/operators';
|
import { catchError, mergeMap } from 'rxjs/operators';
|
||||||
import { Authentication } from '../authentication';
|
import { Authentication } from '@alfresco/adf-core';
|
||||||
|
|
||||||
export const SHOULD_ADD_AUTH_TOKEN = new HttpContextToken<boolean>(() => false);
|
export const SHOULD_ADD_AUTH_TOKEN = new HttpContextToken<boolean>(() => false);
|
||||||
|
|
||||||
|
@@ -22,9 +22,8 @@ import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-conten
|
|||||||
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [AuthModule.forRoot({ useHash: true }), NoopAnimationsModule, NoopTranslateModule, HttpClientTestingModule],
|
imports: [AuthModule.forRoot({ useHash: true }), NoopAnimationsModule, NoopTranslateModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService },
|
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||||
// TODO: remove this as soon as unit test not using jasmine.Ajax
|
// TODO: remove this as soon as unit test not using jasmine.Ajax
|
||||||
|
Reference in New Issue
Block a user