/** * Utility functions for creating a Formly component for testing, based on: * https://github.com/ngx-formly/ngx-formly/tree/main/src/core/testing/src * * This and other useful testing tools will be included in Formly v6, so * this file can be deleted once v6 is released in the 2nd half of 2020: * https://github.com/ngx-formly/ngx-formly/milestone/6 */ import { ComponentFixture } from '@angular/core/testing'; import { DebugElement, NgModule } from '@angular/core'; import { FormlyFieldConfig, ConfigOption } from '@ngx-formly/core'; import * as i0 from "@angular/core"; export interface IFormlyDebugElement extends DebugElement { readonly nativeElement: E; } export interface IComponentOptions extends NgModule { template?: string; inputs?: T; config?: ConfigOption; detectChanges?: boolean; } export declare function createComponent({ template, inputs, config, detectChanges, imports, declarations, providers, }: IComponentOptions): T & { fixture: ComponentFixture; detectChanges: (checkNoChanges?: boolean) => void; setInputs: (inputs: Partial) => void; query: (selector: string) => IFormlyDebugElement; queryAll: (selector: string) => IFormlyDebugElement[]; }; export declare function createFormlyFieldComponent(field: FormlyFieldConfig, config?: IComponentOptions<{ field: FormlyFieldConfig; }>): { field: FormlyFieldConfig; } & { fixture: ComponentFixture<{ field: FormlyFieldConfig; }>; detectChanges: (checkNoChanges?: boolean) => void; setInputs: (inputs: Partial<{ field: FormlyFieldConfig; }>) => void; query: (selector: string) => IFormlyDebugElement; queryAll: (selector: string) => IFormlyDebugElement[]; }; export declare class FormlyTestComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=component-factory.d.ts.map