fix(reports): Fixed issues with tests making reporting forms not working.

This commit is contained in:
Erik Tiekstra
2021-11-15 12:31:50 +01:00
parent a7c2d32a1d
commit e203f19b24
12 changed files with 36 additions and 14 deletions

View File

@@ -1,9 +1,8 @@
import { DigiNgFormInputModule } from '@af/digi-ng/_form/form-input';
import { DigiNgFormTextareaModule } from '@af/digi-ng/_form/form-textarea';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { UiTextareaModule } from '@ui/textarea/textarea.module';
import { EmployeeInviteComponent } from './employee-invite.component';
describe('EmployeeInviteComponent', () => {
@@ -14,7 +13,7 @@ describe('EmployeeInviteComponent', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [EmployeeInviteComponent],
imports: [ReactiveFormsModule, DigiNgFormInputModule, DigiNgFormTextareaModule, HttpClientTestingModule],
imports: [ReactiveFormsModule, UiTextareaModule, HttpClientTestingModule],
}).compileComponents();
});

View File

@@ -1,6 +1,8 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { UiRadiobuttonGroupModule } from '@ui/radiobutton-group/radiobutton-group.module';
import { UiTextareaModule } from '@ui/textarea/textarea.module';
import { SlutredovisningFormService } from '../../slutredovisning-form.service';
import { SlutredovisningFormStep0EducationComponent } from './slutredovisning-form-step0-education.component';
@@ -12,7 +14,7 @@ describe('SlutredovisningFormStep0EducationComponent', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [SlutredovisningFormStep0EducationComponent],
imports: [ReactiveFormsModule],
imports: [ReactiveFormsModule, UiRadiobuttonGroupModule, UiTextareaModule],
providers: [SlutredovisningFormService],
}).compileComponents();
});

View File

@@ -1,6 +1,7 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { UiTextareaModule } from '@ui/textarea/textarea.module';
import { SlutredovisningFormService } from '../../slutredovisning-form.service';
import { SlutredovisningFormStep0OtherComponent } from './slutredovisning-form-step0-other.component';
@@ -12,7 +13,7 @@ describe('SlutredovisningFormStep0OtherComponent', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [SlutredovisningFormStep0OtherComponent],
imports: [ReactiveFormsModule],
imports: [ReactiveFormsModule, UiTextareaModule],
providers: [SlutredovisningFormService],
}).compileComponents();
});

View File

@@ -1,6 +1,8 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { UiCheckboxModule } from '@ui/checkbox/checkbox.module';
import { UiTextareaModule } from '@ui/textarea/textarea.module';
import { SlutredovisningFormService } from '../../slutredovisning-form.service';
import { SlutredovisningFormStep0StillUnemployedComponent } from './slutredovisning-form-step0-still-unemployed.component';
@@ -12,7 +14,7 @@ describe('SlutredovisningFormStep0StillUnemployedComponent', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [SlutredovisningFormStep0StillUnemployedComponent],
imports: [ReactiveFormsModule],
imports: [ReactiveFormsModule, UiTextareaModule, UiCheckboxModule],
providers: [SlutredovisningFormService],
}).compileComponents();
});

View File

@@ -2,6 +2,10 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { UiInputModule } from '@ui/input/input.module';
import { UiRadiobuttonGroupModule } from '@ui/radiobutton-group/radiobutton-group.module';
import { UiSelectModule } from '@ui/select/select.module';
import { UiTextareaModule } from '@ui/textarea/textarea.module';
import { SlutredovisningFormService } from '../../slutredovisning-form.service';
import { SlutredovisningFormStep0WorkComponent } from './slutredovisning-form-step0-work.component';
@@ -13,7 +17,14 @@ describe('SlutredovisningFormStep0WorkComponent', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [SlutredovisningFormStep0WorkComponent],
imports: [ReactiveFormsModule, HttpClientTestingModule],
imports: [
ReactiveFormsModule,
HttpClientTestingModule,
UiSelectModule,
UiTextareaModule,
UiRadiobuttonGroupModule,
UiInputModule,
],
providers: [SlutredovisningFormService],
}).compileComponents();
});

View File

@@ -2,6 +2,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { UiRadiobuttonGroupModule } from '@ui/radiobutton-group/radiobutton-group.module';
import { SlutredovisningFormService } from '../slutredovisning-form.service';
import { SlutredovisningFormStep0Component } from './slutredovisning-form-step0.component';
@@ -13,7 +14,7 @@ describe('SlutredovisningFormStep0Component', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [SlutredovisningFormStep0Component],
imports: [ReactiveFormsModule, HttpClientTestingModule],
imports: [ReactiveFormsModule, HttpClientTestingModule, UiRadiobuttonGroupModule],
providers: [SlutredovisningFormService],
}).compileComponents();
});

View File

@@ -1,6 +1,7 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { UiTextareaModule } from '@ui/textarea/textarea.module';
import { SlutredovisningFormService } from '../slutredovisning-form.service';
import { SlutredovisningFormStep2Component } from './slutredovisning-form-step2.component';
@@ -12,7 +13,7 @@ describe('SlutredovisningFormStep2Component', () => {
await TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [SlutredovisningFormStep2Component],
imports: [ReactiveFormsModule],
imports: [ReactiveFormsModule, UiTextareaModule],
providers: [SlutredovisningFormService],
}).compileComponents();
});

View File

@@ -1,10 +1,11 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { CheckboxComponent } from './checkbox.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [CommonModule],
imports: [CommonModule, ReactiveFormsModule],
declarations: [CheckboxComponent],
exports: [CheckboxComponent],
})

View File

@@ -1,10 +1,11 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { InputComponent } from './input.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [CommonModule],
imports: [CommonModule, ReactiveFormsModule],
declarations: [InputComponent],
exports: [InputComponent],
})

View File

@@ -1,10 +1,11 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { RadiobuttonGroupComponent } from './radiobutton-group.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [CommonModule],
imports: [CommonModule, ReactiveFormsModule],
declarations: [RadiobuttonGroupComponent],
exports: [RadiobuttonGroupComponent],
})

View File

@@ -1,10 +1,11 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { SelectComponent } from './select.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [CommonModule],
imports: [CommonModule, ReactiveFormsModule],
declarations: [SelectComponent],
exports: [SelectComponent],
})

View File

@@ -1,10 +1,11 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { TextareaComponent } from './textarea.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [CommonModule],
imports: [CommonModule, ReactiveFormsModule],
declarations: [TextareaComponent],
exports: [TextareaComponent],
})