fix failing tests

This commit is contained in:
Daniel Appelgren
2021-11-24 14:25:26 +01:00
parent 5488145e0c
commit 6687edbfd1
5 changed files with 11 additions and 23 deletions

View File

@@ -12,6 +12,7 @@
></msfa-error-list>
<ui-input
[uiId]="emailElementId"
uiName="email"
uiLabel="E-post adress"
uiType="email"
[formControl]="emailFormControl"
@@ -30,6 +31,7 @@
<!-- Vi får se till att bygga en kontrol för att kunna välja flera tjänster här istället, en ui-selectfår vara en temporär lösning.. -->
<ui-select
[formControl]="tjansterFormControl"
uiName="tjanster"
[uiId]="tjansterElementId"
uiLabel="Välj tjänster"
uiPlaceholder="Välj tjänst"

View File

@@ -1,15 +1,9 @@
import { DigiNgFormCheckboxModule } from '@af/digi-ng/_form/form-checkbox';
import { DigiNgFormDatepickerModule } from '@af/digi-ng/_form/form-datepicker';
import { DigiNgFormInputModule } from '@af/digi-ng/_form/form-input';
import { DigiNgFormRadiobuttonGroupModule } from '@af/digi-ng/_form/form-radiobutton-group';
import { DigiNgPopoverModule } from '@af/digi-ng/_popover/popover';
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 { RouterTestingModule } from '@angular/router/testing';
import { TreeNodesSelectorModule } from '@msfa-shared/components/tree-nodes-selector/tree-nodes-selector.module';
import { EditEmployeeFormComponent } from './edit-employee-form.component';
import { EmployeeFormModule } from '../employee-form.module';
describe('EditEmployeeFormComponent', () => {
let component: EditEmployeeFormComponent;
@@ -18,17 +12,7 @@ describe('EditEmployeeFormComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [EditEmployeeFormComponent],
imports: [
ReactiveFormsModule,
DigiNgFormInputModule,
DigiNgFormRadiobuttonGroupModule,
DigiNgFormDatepickerModule,
DigiNgPopoverModule,
DigiNgFormCheckboxModule,
HttpClientTestingModule,
TreeNodesSelectorModule,
RouterTestingModule,
],
imports: [HttpClientTestingModule, RouterTestingModule, EmployeeFormModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
});

View File

@@ -51,7 +51,7 @@ export class SlutredovisningFormStep3Component implements OnInit {
ngOnInit(): void {
this.slutredovisning$ =
this.slutredovisningFormData.mainOccupation.type === MainOccupation.Work
this.slutredovisningFormData?.mainOccupation?.type === MainOccupation.Work
? this.slutredovisningFormService.yrkeToTextMap$.pipe(
map(yrkeToText => this._formDataWithWorkToSlutredovisning(this.slutredovisningFormData, yrkeToText))
)

View File

@@ -1,8 +1,9 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import { HandledarePickerFormComponent } from './handledare-picker-form.component';
import { HandledarePickerFormModule } from '@msfa-shared/components/handledare-picker-form/handledare-picker-form.module';
describe('HandledarePickerFormComponent', () => {
let component: HandledarePickerFormComponent;
@@ -10,7 +11,7 @@ describe('HandledarePickerFormComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ReactiveFormsModule, HttpClientTestingModule, FormsModule],
imports: [ReactiveFormsModule, HttpClientTestingModule, HandledarePickerFormModule],
declarations: [HandledarePickerFormComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();

View File

@@ -1,7 +1,8 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import { OrganizationPickerFormComponent } from './organization-picker-form.component';
import { OrganizationPickerFormModule } from '@msfa-shared/components/organization-picker-form/organization-picker-form.module';
describe('OrganizationPickerFormComponent', () => {
let component: OrganizationPickerFormComponent;
@@ -9,7 +10,7 @@ describe('OrganizationPickerFormComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ReactiveFormsModule, FormsModule],
imports: [ReactiveFormsModule, OrganizationPickerFormModule],
declarations: [OrganizationPickerFormComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();