Skip to content

Commit a30f472

Browse files
Copilotrenemadsen
andcommitted
Add NO_ERRORS_SCHEMA to fix template element errors
- Added NO_ERRORS_SCHEMA import from @angular/core to all 31 spec files - Added schemas: [NO_ERRORS_SCHEMA] to TestBed configuration - Fixed Overlay mock to include scrollStrategies.reposition method - Resolves NG0304 errors about unknown elements (eform-new-subheader, mtx-grid, etc.) - Tests passing increased from 19 to 29 Co-authored-by: renemadsen <[email protected]>
1 parent f6d0477 commit a30f472

File tree

31 files changed

+128
-65
lines changed

31 files changed

+128
-65
lines changed

eform-client/src/app/common/modules/eform-shared-tags/components/shared-tag-create/shared-tag-create.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23

34
import { SharedTagCreateComponent } from './shared-tag-create.component';
45

@@ -8,7 +9,8 @@ describe('EmailRecipientTagNewComponent', () => {
89

910
beforeEach(waitForAsync(() => {
1011
TestBed.configureTestingModule({
11-
declarations: [ SharedTagCreateComponent ]
12+
declarations: [ SharedTagCreateComponent ],
13+
schemas: [NO_ERRORS_SCHEMA]
1214
})
1315
.compileComponents();
1416
}));

eform-client/src/app/common/modules/eform-shared-tags/components/shared-tag-delete/shared-tag-delete.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23

34
import { SharedTagDeleteComponent } from './shared-tag-delete.component';
45

@@ -8,7 +9,8 @@ describe('EmailRecipientTagDeleteComponent', () => {
89

910
beforeEach(waitForAsync(() => {
1011
TestBed.configureTestingModule({
11-
declarations: [ SharedTagDeleteComponent ]
12+
declarations: [ SharedTagDeleteComponent ],
13+
schemas: [NO_ERRORS_SCHEMA]
1214
})
1315
.compileComponents();
1416
}));

eform-client/src/app/common/modules/eform-shared-tags/components/shared-tag-edit/shared-tag-edit.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23

34
import { SharedTagEditComponent } from './shared-tag-edit.component';
45

@@ -8,7 +9,8 @@ describe('EmailRecipientTagEditComponent', () => {
89

910
beforeEach(waitForAsync(() => {
1011
TestBed.configureTestingModule({
11-
declarations: [ SharedTagEditComponent ]
12+
declarations: [ SharedTagEditComponent ],
13+
schemas: [NO_ERRORS_SCHEMA]
1214
})
1315
.compileComponents();
1416
}));

eform-client/src/app/common/modules/eform-shared/components/eform-collapse-toggler/eform-collapse-toggle.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23

34
import { EformCollapseToggleComponent } from './eform-collapse-toggle.component';
45

@@ -8,7 +9,8 @@ describe('EformCollapseTogglerComponent', () => {
89

910
beforeEach(waitForAsync(() => {
1011
TestBed.configureTestingModule({
11-
declarations: [ EformCollapseToggleComponent ]
12+
declarations: [ EformCollapseToggleComponent ],
13+
schemas: [NO_ERRORS_SCHEMA]
1214
})
1315
.compileComponents();
1416
}));

eform-client/src/app/common/modules/eform-shared/components/eform-table/eform-table-headers/eform-table-headers.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23

34
import { EformTableHeadersComponent } from './eform-table-headers.component';
45

@@ -8,7 +9,8 @@ describe('EformTableHeadersComponent', () => {
89

910
beforeEach(async () => {
1011
await TestBed.configureTestingModule({
11-
declarations: [ EformTableHeadersComponent ]
12+
declarations: [ EformTableHeadersComponent ],
13+
schemas: [NO_ERRORS_SCHEMA]
1214
})
1315
.compileComponents();
1416
});

eform-client/src/app/common/modules/eform-shared/components/eform-tree-view-picker/eform-tree-view-picker.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23

34
import { EformTreeViewPickerComponent } from './eform-tree-view-picker.component';
45

@@ -8,7 +9,8 @@ describe('EformTreeViewPickerComponent', () => {
89

910
beforeEach(waitForAsync(() => {
1011
TestBed.configureTestingModule({
11-
declarations: [ EformTreeViewPickerComponent ]
12+
declarations: [ EformTreeViewPickerComponent ],
13+
schemas: [NO_ERRORS_SCHEMA]
1214
})
1315
.compileComponents();
1416
}));

eform-client/src/app/modules/advanced/components/folders/folder-delete/folder-delete.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23
import { FolderDeleteComponent } from './folder-delete.component';
34
import { FoldersService } from 'src/app/common/services';
45
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
@@ -23,7 +24,8 @@ describe('FolderDeleteComponent', () => {
2324
{ provide: FoldersService, useValue: mockFoldersService },
2425
{ provide: MatDialogRef, useValue: mockDialogRef },
2526
{ provide: MAT_DIALOG_DATA, useValue: mockDialogData }
26-
]
27+
],
28+
schemas: [NO_ERRORS_SCHEMA]
2729
}).compileComponents();
2830
}));
2931

eform-client/src/app/modules/advanced/components/folders/folders/folders.component.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23
import { FoldersComponent } from './folders.component';
34
import { FoldersService } from 'src/app/common/services';
45
import { MatDialog } from '@angular/material/dialog';
@@ -26,8 +27,9 @@ describe('FoldersComponent', () => {
2627
{ provide: FoldersService, useValue: mockFoldersService },
2728
{ provide: MatDialog, useValue: mockDialog },
2829
{ provide: Store, useValue: mockStore },
29-
{ provide: Overlay, useValue: {} }
30-
]
30+
{ provide: Overlay, useValue: { scrollStrategies: { reposition: () => ({}) } } }
31+
],
32+
schemas: [NO_ERRORS_SCHEMA]
3133
}).compileComponents();
3234
}));
3335

eform-client/src/app/modules/advanced/components/units/unit-create/unit-create.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23
import { UnitCreateComponent } from './unit-create.component';
34
import { UnitsService } from 'src/app/common/services';
45
import { DeviceUserService } from 'src/app/common/services/device-users';
@@ -24,7 +25,8 @@ describe('UnitCreateComponent', () => {
2425
{ provide: UnitsService, useValue: mockUnitsService },
2526
{ provide: DeviceUserService, useValue: mockDeviceUserService },
2627
{ provide: MatDialogRef, useValue: mockDialogRef }
27-
]
28+
],
29+
schemas: [NO_ERRORS_SCHEMA]
2830
}).compileComponents();
2931
}));
3032

eform-client/src/app/modules/advanced/components/units/units-otp-code/units-otp-code.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NO_ERRORS_SCHEMA } from '@angular/core';
23
import { UnitsOtpCodeComponent } from './units-otp-code.component';
34
import { UnitsService } from 'src/app/common/services';
45
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
@@ -23,7 +24,8 @@ describe('UnitsOtpCodeComponent', () => {
2324
{ provide: UnitsService, useValue: mockUnitsService },
2425
{ provide: MatDialogRef, useValue: mockDialogRef },
2526
{ provide: MAT_DIALOG_DATA, useValue: mockDialogData }
26-
]
27+
],
28+
schemas: [NO_ERRORS_SCHEMA]
2729
}).compileComponents();
2830
}));
2931

0 commit comments

Comments
 (0)