mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[DURACOM-191] convert components to standalone
This commit is contained in:
@@ -40,7 +40,7 @@ describe('AdminNotifyDashboardComponent', () => {
|
|||||||
|
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), NgbNavModule],
|
imports: [TranslateModule.forRoot(), NgbNavModule],
|
||||||
declarations: [ AdminNotifyDashboardComponent ],
|
declarations: [AdminNotifyDashboardComponent],
|
||||||
providers: [{ provide: SearchService, useValue: { search: () => createSuccessfulRemoteDataObject$(results) } }],
|
providers: [{ provide: SearchService, useValue: { search: () => createSuccessfulRemoteDataObject$(results) } }],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
@@ -1,7 +1,13 @@
|
|||||||
|
import {
|
||||||
|
AsyncPipe,
|
||||||
|
NgIf,
|
||||||
|
} from '@angular/common';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
OnInit,
|
OnInit,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import {
|
import {
|
||||||
forkJoin,
|
forkJoin,
|
||||||
Observable,
|
Observable,
|
||||||
@@ -17,6 +23,7 @@ import { SEARCH_CONFIG_SERVICE } from '../../my-dspace-page/my-dspace-configurat
|
|||||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||||
import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model';
|
import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model';
|
||||||
import { SearchObjects } from '../../shared/search/models/search-objects.model';
|
import { SearchObjects } from '../../shared/search/models/search-objects.model';
|
||||||
|
import { AdminNotifyMetricsComponent } from './admin-notify-metrics/admin-notify-metrics.component';
|
||||||
import {
|
import {
|
||||||
AdminNotifyMetricsBox,
|
AdminNotifyMetricsBox,
|
||||||
AdminNotifyMetricsRow,
|
AdminNotifyMetricsRow,
|
||||||
@@ -31,6 +38,14 @@ import {
|
|||||||
useClass: SearchConfigurationService,
|
useClass: SearchConfigurationService,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
AdminNotifyMetricsComponent,
|
||||||
|
RouterLink,
|
||||||
|
NgIf,
|
||||||
|
TranslateModule,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -27,12 +27,6 @@ const ENTRY_COMPONENTS = [
|
|||||||
AdminNotifyDashboardRoutingModule,
|
AdminNotifyDashboardRoutingModule,
|
||||||
SearchModule,
|
SearchModule,
|
||||||
SearchPageModule,
|
SearchPageModule,
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
AdminNotifyMessagesService,
|
|
||||||
DatePipe,
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
...ENTRY_COMPONENTS,
|
...ENTRY_COMPONENTS,
|
||||||
AdminNotifyDashboardComponent,
|
AdminNotifyDashboardComponent,
|
||||||
AdminNotifyMetricsComponent,
|
AdminNotifyMetricsComponent,
|
||||||
@@ -42,6 +36,10 @@ const ENTRY_COMPONENTS = [
|
|||||||
AdminNotifySearchResultComponent,
|
AdminNotifySearchResultComponent,
|
||||||
AdminNotifyLogsResultComponent,
|
AdminNotifyLogsResultComponent,
|
||||||
],
|
],
|
||||||
|
providers: [
|
||||||
|
AdminNotifyMessagesService,
|
||||||
|
DatePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class AdminNotifyDashboardModule {
|
export class AdminNotifyDashboardModule {
|
||||||
static withEntryComponents() {
|
static withEntryComponents() {
|
||||||
|
@@ -16,7 +16,7 @@ describe('AdminNotifyDetailModalComponent', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ AdminNotifyDetailModalComponent ],
|
declarations: [AdminNotifyDetailModalComponent],
|
||||||
providers: [{ provide: NgbActiveModal, useValue: modalStub }],
|
providers: [{ provide: NgbActiveModal, useValue: modalStub }],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
NgForOf,
|
||||||
|
NgIf,
|
||||||
|
} from '@angular/common';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
@@ -5,7 +9,10 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import {
|
||||||
|
TranslateModule,
|
||||||
|
TranslateService,
|
||||||
|
} from '@ngx-translate/core';
|
||||||
|
|
||||||
import { fadeIn } from '../../../shared/animations/fade';
|
import { fadeIn } from '../../../shared/animations/fade';
|
||||||
import { MissingTranslationHelper } from '../../../shared/translate/missing-translation.helper';
|
import { MissingTranslationHelper } from '../../../shared/translate/missing-translation.helper';
|
||||||
@@ -17,6 +24,12 @@ import { AdminNotifyMessage } from '../models/admin-notify-message.model';
|
|||||||
animations: [
|
animations: [
|
||||||
fadeIn,
|
fadeIn,
|
||||||
],
|
],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
NgForOf,
|
||||||
|
TranslateModule,
|
||||||
|
NgIf,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component for detailed view of LDN messages displayed in search result in AdminNotifyDashboardComponent
|
* Component for detailed view of LDN messages displayed in search result in AdminNotifyDashboardComponent
|
||||||
|
@@ -37,7 +37,7 @@ describe('AdminNotifyIncomingComponent', () => {
|
|||||||
});
|
});
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ AdminNotifyIncomingComponent ],
|
declarations: [AdminNotifyIncomingComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SEARCH_CONFIG_SERVICE, useValue: SearchConfigurationService },
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: SearchConfigurationService },
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
|
@@ -2,9 +2,12 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
Inject,
|
Inject,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-configuration.service';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-configuration.service';
|
||||||
|
import { AdminNotifyLogsResultComponent } from '../admin-notify-logs-result/admin-notify-logs-result.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-incoming',
|
selector: 'ds-admin-notify-incoming',
|
||||||
@@ -15,6 +18,12 @@ import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-conf
|
|||||||
useClass: SearchConfigurationService,
|
useClass: SearchConfigurationService,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
RouterLink,
|
||||||
|
AdminNotifyLogsResultComponent,
|
||||||
|
TranslateModule,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class AdminNotifyIncomingComponent {
|
export class AdminNotifyIncomingComponent {
|
||||||
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
||||||
|
@@ -30,7 +30,7 @@ describe('AdminNotifyLogsResultComponent', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ AdminNotifyLogsResultComponent ],
|
declarations: [AdminNotifyLogsResultComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: Router, useValue: new RouterStub() },
|
{ provide: Router, useValue: new RouterStub() },
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
AsyncPipe,
|
||||||
|
NgIf,
|
||||||
|
} from '@angular/common';
|
||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
@@ -10,6 +14,7 @@ import {
|
|||||||
ActivatedRouteSnapshot,
|
ActivatedRouteSnapshot,
|
||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
@@ -17,6 +22,8 @@ import { Context } from '../../../../core/shared/context.model';
|
|||||||
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-configuration.service';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-configuration.service';
|
||||||
|
import { SearchLabelsComponent } from '../../../../shared/search/search-labels/search-labels.component';
|
||||||
|
import { ThemedSearchComponent } from '../../../../shared/search/themed-search.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-logs-result',
|
selector: 'ds-admin-notify-logs-result',
|
||||||
@@ -27,6 +34,14 @@ import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-conf
|
|||||||
useClass: SearchConfigurationService,
|
useClass: SearchConfigurationService,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
SearchLabelsComponent,
|
||||||
|
ThemedSearchComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
TranslateModule,
|
||||||
|
NgIf,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -36,7 +36,6 @@ describe('AdminNotifyOutgoingComponent', () => {
|
|||||||
});
|
});
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ AdminNotifyOutgoingComponent ],
|
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SEARCH_CONFIG_SERVICE, useValue: SearchConfigurationService },
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: SearchConfigurationService },
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
|
@@ -2,9 +2,12 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
Inject,
|
Inject,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-configuration.service';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-configuration.service';
|
||||||
|
import { AdminNotifyLogsResultComponent } from '../admin-notify-logs-result/admin-notify-logs-result.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-outgoing',
|
selector: 'ds-admin-notify-outgoing',
|
||||||
@@ -15,6 +18,12 @@ import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-conf
|
|||||||
useClass: SearchConfigurationService,
|
useClass: SearchConfigurationService,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
RouterLink,
|
||||||
|
AdminNotifyLogsResultComponent,
|
||||||
|
TranslateModule,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class AdminNotifyOutgoingComponent {
|
export class AdminNotifyOutgoingComponent {
|
||||||
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
||||||
|
@@ -22,7 +22,7 @@ describe('AdminNotifyMetricsComponent', () => {
|
|||||||
|
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ AdminNotifyMetricsComponent ],
|
declarations: [AdminNotifyMetricsComponent],
|
||||||
providers: [{ provide: Router, useValue: router }],
|
providers: [{ provide: Router, useValue: router }],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
@@ -1,15 +1,24 @@
|
|||||||
|
import { NgForOf } from '@angular/common';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { ViewMode } from '../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../core/shared/view-mode.model';
|
||||||
|
import { NotificationBoxComponent } from '../../../shared/notification-box/notification-box.component';
|
||||||
import { AdminNotifyMetricsRow } from './admin-notify-metrics.model';
|
import { AdminNotifyMetricsRow } from './admin-notify-metrics.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-metrics',
|
selector: 'ds-admin-notify-metrics',
|
||||||
templateUrl: './admin-notify-metrics.component.html',
|
templateUrl: './admin-notify-metrics.component.html',
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
NotificationBoxComponent,
|
||||||
|
TranslateModule,
|
||||||
|
NgForOf,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component used to display the number of notification for each configured box in the notifyMetrics section
|
* Component used to display the number of notification for each configured box in the notifyMetrics section
|
||||||
|
@@ -129,7 +129,7 @@ describe('AdminNotifySearchResultComponent', () => {
|
|||||||
|
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ AdminNotifySearchResultComponent, AdminNotifyDetailModalComponent ],
|
declarations: [AdminNotifySearchResultComponent, AdminNotifyDetailModalComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AdminNotifyMessagesService, useValue: adminNotifyMessageService },
|
{ provide: AdminNotifyMessagesService, useValue: adminNotifyMessageService },
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
|
@@ -1,11 +1,18 @@
|
|||||||
import { DatePipe } from '@angular/common';
|
import {
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
NgForOf,
|
||||||
|
NgIf,
|
||||||
|
} from '@angular/common';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Inject,
|
Inject,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
OnInit,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import {
|
import {
|
||||||
BehaviorSubject,
|
BehaviorSubject,
|
||||||
Subscription,
|
Subscription,
|
||||||
@@ -18,6 +25,8 @@ import { ViewMode } from '../../../core/shared/view-mode.model';
|
|||||||
import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-configuration.service';
|
import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-configuration.service';
|
||||||
import { tabulatableObjectsComponent } from '../../../shared/object-collection/shared/tabulatable-objects/tabulatable-objects.decorator';
|
import { tabulatableObjectsComponent } from '../../../shared/object-collection/shared/tabulatable-objects/tabulatable-objects.decorator';
|
||||||
import { TabulatableResultListElementsComponent } from '../../../shared/object-list/search-result-list-element/tabulatable-search-result/tabulatable-result-list-elements.component';
|
import { TabulatableResultListElementsComponent } from '../../../shared/object-list/search-result-list-element/tabulatable-search-result/tabulatable-result-list-elements.component';
|
||||||
|
import { TruncatableComponent } from '../../../shared/truncatable/truncatable.component';
|
||||||
|
import { TruncatablePartComponent } from '../../../shared/truncatable/truncatable-part/truncatable-part.component';
|
||||||
import { AdminNotifyDetailModalComponent } from '../admin-notify-detail-modal/admin-notify-detail-modal.component';
|
import { AdminNotifyDetailModalComponent } from '../admin-notify-detail-modal/admin-notify-detail-modal.component';
|
||||||
import { AdminNotifyMessage } from '../models/admin-notify-message.model';
|
import { AdminNotifyMessage } from '../models/admin-notify-message.model';
|
||||||
import { AdminNotifySearchResult } from '../models/admin-notify-message-search-result.model';
|
import { AdminNotifySearchResult } from '../models/admin-notify-message-search-result.model';
|
||||||
@@ -33,6 +42,17 @@ import { AdminNotifyMessagesService } from '../services/admin-notify-messages.se
|
|||||||
useClass: SearchConfigurationService,
|
useClass: SearchConfigurationService,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
TranslateModule,
|
||||||
|
NgForOf,
|
||||||
|
NgIf,
|
||||||
|
DatePipe,
|
||||||
|
AsyncPipe,
|
||||||
|
TruncatableComponent,
|
||||||
|
TruncatablePartComponent,
|
||||||
|
RouterLink,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component for visualization in table format of the search results related to the AdminNotifyDashboardComponent
|
* Component for visualization in table format of the search results related to the AdminNotifyDashboardComponent
|
||||||
|
@@ -14,6 +14,7 @@ import {
|
|||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { cold } from 'jasmine-marbles';
|
import { cold } from 'jasmine-marbles';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
@@ -111,6 +112,7 @@ describe('BrowseByDateComponent', () => {
|
|||||||
{ provide: Router, useValue: new RouterMock() },
|
{ provide: Router, useValue: new RouterMock() },
|
||||||
{ provide: PaginationService, useValue: paginationService },
|
{ provide: PaginationService, useValue: paginationService },
|
||||||
{ provide: ChangeDetectorRef, useValue: mockCdRef },
|
{ provide: ChangeDetectorRef, useValue: mockCdRef },
|
||||||
|
{ provide: Store, useValue: {} },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
|
@@ -150,7 +150,7 @@ describe('BrowseByMetadataComponent', () => {
|
|||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
.overrideComponent(BrowseByMetadataPageComponent, {
|
.overrideComponent(BrowseByMetadataComponent, {
|
||||||
remove: {
|
remove: {
|
||||||
imports: [ThemedLoadingComponent, DsoEditMenuComponent],
|
imports: [ThemedLoadingComponent, DsoEditMenuComponent],
|
||||||
},
|
},
|
||||||
|
@@ -44,8 +44,7 @@ describe('BrowseByPageComponent', () => {
|
|||||||
themeService = getMockThemeService();
|
themeService = getMockThemeService();
|
||||||
|
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [BrowseBySwitcherComponent, BrowseByPageComponent],
|
imports: [BrowseBySwitcherComponent, BrowseByPageComponent, DynamicComponentLoaderDirective],
|
||||||
declarations: [DynamicComponentLoaderDirective],
|
|
||||||
providers: [
|
providers: [
|
||||||
BrowseByTestComponent,
|
BrowseByTestComponent,
|
||||||
{ provide: ActivatedRoute, useValue: activatedRoute },
|
{ provide: ActivatedRoute, useValue: activatedRoute },
|
||||||
|
@@ -39,7 +39,7 @@ describe('BrowseByTaxonomyComponent', () => {
|
|||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
.overrideComponent(BrowseByTaxonomyPageComponent, {
|
.overrideComponent(BrowseByTaxonomyComponent, {
|
||||||
remove: { imports: [VocabularyTreeviewComponent] },
|
remove: { imports: [VocabularyTreeviewComponent] },
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
fakeAsync,
|
fakeAsync,
|
||||||
TestBed,
|
TestBed,
|
||||||
@@ -97,7 +98,6 @@ describe('EPersonDataService', () => {
|
|||||||
{ provide: DSOChangeAnalyzer, useClass: DummyChangeAnalyzer },
|
{ provide: DSOChangeAnalyzer, useClass: DummyChangeAnalyzer },
|
||||||
{ provide: NotificationsService, useClass: NotificationsServiceStub },
|
{ provide: NotificationsService, useClass: NotificationsServiceStub },
|
||||||
],
|
],
|
||||||
providers: [],
|
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -8,14 +8,18 @@ import {
|
|||||||
waitForAsync,
|
waitForAsync,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
import { ActivatedRouteStub } from 'src/app/shared/testing/active-router.stub';
|
||||||
|
import { ThemeService } from 'src/app/shared/theme-support/theme.service';
|
||||||
|
|
||||||
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
||||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { Item } from '../../../../../core/shared/item.model';
|
import { Item } from '../../../../../core/shared/item.model';
|
||||||
import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service.mock';
|
||||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||||
|
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||||
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
|
||||||
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
||||||
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
||||||
|
@@ -126,7 +126,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => {
|
|||||||
};
|
};
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
await TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TruncatePipe, PersonSearchResultListSubmissionElementComponent],
|
imports: [TruncatePipe, PersonSearchResultListSubmissionElementComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TruncatableService, useValue: {} },
|
{ provide: TruncatableService, useValue: {} },
|
||||||
|
@@ -46,11 +46,9 @@ describe('ItemAlertsComponent', () => {
|
|||||||
dsoWithdrawnReinstateModalService = jasmine.createSpyObj('dsoWithdrawnReinstateModalService', ['openCreateWithdrawnReinstateModal']);
|
dsoWithdrawnReinstateModalService = jasmine.createSpyObj('dsoWithdrawnReinstateModalService', ['openCreateWithdrawnReinstateModal']);
|
||||||
correctionTypeDataService = jasmine.createSpyObj('correctionTypeDataService', ['findByItem']);
|
correctionTypeDataService = jasmine.createSpyObj('correctionTypeDataService', ['findByItem']);
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
providers: [
|
|
||||||
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
|
||||||
],
|
|
||||||
imports: [TranslateModule.forRoot(), ItemAlertsComponent, NoopAnimationsModule],
|
imports: [TranslateModule.forRoot(), ItemAlertsComponent, NoopAnimationsModule],
|
||||||
providers: [
|
providers: [
|
||||||
|
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||||
{ provide: DsoWithdrawnReinstateModalService, useValue: dsoWithdrawnReinstateModalService },
|
{ provide: DsoWithdrawnReinstateModalService, useValue: dsoWithdrawnReinstateModalService },
|
||||||
{ provide: CorrectionTypeDataService, useValue: correctionTypeDataService },
|
{ provide: CorrectionTypeDataService, useValue: correctionTypeDataService },
|
||||||
|
@@ -19,9 +19,9 @@ import { BrowseDefinitionDataServiceStub } from '../../../../../shared/testing/b
|
|||||||
import { TranslateLoaderMock } from '../../../../../shared/testing/translate-loader.mock';
|
import { TranslateLoaderMock } from '../../../../../shared/testing/translate-loader.mock';
|
||||||
import { MetadataValuesComponent } from '../../../../field-components/metadata-values/metadata-values.component';
|
import { MetadataValuesComponent } from '../../../../field-components/metadata-values/metadata-values.component';
|
||||||
import { GenericItemPageFieldComponent } from '../generic/generic-item-page-field.component';
|
import { GenericItemPageFieldComponent } from '../generic/generic-item-page-field.component';
|
||||||
import { ImageField } from '../item-page-field.component';
|
import { ImageField } from '../image-field';
|
||||||
import { mockItemWithMetadataFieldsAndValue } from '../item-page-field.component.spec';
|
import { mockItemWithMetadataFieldsAndValue } from '../item-page-field.component.spec';
|
||||||
import { ItemPageImgFieldComponent } from './image-img-field';
|
import { ItemPageImgFieldComponent } from './item-page-img-field.component';
|
||||||
|
|
||||||
let component: ItemPageImgFieldComponent;
|
let component: ItemPageImgFieldComponent;
|
||||||
let fixture: ComponentFixture<ItemPageImgFieldComponent>;
|
let fixture: ComponentFixture<ItemPageImgFieldComponent>;
|
||||||
|
@@ -20,13 +20,13 @@ import { getMockThemeService } from '../shared/mocks/theme-service.mock';
|
|||||||
import { RoleDirective } from '../shared/roles/role.directive';
|
import { RoleDirective } from '../shared/roles/role.directive';
|
||||||
import { ThemedSearchComponent } from '../shared/search/themed-search.component';
|
import { ThemedSearchComponent } from '../shared/search/themed-search.component';
|
||||||
import { ThemeService } from '../shared/theme-support/theme.service';
|
import { ThemeService } from '../shared/theme-support/theme.service';
|
||||||
import { MyDSpaceConfigurationService } from './my-dspace-configuration.service';
|
import {
|
||||||
|
MyDSpaceConfigurationService,
|
||||||
|
SEARCH_CONFIG_SERVICE,
|
||||||
|
} from './my-dspace-configuration.service';
|
||||||
import { MyDSpaceConfigurationValueType } from './my-dspace-configuration-value-type';
|
import { MyDSpaceConfigurationValueType } from './my-dspace-configuration-value-type';
|
||||||
import { MyDSpaceNewSubmissionComponent } from './my-dspace-new-submission/my-dspace-new-submission.component';
|
import { MyDSpaceNewSubmissionComponent } from './my-dspace-new-submission/my-dspace-new-submission.component';
|
||||||
import {
|
import { MyDSpacePageComponent } from './my-dspace-page.component';
|
||||||
MyDSpacePageComponent,
|
|
||||||
SEARCH_CONFIG_SERVICE,
|
|
||||||
} from './my-dspace-page.component';
|
|
||||||
import SpyObj = jasmine.SpyObj;
|
import SpyObj = jasmine.SpyObj;
|
||||||
|
|
||||||
describe('MyDSpacePageComponent', () => {
|
describe('MyDSpacePageComponent', () => {
|
||||||
|
@@ -5,9 +5,11 @@ import {
|
|||||||
ComponentFixture,
|
ComponentFixture,
|
||||||
TestBed,
|
TestBed,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { AdminNotificationsPublicationClaimPageComponent } from '../../admin/admin-notifications/admin-notifications-publication-claim-page/admin-notifications-publication-claim-page.component';
|
import { AdminNotificationsPublicationClaimPageComponent } from '../../admin/admin-notifications/admin-notifications-publication-claim-page/admin-notifications-publication-claim-page.component';
|
||||||
|
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
||||||
import { NotificationsSuggestionTargetsPageComponent } from './notifications-suggestion-targets-page.component';
|
import { NotificationsSuggestionTargetsPageComponent } from './notifications-suggestion-targets-page.component';
|
||||||
|
|
||||||
describe('NotificationsSuggestionTargetsPageComponent', () => {
|
describe('NotificationsSuggestionTargetsPageComponent', () => {
|
||||||
@@ -23,6 +25,7 @@ describe('NotificationsSuggestionTargetsPageComponent', () => {
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
AdminNotificationsPublicationClaimPageComponent,
|
AdminNotificationsPublicationClaimPageComponent,
|
||||||
|
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
|
@@ -5,7 +5,7 @@ import {
|
|||||||
TestBed,
|
TestBed,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { QualityAssuranceEventsComponent } from '../../../notifications/qa/events/quality-assurance-events.component';
|
import { QualityAssuranceEventsComponent } from '../../notifications/qa/events/quality-assurance-events.component';
|
||||||
import { QualityAssuranceEventsPageComponent } from './quality-assurance-events-page.component';
|
import { QualityAssuranceEventsPageComponent } from './quality-assurance-events-page.component';
|
||||||
|
|
||||||
describe('QualityAssuranceEventsPageComponent', () => {
|
describe('QualityAssuranceEventsPageComponent', () => {
|
||||||
@@ -17,7 +17,7 @@ describe('QualityAssuranceEventsPageComponent', () => {
|
|||||||
imports: [QualityAssuranceEventsPageComponent],
|
imports: [QualityAssuranceEventsPageComponent],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
.overrideComponent(AdminQualityAssuranceEventsPageComponent, {
|
.overrideComponent(QualityAssuranceEventsPageComponent, {
|
||||||
remove: {
|
remove: {
|
||||||
imports: [QualityAssuranceEventsComponent],
|
imports: [QualityAssuranceEventsComponent],
|
||||||
},
|
},
|
||||||
|
@@ -44,8 +44,7 @@ describe('ComcolBrowseByComponent', () => {
|
|||||||
themeService = getMockThemeService();
|
themeService = getMockThemeService();
|
||||||
|
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [BrowseBySwitcherComponent, ComcolBrowseByComponent],
|
imports: [BrowseBySwitcherComponent, ComcolBrowseByComponent, DynamicComponentLoaderDirective],
|
||||||
declarations: [DynamicComponentLoaderDirective],
|
|
||||||
providers: [
|
providers: [
|
||||||
BrowseByTestComponent,
|
BrowseByTestComponent,
|
||||||
{ provide: ActivatedRoute, useValue: activatedRoute },
|
{ provide: ActivatedRoute, useValue: activatedRoute },
|
||||||
|
@@ -23,7 +23,7 @@ describe('NotificationBoxComponent', () => {
|
|||||||
|
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [ NotificationBoxComponent ],
|
declarations: [NotificationBoxComponent],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
|
@@ -1,13 +1,16 @@
|
|||||||
|
import { NgStyle } from '@angular/common';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
Output,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { AdminNotifyMetricsBox } from '../../admin/admin-notify-dashboard/admin-notify-metrics/admin-notify-metrics.model';
|
import { AdminNotifyMetricsBox } from '../../admin/admin-notify-dashboard/admin-notify-metrics/admin-notify-metrics.model';
|
||||||
import { AdminNotifySearchResult } from '../../admin/admin-notify-dashboard/models/admin-notify-message-search-result.model';
|
import { AdminNotifySearchResult } from '../../admin/admin-notify-dashboard/models/admin-notify-message-search-result.model';
|
||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
|
import { HoverClassDirective } from '../hover-class.directive';
|
||||||
import { listableObjectComponent } from '../object-collection/shared/listable-object/listable-object.decorator';
|
import { listableObjectComponent } from '../object-collection/shared/listable-object/listable-object.decorator';
|
||||||
|
|
||||||
@listableObjectComponent(AdminNotifySearchResult, ViewMode.ListElement)
|
@listableObjectComponent(AdminNotifySearchResult, ViewMode.ListElement)
|
||||||
@@ -15,6 +18,12 @@ import { listableObjectComponent } from '../object-collection/shared/listable-ob
|
|||||||
selector: 'ds-notification-box',
|
selector: 'ds-notification-box',
|
||||||
templateUrl: './notification-box.component.html',
|
templateUrl: './notification-box.component.html',
|
||||||
styleUrls: ['./notification-box.component.scss'],
|
styleUrls: ['./notification-box.component.scss'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
NgStyle,
|
||||||
|
HoverClassDirective,
|
||||||
|
TranslateModule,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component to display the count of notifications for each type of LDN message and to access the related filtered search
|
* Component to display the count of notifications for each type of LDN message and to access the related filtered search
|
||||||
|
@@ -39,7 +39,7 @@ describe('TabulatableObjectsLoaderComponent', () => {
|
|||||||
getThemeName: 'dspace',
|
getThemeName: 'dspace',
|
||||||
});
|
});
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ TabulatableObjectsLoaderComponent, TabulatableObjectsDirective ],
|
imports: [TabulatableObjectsLoaderComponent, TabulatableObjectsDirective],
|
||||||
providers: [
|
providers: [
|
||||||
provideMockStore({}),
|
provideMockStore({}),
|
||||||
{ provide: ThemeService, useValue: themeService },
|
{ provide: ThemeService, useValue: themeService },
|
||||||
|
@@ -12,6 +12,7 @@ import {
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
import { getMockThemeService } from 'src/app/shared/mocks/theme-service.mock';
|
||||||
|
|
||||||
import { APP_CONFIG } from '../../../../../config/app-config.interface';
|
import { APP_CONFIG } from '../../../../../config/app-config.interface';
|
||||||
import { environment } from '../../../../../environments/environment';
|
import { environment } from '../../../../../environments/environment';
|
||||||
@@ -21,6 +22,7 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
|
||||||
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||||
import { ItemSearchResultListElementSubmissionComponent } from './item-search-result-list-element-submission.component';
|
import { ItemSearchResultListElementSubmissionComponent } from './item-search-result-list-element-submission.component';
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ describe('ObjectTableComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ ObjectTableComponent ],
|
imports: [ObjectTableComponent],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@ import {
|
|||||||
Observable,
|
Observable,
|
||||||
of as observableOf,
|
of as observableOf,
|
||||||
} from 'rxjs';
|
} from 'rxjs';
|
||||||
|
import { SearchFilterService } from 'src/app/core/shared/search/search-filter.service';
|
||||||
|
|
||||||
import { SearchService } from '../../../../core/shared/search/search.service';
|
import { SearchService } from '../../../../core/shared/search/search.service';
|
||||||
import { SequenceService } from '../../../../core/shared/sequence.service';
|
import { SequenceService } from '../../../../core/shared/sequence.service';
|
||||||
|
@@ -44,8 +44,8 @@ describe('StartsWithLoaderComponent', () => {
|
|||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
StartsWithTextComponent,
|
StartsWithTextComponent,
|
||||||
StartsWithLoaderComponent,
|
StartsWithLoaderComponent,
|
||||||
|
DynamicComponentLoaderDirective,
|
||||||
],
|
],
|
||||||
declarations: [DynamicComponentLoaderDirective],
|
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: PaginationService, useValue: paginationService },
|
{ provide: PaginationService, useValue: paginationService },
|
||||||
{ provide: ActivatedRoute, useValue: route },
|
{ provide: ActivatedRoute, useValue: route },
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { inject } from '@angular/core';
|
|
||||||
import {
|
import {
|
||||||
ComponentFixture,
|
ComponentFixture,
|
||||||
TestBed,
|
TestBed,
|
||||||
@@ -21,7 +20,6 @@ import {
|
|||||||
} from 'src/config/app-config.interface';
|
} from 'src/config/app-config.interface';
|
||||||
import { environment } from 'src/environments/environment.test';
|
import { environment } from 'src/environments/environment.test';
|
||||||
|
|
||||||
import { AppState } from '../../../app.reducer';
|
|
||||||
import { SubmissionAccessesConfigDataService } from '../../../core/config/submission-accesses-config-data.service';
|
import { SubmissionAccessesConfigDataService } from '../../../core/config/submission-accesses-config-data.service';
|
||||||
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
|
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
|
||||||
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
|
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
|
||||||
@@ -132,7 +130,7 @@ describe('SubmissionSectionAccessesComponent', () => {
|
|||||||
.compileComponents();
|
.compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(inject([Store], (store: Store<AppState>) => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(SubmissionSectionAccessesComponent);
|
fixture = TestBed.createComponent(SubmissionSectionAccessesComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
formService = TestBed.inject(FormService);
|
formService = TestBed.inject(FormService);
|
||||||
@@ -141,7 +139,7 @@ describe('SubmissionSectionAccessesComponent', () => {
|
|||||||
formService.isValid.and.returnValue(observableOf(true));
|
formService.isValid.and.returnValue(observableOf(true));
|
||||||
formService.getFormData.and.returnValue(observableOf(mockAccessesFormData));
|
formService.getFormData.and.returnValue(observableOf(mockAccessesFormData));
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
}));
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
|
@@ -149,8 +149,6 @@ describe('SubmissionSectionDuplicatesComponent test suite', () => {
|
|||||||
NgxPaginationModule,
|
NgxPaginationModule,
|
||||||
NoopAnimationsModule,
|
NoopAnimationsModule,
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
SubmissionSectionDuplicatesComponent,
|
SubmissionSectionDuplicatesComponent,
|
||||||
TestComponent,
|
TestComponent,
|
||||||
ObjNgFor,
|
ObjNgFor,
|
||||||
@@ -255,6 +253,12 @@ describe('SubmissionSectionDuplicatesComponent test suite', () => {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-test-cmp',
|
selector: 'ds-test-cmp',
|
||||||
template: ``,
|
template: ``,
|
||||||
|
standalone: true,
|
||||||
|
imports: [BrowserModule,
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
NgxPaginationModule],
|
||||||
})
|
})
|
||||||
class TestComponent {
|
class TestComponent {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user