mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DURACOM-191] run angular script for migration
This commit is contained in:
@@ -14,9 +14,7 @@ import {NotificationsModule} from '../../notifications/notifications.module';
|
||||
SharedModule,
|
||||
CoreModule.forRoot(),
|
||||
AdminNotificationsRoutingModule,
|
||||
NotificationsModule
|
||||
],
|
||||
declarations: [
|
||||
NotificationsModule,
|
||||
AdminQualityAssuranceTopicsPageComponent,
|
||||
AdminQualityAssuranceEventsPageComponent,
|
||||
AdminQualityAssuranceSourcePageComponent
|
||||
|
@@ -8,7 +8,7 @@ describe('AdminQualityAssuranceEventsPageComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AdminQualityAssuranceEventsPageComponent ],
|
||||
imports: [AdminQualityAssuranceEventsPageComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -1,11 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { QualityAssuranceEventsComponent } from '../../../notifications/qa/events/quality-assurance-events.component';
|
||||
|
||||
/**
|
||||
* Component for the page that show the QA events related to a specific topic.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-quality-assurance-events-page',
|
||||
templateUrl: './admin-quality-assurance-events-page.component.html'
|
||||
templateUrl: './admin-quality-assurance-events-page.component.html',
|
||||
standalone: true,
|
||||
imports: [QualityAssuranceEventsComponent]
|
||||
})
|
||||
export class AdminQualityAssuranceEventsPageComponent {
|
||||
|
||||
|
@@ -9,7 +9,7 @@ describe('AdminQualityAssuranceSourcePageComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ AdminQualityAssuranceSourcePageComponent ],
|
||||
imports: [AdminQualityAssuranceSourcePageComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { QualityAssuranceSourceComponent } from '../../../notifications/qa/source/quality-assurance-source.component';
|
||||
|
||||
/**
|
||||
* Component for the page that show the QA sources.
|
||||
@@ -6,5 +7,7 @@ import { Component } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'ds-admin-quality-assurance-source-page-component',
|
||||
templateUrl: './admin-quality-assurance-source-page.component.html',
|
||||
standalone: true,
|
||||
imports: [QualityAssuranceSourceComponent]
|
||||
})
|
||||
export class AdminQualityAssuranceSourcePageComponent {}
|
||||
|
@@ -8,7 +8,7 @@ describe('AdminQualityAssuranceTopicsPageComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AdminQualityAssuranceTopicsPageComponent ],
|
||||
imports: [AdminQualityAssuranceTopicsPageComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
.compileComponents();
|
||||
|
@@ -1,11 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { QualityAssuranceTopicsComponent } from '../../../notifications/qa/topics/quality-assurance-topics.component';
|
||||
|
||||
/**
|
||||
* Component for the page that show the QA topics related to a specific source.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-notification-qa-page',
|
||||
templateUrl: './admin-quality-assurance-topics-page.component.html'
|
||||
templateUrl: './admin-quality-assurance-topics-page.component.html',
|
||||
standalone: true,
|
||||
imports: [QualityAssuranceTopicsComponent]
|
||||
})
|
||||
export class AdminQualityAssuranceTopicsPageComponent {
|
||||
|
||||
|
@@ -79,7 +79,8 @@ describe('ItemEditBitstreamComponent', () => {
|
||||
TranslateModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([]),
|
||||
ItemEditBitstreamComponent,
|
||||
VarDirective],
|
||||
VarDirective
|
||||
],
|
||||
declarations: [BrowserOnlyMockPipe],
|
||||
providers: [
|
||||
{ provide: ObjectUpdatesService, useValue: objectUpdatesService },
|
||||
|
@@ -60,9 +60,7 @@ const PROVIDERS = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
...MODULES
|
||||
],
|
||||
declarations: [
|
||||
...MODULES,
|
||||
...COMPONENTS,
|
||||
...DIRECTIVES,
|
||||
...ENTRY_COMPONENTS
|
||||
|
@@ -106,10 +106,8 @@ describe('QualityAssuranceEventsComponent test suite', () => {
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule.forRoot(),
|
||||
],
|
||||
declarations: [
|
||||
QualityAssuranceEventsComponent,
|
||||
TestComponent,
|
||||
TestComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub(activatedRouteParamsMap, activatedRouteParams) },
|
||||
@@ -333,7 +331,9 @@ describe('QualityAssuranceEventsComponent test suite', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
standalone: true,
|
||||
imports: [CommonModule]
|
||||
})
|
||||
class TestComponent {
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { NgbModal, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, combineLatest, from, Observable, of, Subscription } from 'rxjs';
|
||||
import { distinctUntilChanged, last, map, mergeMap, scan, switchMap, take, tap } from 'rxjs/operators';
|
||||
|
||||
@@ -31,6 +31,10 @@ import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||
import {environment} from '../../../../environments/environment';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
||||
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||
|
||||
/**
|
||||
* Component to display the Quality Assurance event list.
|
||||
@@ -39,6 +43,8 @@ import {environment} from '../../../../environments/environment';
|
||||
selector: 'ds-quality-assurance-events',
|
||||
templateUrl: './quality-assurance-events.component.html',
|
||||
styleUrls: ['./quality-assurance-events.component.scss'],
|
||||
standalone: true,
|
||||
imports: [AlertComponent, NgIf, LoadingComponent, PaginationComponent, NgFor, RouterLink, NgbTooltipModule, AsyncPipe, TranslateModule]
|
||||
})
|
||||
export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||
/**
|
||||
|
@@ -74,10 +74,8 @@ describe('ProjectEntryImportModalComponent test suite', () => {
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule.forRoot(),
|
||||
],
|
||||
declarations: [
|
||||
ProjectEntryImportModalComponent,
|
||||
TestComponent,
|
||||
TestComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: NgbActiveModal, useValue: modalStub },
|
||||
@@ -203,7 +201,9 @@ describe('ProjectEntryImportModalComponent test suite', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
standalone: true,
|
||||
imports: [CommonModule]
|
||||
})
|
||||
class TestComponent {
|
||||
eventData = eventData;
|
||||
|
@@ -18,6 +18,13 @@ import {
|
||||
} from '../../../core/notifications/qa/models/quality-assurance-event.model';
|
||||
import { hasValue, isNotEmpty } from '../../../shared/empty.util';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||
import { ThemedSearchResultsComponent } from '../../../shared/search/search-results/themed-search-results.component';
|
||||
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgIf, AsyncPipe } from '@angular/common';
|
||||
import { RouterLink } from '@angular/router';
|
||||
|
||||
/**
|
||||
* The possible types of import for the external entry
|
||||
@@ -79,7 +86,9 @@ export interface QualityAssuranceEventData {
|
||||
@Component({
|
||||
selector: 'ds-project-entry-import-modal',
|
||||
styleUrls: ['./project-entry-import-modal.component.scss'],
|
||||
templateUrl: './project-entry-import-modal.component.html'
|
||||
templateUrl: './project-entry-import-modal.component.html',
|
||||
standalone: true,
|
||||
imports: [RouterLink, NgIf, FormsModule, LoadingComponent, ThemedSearchResultsComponent, AlertComponent, AsyncPipe, TranslateModule]
|
||||
})
|
||||
/**
|
||||
* Component to display a modal window for linking a project to an Quality Assurance event
|
||||
|
@@ -34,10 +34,8 @@ describe('QualityAssuranceSourceComponent test suite', () => {
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule.forRoot(),
|
||||
],
|
||||
declarations: [
|
||||
QualityAssuranceSourceComponent,
|
||||
TestComponent,
|
||||
TestComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: NotificationsStateService, useValue: mockNotificationsStateService },
|
||||
@@ -145,7 +143,9 @@ describe('QualityAssuranceSourceComponent test suite', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
standalone: true,
|
||||
imports: [CommonModule]
|
||||
})
|
||||
class TestComponent {
|
||||
|
||||
|
@@ -8,6 +8,12 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
|
||||
import { NotificationsStateService } from '../../notifications-state.service';
|
||||
import { AdminQualityAssuranceSourcePageParams } from '../../../admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-page-resolver.service';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
||||
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||
|
||||
/**
|
||||
* Component to display the Quality Assurance source list.
|
||||
@@ -15,7 +21,9 @@ import { hasValue } from '../../../shared/empty.util';
|
||||
@Component({
|
||||
selector: 'ds-quality-assurance-source',
|
||||
templateUrl: './quality-assurance-source.component.html',
|
||||
styleUrls: ['./quality-assurance-source.component.scss']
|
||||
styleUrls: ['./quality-assurance-source.component.scss'],
|
||||
standalone: true,
|
||||
imports: [AlertComponent, NgIf, LoadingComponent, PaginationComponent, NgFor, RouterLink, AsyncPipe, TranslateModule]
|
||||
})
|
||||
export class QualityAssuranceSourceComponent implements OnInit {
|
||||
|
||||
|
@@ -36,10 +36,8 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule.forRoot(),
|
||||
],
|
||||
declarations: [
|
||||
QualityAssuranceTopicsComponent,
|
||||
TestComponent,
|
||||
TestComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: NotificationsStateService, useValue: mockNotificationsStateService },
|
||||
@@ -153,7 +151,9 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
standalone: true,
|
||||
imports: [CommonModule]
|
||||
})
|
||||
class TestComponent {
|
||||
|
||||
|
@@ -14,8 +14,13 @@ import {
|
||||
AdminQualityAssuranceTopicsPageParams
|
||||
} from '../../../admin/admin-notifications/admin-quality-assurance-topics-page/admin-quality-assurance-topics-page-resolver.service';
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { QualityAssuranceTopicsService } from './quality-assurance-topics.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
||||
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||
|
||||
/**
|
||||
* Component to display the Quality Assurance topic list.
|
||||
@@ -24,6 +29,8 @@ import { QualityAssuranceTopicsService } from './quality-assurance-topics.servic
|
||||
selector: 'ds-quality-assurance-topic',
|
||||
templateUrl: './quality-assurance-topics.component.html',
|
||||
styleUrls: ['./quality-assurance-topics.component.scss'],
|
||||
standalone: true,
|
||||
imports: [AlertComponent, NgIf, LoadingComponent, PaginationComponent, NgFor, RouterLink, AsyncPipe, TranslateModule]
|
||||
})
|
||||
export class QualityAssuranceTopicsComponent implements OnInit {
|
||||
/**
|
||||
|
@@ -199,8 +199,7 @@ export function configureSearchComponentTestingModule(compType, additionalDeclar
|
||||
searchConfigurationServiceStub.paginatedSearchOptions = new BehaviorSubject(new PaginatedSearchOptions({pagination: {id: 'default'} as any}));
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [...additionalDeclarations],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule, compType],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule, compType, ...additionalDeclarations],
|
||||
providers: [
|
||||
{ provide: SearchService, useValue: searchServiceStub },
|
||||
{
|
||||
|
Reference in New Issue
Block a user