[DURACOM-191] fix tests

This commit is contained in:
Andrea Barbasso
2024-03-13 17:07:24 +01:00
parent 11a2170898
commit 464d793a6d
2 changed files with 6 additions and 7 deletions

View File

@@ -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();
}));

View File

@@ -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();
});