mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
fix DsDynamicListComponent tests
This commit is contained in:
@@ -26,6 +26,9 @@ import {
|
|||||||
mockDynamicFormLayoutService,
|
mockDynamicFormLayoutService,
|
||||||
mockDynamicFormValidationService
|
mockDynamicFormValidationService
|
||||||
} from '../../../../../testing/dynamic-form-mock-services';
|
} from '../../../../../testing/dynamic-form-mock-services';
|
||||||
|
import { ConfigurationDataService } from '../../../../../../core/data/configuration-data.service';
|
||||||
|
import { createSuccessfulRemoteDataObject$ } from '../../../../../remote-data.utils';
|
||||||
|
import { ConfigurationProperty } from '../../../../../../core/shared/configuration-property.model';
|
||||||
|
|
||||||
export const LAYOUT_TEST = {
|
export const LAYOUT_TEST = {
|
||||||
element: {
|
element: {
|
||||||
@@ -74,6 +77,15 @@ describe('DsDynamicListComponent test suite', () => {
|
|||||||
|
|
||||||
const vocabularyServiceStub = new VocabularyServiceStub();
|
const vocabularyServiceStub = new VocabularyServiceStub();
|
||||||
|
|
||||||
|
const configurationDataService = jasmine.createSpyObj('configurationDataService', {
|
||||||
|
findByPropertyName: createSuccessfulRemoteDataObject$(Object.assign(new ConfigurationProperty(), {
|
||||||
|
name: 'test',
|
||||||
|
values: [
|
||||||
|
'org.dspace.ctask.general.ProfileFormats = test'
|
||||||
|
]
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
|
||||||
// waitForAsync beforeEach
|
// waitForAsync beforeEach
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
|
|
||||||
@@ -94,7 +106,8 @@ describe('DsDynamicListComponent test suite', () => {
|
|||||||
FormBuilderService,
|
FormBuilderService,
|
||||||
{ provide: VocabularyService, useValue: vocabularyServiceStub },
|
{ provide: VocabularyService, useValue: vocabularyServiceStub },
|
||||||
{ provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService },
|
{ provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService },
|
||||||
{ provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService }
|
{ provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService },
|
||||||
|
{ provide: ConfigurationDataService, useValue: configurationDataService }
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
});
|
});
|
||||||
@@ -287,11 +300,7 @@ describe('DsDynamicListComponent test suite', () => {
|
|||||||
selector: 'ds-test-cmp',
|
selector: 'ds-test-cmp',
|
||||||
template: ``,
|
template: ``,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [DynamicFormsCoreModule,
|
imports: [DsDynamicListComponent]
|
||||||
DynamicFormsNGBootstrapUIModule,
|
|
||||||
FormsModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
NgbModule]
|
|
||||||
})
|
})
|
||||||
class TestComponent {
|
class TestComponent {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user