/* * Copyright (c) 2016-2026 Broadcom. All Rights Reserved. * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * This software is released under MIT license. * The full license information can be found in LICENSE in the root directory of this project. */ import { Component } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; import { ClrFileInput } from './file-input'; import { ClrFileInputContainer } from './file-input-container'; import { ControlStandaloneSpec, ReactiveSpec, TemplateDrivenSpec } from '../tests/control.spec'; @Component({ template: ``, standalone: false, }) class StandaloneUseTest {} @Component({ template: `
`, standalone: false, }) class ReactiveTest { form = new FormGroup({ model: new FormControl(undefined, Validators.required), }); } @Component({ template: ` `, standalone: false, }) class TemplateDrivenTest { model: FileList; } describe('ClrFileInput', () => { ControlStandaloneSpec(StandaloneUseTest); ReactiveSpec(ClrFileInputContainer, ClrFileInput, ReactiveTest, 'clr-file-input'); TemplateDrivenSpec(ClrFileInputContainer, ClrFileInput, TemplateDrivenTest, 'clr-file-input'); });