11import { ListViewComponent } from './list-view.component' ;
2+ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' ;
23import { ComponentFixture , TestBed } from '@angular/core/testing' ;
34import { LuigiCoreService } from '@openmfp/portal-ui-lib' ;
45import { ResourceService } from '@platform-mesh/portal-ui-lib/services' ;
@@ -12,7 +13,16 @@ describe('ListViewComponent', () => {
1213
1314 beforeEach ( ( ) => {
1415 mockResourceService = {
15- list : jest . fn ( ) . mockReturnValue ( of ( [ { metadata : { name : 'test' } } ] ) ) ,
16+ list : jest . fn ( ) . mockReturnValue (
17+ of ( [
18+ {
19+ metadata : { name : 'test' } ,
20+ status : {
21+ conditions : [ { type : 'Ready' , status : 'True' } ] ,
22+ } ,
23+ } ,
24+ ] ) ,
25+ ) ,
1626 delete : jest . fn ( ) . mockReturnValue ( of ( { } ) ) ,
1727 create : jest . fn ( ) . mockReturnValue ( of ( { data : { name : 'test' } } ) ) ,
1828 update : jest . fn ( ) . mockReturnValue ( of ( { data : { name : 'test' } } ) ) ,
@@ -28,6 +38,7 @@ describe('ListViewComponent', () => {
2838 { provide : ResourceService , useValue : mockResourceService } ,
2939 { provide : LuigiCoreService , useValue : mockLuigiCoreService } ,
3040 ] ,
41+ schemas : [ CUSTOM_ELEMENTS_SCHEMA ] ,
3142 } ) . overrideComponent ( ListViewComponent , {
3243 set : { template : '' } ,
3344 } ) ;
0 commit comments