Ng19 migration (#4520)

This commit is contained in:
dominikiwanekhyland
2025-07-03 13:33:05 +02:00
committed by GitHub
parent bcbdff9543
commit 5f5c238ccd
127 changed files with 8582 additions and 6369 deletions

View File

@@ -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',

View File

@@ -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', () => {

View File

@@ -57,7 +57,6 @@ import { ViewerService } from '../../services/viewer.service';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
standalone: true,
imports: [
CommonModule,
InfoDrawerComponent,

View File

@@ -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);