mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] fix tests
This commit is contained in:
@@ -52,6 +52,8 @@ import { ItemVersionsComponent } from '../versions/item-versions.component';
|
||||
import { ItemVersionsNoticeComponent } from '../versions/notice/item-versions-notice.component';
|
||||
import { ItemPageComponent } from './item-page.component';
|
||||
import { createRelationshipsObservable } from './item-types/shared/item.component.spec';
|
||||
import { NotifyRequestsStatusComponent } from './notify-requests-status/notify-requests-status-component/notify-requests-status.component';
|
||||
import { QaEventNotificationComponent } from './qa-event-notification/qa-event-notification.component';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||
@@ -160,6 +162,8 @@ describe('ItemPageComponent', () => {
|
||||
ItemVersionsComponent,
|
||||
ErrorComponent,
|
||||
ThemedLoadingComponent,
|
||||
NotifyRequestsStatusComponent,
|
||||
QaEventNotificationComponent,
|
||||
] },
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
@@ -1,20 +1,15 @@
|
||||
import { PaginatedList } from '../../../../core/data/paginated-list.model';
|
||||
import { Context } from '../../../../core/shared/context.model';
|
||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||
import {
|
||||
getTabulatableObjectsComponent,
|
||||
tabulatableObjectsComponent,
|
||||
} from './tabulatable-objects.decorator';
|
||||
import { getTabulatableObjectsComponent } from './tabulatable-objects.decorator';
|
||||
|
||||
const type = 'TestType';
|
||||
|
||||
@tabulatableObjectsComponent(PaginatedList<any>, ViewMode.Table, Context.Search)
|
||||
class TestTable {
|
||||
}
|
||||
describe('TabulatableObject decorator function', () => {
|
||||
|
||||
it('should have a decorator for table', () => {
|
||||
const tableDecorator = tabulatableObjectsComponent('Item', ViewMode.Table);
|
||||
const tableDecorator = getTabulatableObjectsComponent(['Item'], ViewMode.Table);
|
||||
expect(tableDecorator.length).not.toBeNull();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user