mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fixed unit test after rebase
This commit is contained in:
@@ -19,7 +19,7 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { ContentService } from './content.service';
|
import { ContentService } from './content.service';
|
||||||
import { AppConfigService, AuthenticationService, RedirectAuthService, StorageService } from '@alfresco/adf-core';
|
import { AppConfigService, AuthenticationService, RedirectAuthService, StorageService } from '@alfresco/adf-core';
|
||||||
import { Node, PermissionsInfo } from '@alfresco/js-api';
|
import { Node, PermissionsInfo } from '@alfresco/js-api';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
|
|
||||||
describe('ContentService', () => {
|
describe('ContentService', () => {
|
||||||
@@ -30,7 +30,7 @@ describe('ContentService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [HttpClientTestingModule],
|
||||||
providers: [ContentService, AuthenticationService, { provide: RedirectAuthService, useValue: { onLogin: EMPTY } }]
|
providers: [ContentService, AuthenticationService, { provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
||||||
});
|
});
|
||||||
authService = TestBed.inject(AuthenticationService);
|
authService = TestBed.inject(AuthenticationService);
|
||||||
contentService = TestBed.inject(ContentService);
|
contentService = TestBed.inject(ContentService);
|
||||||
|
@@ -20,7 +20,7 @@ import { AlfrescoApiService, AlfrescoApiServiceMock, RedirectAuthService } from
|
|||||||
import { PeopleContentQueryRequestModel, PeopleContentService } from './people-content.service';
|
import { PeopleContentQueryRequestModel, PeopleContentService } from './people-content.service';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
|
||||||
describe('PeopleContentService', () => {
|
describe('PeopleContentService', () => {
|
||||||
let peopleContentService: PeopleContentService;
|
let peopleContentService: PeopleContentService;
|
||||||
@@ -31,7 +31,7 @@ describe('PeopleContentService', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
PeopleContentService,
|
PeopleContentService,
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
|
|||||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
||||||
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
||||||
import { DownloadZipService } from './services/download-zip.service';
|
import { DownloadZipService } from './services/download-zip.service';
|
||||||
import { EMPTY, Observable } from 'rxjs';
|
import { EMPTY, Observable, of } from 'rxjs';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock, RedirectAuthService, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AlfrescoApiServiceMock, RedirectAuthService, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
@@ -47,7 +47,7 @@ describe('DownloadZipDialogComponent', () => {
|
|||||||
{ provide: TranslationService, useClass: TranslationMock },
|
{ provide: TranslationService, useClass: TranslationMock },
|
||||||
{ provide: MatDialogRef, useValue: dialogRef },
|
{ provide: MatDialogRef, useValue: dialogRef },
|
||||||
{ provide: MAT_DIALOG_DATA, useValue: dataMock },
|
{ provide: MAT_DIALOG_DATA, useValue: dataMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
dialogRef.close.calls.reset();
|
dialogRef.close.calls.reset();
|
||||||
|
@@ -22,7 +22,7 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { NodeAllowableOperationSubject } from '../interfaces/node-allowable-operation-subject.interface';
|
import { NodeAllowableOperationSubject } from '../interfaces/node-allowable-operation-subject.interface';
|
||||||
import { ContentDirectiveModule } from './content-directive.module';
|
import { ContentDirectiveModule } from './content-directive.module';
|
||||||
import { RedirectAuthService } from '@alfresco/adf-core';
|
import { RedirectAuthService } from '@alfresco/adf-core';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -39,7 +39,7 @@ describe('CheckAllowableOperationDirective', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ContentDirectiveModule, HttpClientTestingModule],
|
imports: [ContentDirectiveModule, HttpClientTestingModule],
|
||||||
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }]
|
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
||||||
});
|
});
|
||||||
changeDetectorMock = { detectChanges: () => {} } as ChangeDetectorRef;
|
changeDetectorMock = { detectChanges: () => {} } as ChangeDetectorRef;
|
||||||
});
|
});
|
||||||
|
@@ -41,8 +41,8 @@ describe('LibraryFavoriteDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [HttpClientTestingModule, TestComponent],
|
||||||
declarations: [TestComponent, LibraryFavoriteDirective]
|
declarations: [LibraryFavoriteDirective]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
@@ -23,7 +23,7 @@ import { ContentDirectiveModule } from './content-directive.module';
|
|||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { RedirectAuthService, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
import { RedirectAuthService, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `<div id="delete-component" [adf-delete]="selection" (delete)="onDelete()"></div>`
|
template: `<div id="delete-component" [adf-delete]="selection" (delete)="onDelete()"></div>`
|
||||||
@@ -82,7 +82,7 @@ describe('NodeDeleteDirective', () => {
|
|||||||
imports: [ContentDirectiveModule, HttpClientTestingModule, TranslateModule.forRoot()],
|
imports: [ContentDirectiveModule, HttpClientTestingModule, TranslateModule.forRoot()],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TranslationService, useClass: TranslationMock },
|
{ provide: TranslationService, useClass: TranslationMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
],
|
],
|
||||||
declarations: [TestComponent, TestWithPermissionsComponent, TestDeletePermanentComponent]
|
declarations: [TestComponent, TestWithPermissionsComponent, TestDeletePermanentComponent]
|
||||||
});
|
});
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
||||||
import { Component, DebugElement, ViewChild } from '@angular/core';
|
import { Component, DebugElement, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
||||||
import { NodeDownloadDirective } from './node-download.directive';
|
import { NodeDownloadDirective } from './node-download.directive';
|
||||||
@@ -53,7 +53,7 @@ describe('NodeDownloadDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ContentDirectiveModule, HttpClientTestingModule],
|
imports: [ContentDirectiveModule, HttpClientTestingModule, MatDialogModule],
|
||||||
declarations: [TestComponent],
|
declarations: [TestComponent],
|
||||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||||
});
|
});
|
||||||
|
@@ -37,8 +37,8 @@ describe('FileAutoDownloadComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule, TranslateModule.forRoot(), MatDialogModule, MatButtonModule],
|
imports: [HttpClientTestingModule, TranslateModule.forRoot(), MatDialogModule, MatButtonModule, NodeDownloadDirective],
|
||||||
declarations: [FileAutoDownloadComponent, NodeDownloadDirective],
|
declarations: [FileAutoDownloadComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: MatDialogRef, useValue: mockDialog },
|
{ provide: MatDialogRef, useValue: mockDialog },
|
||||||
{ provide: MAT_DIALOG_DATA, useValue: null },
|
{ provide: MAT_DIALOG_DATA, useValue: null },
|
||||||
|
@@ -21,7 +21,7 @@ import { AuthenticationService, RedirectAuthService } from '@alfresco/adf-core';
|
|||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { addDays, subDays } from 'date-fns';
|
import { addDays, subDays } from 'date-fns';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
|
||||||
describe('LockService', () => {
|
describe('LockService', () => {
|
||||||
let service: LockService;
|
let service: LockService;
|
||||||
@@ -34,7 +34,7 @@ describe('LockService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [HttpClientTestingModule],
|
||||||
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }]
|
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(LockService);
|
service = TestBed.inject(LockService);
|
||||||
authenticationService = TestBed.inject(AuthenticationService);
|
authenticationService = TestBed.inject(AuthenticationService);
|
||||||
|
@@ -20,7 +20,7 @@ import { AlfrescoApiService, AlfrescoApiServiceMock, CommentModel, RedirectAuthS
|
|||||||
import { fakeContentComment, fakeContentComments } from '../mocks/node-comments.mock';
|
import { fakeContentComment, fakeContentComments } from '../mocks/node-comments.mock';
|
||||||
import { NodeCommentsService } from './node-comments.service';
|
import { NodeCommentsService } from './node-comments.service';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ describe('NodeCommentsService', () => {
|
|||||||
imports: [HttpClientTestingModule],
|
imports: [HttpClientTestingModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(NodeCommentsService);
|
service = TestBed.inject(NodeCommentsService);
|
||||||
|
@@ -308,7 +308,7 @@ describe('TagsCreatorComponent', () => {
|
|||||||
component.tagNameControlVisible = true;
|
component.tagNameControlVisible = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
tick(100);
|
tick(100);
|
||||||
expect(getNameInput()).not.toBe(document.activeElement as HTMLInputElement);
|
expect(getNameInput()).not.toEqual(document.activeElement as HTMLInputElement);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should input be autofocused after showing input second time', fakeAsync(() => {
|
it('should input be autofocused after showing input second time', fakeAsync(() => {
|
||||||
|
@@ -23,7 +23,7 @@ import { VersionCompatibilityService } from './version-compatibility.service';
|
|||||||
import { VersionInfo } from '@alfresco/js-api';
|
import { VersionInfo } from '@alfresco/js-api';
|
||||||
import { VersionCompatibilityModule } from './version-compatibility.module';
|
import { VersionCompatibilityModule } from './version-compatibility.module';
|
||||||
import { RedirectAuthService } from '@alfresco/adf-core';
|
import { RedirectAuthService } from '@alfresco/adf-core';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -53,7 +53,7 @@ describe('VersionCompatibilityDirective', () => {
|
|||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [VersionCompatibilityModule, HttpClientTestingModule],
|
imports: [VersionCompatibilityModule, HttpClientTestingModule],
|
||||||
declarations: [TestComponent],
|
declarations: [TestComponent],
|
||||||
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }]
|
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
versionCompatibilityService = TestBed.inject(VersionCompatibilityService);
|
versionCompatibilityService = TestBed.inject(VersionCompatibilityService);
|
||||||
|
@@ -25,7 +25,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
||||||
|
|
||||||
describe('AuthGuardService BPM', () => {
|
describe('AuthGuardService BPM', () => {
|
||||||
@@ -41,7 +41,7 @@ describe('AuthGuardService BPM', () => {
|
|||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), HttpClientTestingModule, MatDialogModule],
|
imports: [TranslateModule.forRoot(), HttpClientTestingModule, MatDialogModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } },
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
{
|
{
|
||||||
provide: OidcAuthenticationService,
|
provide: OidcAuthenticationService,
|
||||||
useValue: {
|
useValue: {
|
||||||
|
@@ -26,7 +26,7 @@ import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.serv
|
|||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
||||||
|
|
||||||
describe('AuthGuardService ECM', () => {
|
describe('AuthGuardService ECM', () => {
|
||||||
@@ -52,7 +52,7 @@ describe('AuthGuardService ECM', () => {
|
|||||||
isLoggedIn: () => false
|
isLoggedIn: () => false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
|
@@ -25,7 +25,7 @@ import { StorageService } from '../../common/services/storage.service';
|
|||||||
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
||||||
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
||||||
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
@@ -46,7 +46,7 @@ describe('AuthGuardService', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
AppConfigService,
|
AppConfigService,
|
||||||
StorageService,
|
StorageService,
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } },
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
{
|
{
|
||||||
provide: OidcAuthenticationService,
|
provide: OidcAuthenticationService,
|
||||||
useValue: {
|
useValue: {
|
||||||
|
@@ -542,7 +542,7 @@ describe('AuthenticationService', () => {
|
|||||||
const onTokenReceivedSpy = jasmine.createSpy();
|
const onTokenReceivedSpy = jasmine.createSpy();
|
||||||
authenticationService.onTokenReceived.subscribe(onTokenReceivedSpy);
|
authenticationService.onTokenReceived.subscribe(onTokenReceivedSpy);
|
||||||
|
|
||||||
onTokenReceived$.next();
|
onTokenReceived$.next({ type: 'token_received' });
|
||||||
|
|
||||||
expect(onTokenReceivedSpy).toHaveBeenCalled();
|
expect(onTokenReceivedSpy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
@@ -29,7 +29,7 @@ import {
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
|
||||||
describe('FileViewerWidgetComponent', () => {
|
describe('FileViewerWidgetComponent', () => {
|
||||||
const fakeForm = new FormModel();
|
const fakeForm = new FormModel();
|
||||||
@@ -59,7 +59,7 @@ describe('FileViewerWidgetComponent', () => {
|
|||||||
{ provide: FormService, useValue: formServiceStub },
|
{ provide: FormService, useValue: formServiceStub },
|
||||||
{ provide: TranslationService, useClass: TranslationMock },
|
{ provide: TranslationService, useClass: TranslationMock },
|
||||||
AuthenticationService,
|
AuthenticationService,
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
});
|
});
|
||||||
|
@@ -53,9 +53,10 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|||||||
import { RestVariable } from '@alfresco/js-api';
|
import { RestVariable } from '@alfresco/js-api';
|
||||||
import { ActivitiContentService } from '../../../form/services/activiti-alfresco.service';
|
import { ActivitiContentService } from '../../../form/services/activiti-alfresco.service';
|
||||||
import { AppsProcessService } from '../../../services/apps-process.service';
|
import { AppsProcessService } from '../../../services/apps-process.service';
|
||||||
import { deployedApps } from '../../../mock/apps-list.mock';
|
|
||||||
import { ProcessFormRenderingService } from '../../../form';
|
import { ProcessFormRenderingService } from '../../../form';
|
||||||
import { FORM_FIELD_MODEL_RENDER_MIDDLEWARE } from 'lib/core/src/lib/form/components/middlewares/middleware';
|
import { FORM_FIELD_MODEL_RENDER_MIDDLEWARE } from 'lib/core/src/lib/form/components/middlewares/middleware';
|
||||||
|
import { deployedApps } from '../../../testing/mock/apps-list.mock';
|
||||||
|
|
||||||
describe('StartProcessComponent', () => {
|
describe('StartProcessComponent', () => {
|
||||||
let appConfig: AppConfigService;
|
let appConfig: AppConfigService;
|
||||||
|
@@ -33,7 +33,7 @@ import { TaskListService } from '../../services/tasklist.service';
|
|||||||
import { TaskListComponent } from './task-list.component';
|
import { TaskListComponent } from './task-list.component';
|
||||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||||
import { fakeGlobalTask, fakeEmptyTask, paginatedTask, fakeColumnSchema, fakeCustomSchema } from '../../../testing/mock';
|
import { fakeGlobalTask, fakeEmptyTask, paginatedTask, fakeColumnSchema, fakeCustomSchema } from '../../../testing/mock';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||||
import { of, Subject } from 'rxjs';
|
import { of, Subject } from 'rxjs';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
|
Reference in New Issue
Block a user