Skip to content

Commit bcea79e

Browse files
committed
feat: fix tests
1 parent e4ae34d commit bcea79e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

projects/wc/src/app/components/generic-ui/list-view/list-view.component.spec.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ListViewComponent } from './list-view.component';
2+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
23
import { ComponentFixture, TestBed } from '@angular/core/testing';
34
import { LuigiCoreService } from '@openmfp/portal-ui-lib';
45
import { 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
});

projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ValueCellComponent } from './value-cell.component';
2+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
23
import { ComponentFixture, TestBed } from '@angular/core/testing';
34

45
describe('ValueCellComponent', () => {
@@ -34,6 +35,7 @@ describe('ValueCellComponent', () => {
3435
beforeEach(() => {
3536
TestBed.configureTestingModule({
3637
imports: [ValueCellComponent],
38+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
3739
});
3840
});
3941

0 commit comments

Comments
 (0)