mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
Ng19 migration (#4520)
This commit is contained in:
committed by
GitHub
parent
bcbdff9543
commit
5f5c238ccd
@@ -44,7 +44,6 @@ import { ViewerService } from '../../services/viewer.service';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent],
|
||||
selector: 'app-preview',
|
||||
templateUrl: './preview.component.html',
|
||||
|
@@ -108,11 +108,11 @@ describe('AcaViewerComponent', () => {
|
||||
|
||||
component.previousNodeId = 'previous';
|
||||
component.onNavigateBefore(clickEvent);
|
||||
expect(store.dispatch).toHaveBeenCalledWith(new ViewNodeAction('previous', { location: fakeLocation }));
|
||||
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new ViewNodeAction('previous', { location: fakeLocation }) }));
|
||||
|
||||
component.nextNodeId = 'next';
|
||||
component.onNavigateNext(clickEvent);
|
||||
expect(store.dispatch).toHaveBeenCalledWith(new ViewNodeAction('next', { location: fakeLocation }));
|
||||
expect(store.dispatch).toHaveBeenCalledWith(jasmine.objectContaining({ ...new ViewNodeAction('next', { location: fakeLocation }) }));
|
||||
});
|
||||
|
||||
describe('Navigate back to node location', () => {
|
||||
|
@@ -57,7 +57,6 @@ import { ViewerService } from '../../services/viewer.service';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
InfoDrawerComponent,
|
||||
|
@@ -29,7 +29,7 @@ import { FavoritePaging, NodePaging, SharedLinkPaging } from '@alfresco/js-api';
|
||||
import { ViewerService } from './viewer.service';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
const list = {
|
||||
list: {
|
||||
@@ -69,8 +69,14 @@ describe('ViewerService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), HttpClientModule],
|
||||
providers: [{ provide: TranslationService, useClass: TranslationMock }, ViewerService, UserPreferencesService, ContentApiService]
|
||||
imports: [TranslateModule.forRoot()],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
ViewerService,
|
||||
UserPreferencesService,
|
||||
ContentApiService,
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
});
|
||||
|
||||
preferences = TestBed.inject(UserPreferencesService);
|
||||
|
Reference in New Issue
Block a user