@@ -16,11 +16,14 @@ import { RouterTestingModule } from '@angular/router/testing';
1616import { DaffTabsComponent } from '@daffodil/design/tabs' ;
1717import {
1818 DaffDocKind ,
19+ DaffDocsApiRole ,
1920 DaffPackageGuideDoc ,
2021} from '@daffodil/docs-utils' ;
2122
2223import { DaffioDocsDesignComponentContentComponent } from './component-content.component' ;
2324import { DaffioActiveHeaderService } from '../../../../core/dynamic-fragment/service' ;
25+ import { DaffioDocsApiDefaultContentComponent } from '../../../api/components/api-default-content/api-default-content.component' ;
26+ import { DaffioDocsApiDynamicContentComponentService } from '../../../api/dynamic-content/dynamic-content-component.service' ;
2427import { DaffioDocViewerComponent } from '../../../components/doc-viewer/doc-viewer.component' ;
2528
2629@Component ( {
@@ -51,6 +54,7 @@ describe('DaffioDocsDesignComponentContentComponent', () => {
5154 ] ,
5255 providers : [
5356 DaffioActiveHeaderService ,
57+ DaffioDocsApiDynamicContentComponentService ,
5458 provideHttpClient ( withInterceptorsFromDi ( ) ) ,
5559 provideHttpClientTesting ( ) ,
5660 ] ,
@@ -75,7 +79,10 @@ describe('DaffioDocsDesignComponentContentComponent', () => {
7579 lvl : 2 ,
7680 slug : 'toc' ,
7781 } ] ,
78- api : [ '<div id="api">api</div>' ] ,
82+ api : {
83+ // TODO: add better test when we have doc factories
84+ [ DaffDocsApiRole . COMPONENT ] : [ < any > { } ] ,
85+ } ,
7986 contents : '<div id="contents">contents</div>' ,
8087 longDescription : '<div id="longDescription">longDescription</div>' ,
8188 breadcrumbs : [ ] ,
@@ -122,7 +129,7 @@ describe('DaffioDocsDesignComponentContentComponent', () => {
122129 } ) ;
123130
124131 it ( 'should render the api' , ( ) => {
125- expect ( fixture . debugElement . query ( By . css ( '#api' ) ) . nativeElement . innerText ) . toEqual ( 'api' ) ;
132+ expect ( fixture . debugElement . query ( By . directive ( DaffioDocsApiDefaultContentComponent ) ) ) . toBeDefined ( ) ;
126133 } ) ;
127134
128135 it ( 'should pass the API toc to the article' , ( ) => {
0 commit comments