mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
fix tests
This commit is contained in:
parent
22071a7ff9
commit
dc1a6ae4e6
@ -19,10 +19,8 @@ import { CoreModule } from 'ng2-alfresco-core';
|
|||||||
import { ActivitiFormModule } from './../../../index';
|
import { ActivitiFormModule } from './../../../index';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { FormFieldComponent } from './form-field.component';
|
import { FormFieldComponent } from './form-field.component';
|
||||||
// import { WidgetVisibilityService } from './../../services/widget-visibility.service';
|
|
||||||
import { FormRenderingService } from './../../services/form-rendering.service';
|
import { FormRenderingService } from './../../services/form-rendering.service';
|
||||||
// import { WidgetComponent } from './../widgets/widget.component';
|
import { FormModel, FormFieldModel, FormFieldTypes } from './../widgets/core/index';
|
||||||
import { FormFieldModel, FormFieldTypes } from './../widgets/core/index';
|
|
||||||
import { TextWidget, CheckboxWidget } from './../widgets/index';
|
import { TextWidget, CheckboxWidget } from './../widgets/index';
|
||||||
|
|
||||||
describe('FormFieldComponent', () => {
|
describe('FormFieldComponent', () => {
|
||||||
@ -30,9 +28,9 @@ describe('FormFieldComponent', () => {
|
|||||||
let fixture: ComponentFixture<FormFieldComponent>;
|
let fixture: ComponentFixture<FormFieldComponent>;
|
||||||
let component: FormFieldComponent;
|
let component: FormFieldComponent;
|
||||||
let componentHandler: any;
|
let componentHandler: any;
|
||||||
|
let form: FormModel;
|
||||||
|
|
||||||
let formRenderingService: FormRenderingService;
|
let formRenderingService: FormRenderingService;
|
||||||
// let visibilityService: WidgetVisibilityService;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
@ -51,10 +49,11 @@ describe('FormFieldComponent', () => {
|
|||||||
fixture = TestBed.createComponent(FormFieldComponent);
|
fixture = TestBed.createComponent(FormFieldComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
formRenderingService = fixture.debugElement.injector.get(FormRenderingService);
|
formRenderingService = fixture.debugElement.injector.get(FormRenderingService);
|
||||||
|
form = new FormModel();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create default component instance', () => {
|
it('should create default component instance', () => {
|
||||||
let field = new FormFieldModel(null, {
|
let field = new FormFieldModel(form, {
|
||||||
type: FormFieldTypes.TEXT
|
type: FormFieldTypes.TEXT
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,7 +65,7 @@ describe('FormFieldComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should create custom component instance', () => {
|
it('should create custom component instance', () => {
|
||||||
let field = new FormFieldModel(null, {
|
let field = new FormFieldModel(form, {
|
||||||
type: FormFieldTypes.TEXT
|
type: FormFieldTypes.TEXT
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -86,7 +85,7 @@ describe('FormFieldComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should require component type to be resolved', () => {
|
it('should require component type to be resolved', () => {
|
||||||
let field = new FormFieldModel(null, {
|
let field = new FormFieldModel(form, {
|
||||||
type: FormFieldTypes.TEXT
|
type: FormFieldTypes.TEXT
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user