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