mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
committed by
Denys Vuika
parent
473241f792
commit
9655e51943
@@ -19,7 +19,7 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
|
||||
import { CoreModule, AuthService, SettingsService, LogService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, AlfrescoAuthenticationService, AlfrescoSettingsService, LogService } from 'ng2-alfresco-core';
|
||||
import { LoginModule } from 'ng2-alfresco-login';
|
||||
|
||||
@Component({
|
||||
@@ -87,8 +87,8 @@ class UserInfoDemo implements OnInit {
|
||||
isECM: boolean = true;
|
||||
isBPM: boolean = false;
|
||||
|
||||
constructor(private authService: AuthService,
|
||||
private settingsService: SettingsService,
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
private logService: LogService) {
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
settingsService.bpmHost = this.bpmHost;
|
||||
|
@@ -22,9 +22,9 @@ import { BpmUserModel } from '../models/bpm-user.model';
|
||||
import { TranslationMock } from '../assets/translation.service.mock';
|
||||
import {
|
||||
CoreModule,
|
||||
AuthService,
|
||||
ContentService,
|
||||
AlfrescoTranslateService
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoTranslationService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
|
||||
@@ -73,8 +73,8 @@ describe('User info component', () => {
|
||||
let userInfoComp: UserInfoComponent;
|
||||
let fixture: ComponentFixture<UserInfoComponent>;
|
||||
let element: HTMLElement;
|
||||
let stubAuthService: AuthService;
|
||||
let stubContent: ContentService;
|
||||
let stubAuthService: AlfrescoAuthenticationService;
|
||||
let stubContent: AlfrescoContentService;
|
||||
let componentHandler;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -90,15 +90,15 @@ describe('User info component', () => {
|
||||
providers: [
|
||||
EcmUserService,
|
||||
BpmUserService,
|
||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
||||
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
fixture = TestBed.createComponent(UserInfoComponent);
|
||||
userInfoComp = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
|
||||
stubAuthService = TestBed.get(AuthService);
|
||||
stubContent = TestBed.get(ContentService);
|
||||
stubAuthService = TestBed.get(AlfrescoAuthenticationService);
|
||||
stubContent = TestBed.get(AlfrescoContentService);
|
||||
});
|
||||
}));
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { AlfrescoTranslateService, AuthService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||
import { EcmUserModel } from './../models/ecm-user.model';
|
||||
import { BpmUserModel } from './../models/bpm-user.model';
|
||||
import { EcmUserService } from './../services/ecm-user.service';
|
||||
@@ -58,8 +58,8 @@ export class UserInfoComponent implements OnInit {
|
||||
|
||||
constructor(private ecmUserService: EcmUserService,
|
||||
private bpmUserService: BpmUserService,
|
||||
private authService: AuthService,
|
||||
private translateService: AlfrescoTranslateService) {
|
||||
private authService: AlfrescoAuthenticationService,
|
||||
private translateService: AlfrescoTranslationService) {
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-alfresco-userinfo', 'node_modules/ng2-alfresco-userinfo/src');
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { CoreModule, AuthService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, AlfrescoAuthenticationService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
import { BpmUserService } from '../services/bpm-user.service';
|
||||
// import { fakeBpmUser } from '../assets/fake-bpm-user.service.mock';
|
||||
|
||||
@@ -25,7 +25,7 @@ declare let jasmine: any;
|
||||
describe('BpmUserService', () => {
|
||||
|
||||
let service: BpmUserService;
|
||||
let authService: AuthService;
|
||||
let authService: AlfrescoAuthenticationService;
|
||||
let apiService: AlfrescoApiService;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -38,7 +38,7 @@ describe('BpmUserService', () => {
|
||||
]
|
||||
});
|
||||
service = TestBed.get(BpmUserService);
|
||||
authService = TestBed.get(AuthService);
|
||||
authService = TestBed.get(AlfrescoAuthenticationService);
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { CoreModule, AuthService, ContentService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, AlfrescoAuthenticationService, AlfrescoContentService } from 'ng2-alfresco-core';
|
||||
import { EcmUserService } from '../services/ecm-user.service';
|
||||
import { fakeEcmUser } from '../assets/fake-ecm-user.service.mock';
|
||||
|
||||
@@ -25,8 +25,8 @@ declare let jasmine: any;
|
||||
describe('EcmUserService', () => {
|
||||
|
||||
let service: EcmUserService;
|
||||
let authService: AuthService;
|
||||
let contentService: ContentService;
|
||||
let authService: AlfrescoAuthenticationService;
|
||||
let contentService: AlfrescoContentService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -38,8 +38,8 @@ describe('EcmUserService', () => {
|
||||
]
|
||||
});
|
||||
service = TestBed.get(EcmUserService);
|
||||
authService = TestBed.get(AuthService);
|
||||
contentService = TestBed.get(ContentService);
|
||||
authService = TestBed.get(AlfrescoAuthenticationService);
|
||||
contentService = TestBed.get(AlfrescoContentService);
|
||||
});
|
||||
|
||||
describe('when user is logged in', () => {
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Response } from '@angular/http';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { ContentService, AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoContentService, AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||
import { EcmUserModel } from '../models/ecm-user.model';
|
||||
/**
|
||||
*
|
||||
@@ -30,7 +30,7 @@ import { EcmUserModel } from '../models/ecm-user.model';
|
||||
export class EcmUserService {
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private contentService: ContentService,
|
||||
private contentService: AlfrescoContentService,
|
||||
private logService: LogService) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user