Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Jan 7, 2025
1 parent 9fb2502 commit 87a5e69
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions libs/design/src/atoms/form/input/input.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ import { By } from '@angular/platform-browser';
import { DaffInputComponent } from './input.component';

@Component({
template: `<input daff-input [formSubmitted]="formSubmittedValue">`,
template: `<input daff-input>`,
})
class WrapperComponent {
formSubmittedValue: boolean;
}
class WrapperComponent {}

describe('@daffodil/design | DaffInputComponent', () => {
let wrapper: WrapperComponent;
let fixture: ComponentFixture<WrapperComponent>;
let stubFormControl;
let stubFormSubmitted: boolean;
let component: DaffInputComponent;
let componentDE: DebugElement;

Expand All @@ -39,11 +36,9 @@ describe('@daffodil/design | DaffInputComponent', () => {

beforeEach(() => {
stubFormControl = new UntypedFormControl();
stubFormSubmitted = false;

fixture = TestBed.createComponent(WrapperComponent);
wrapper = fixture.componentInstance;
wrapper.formSubmittedValue = stubFormSubmitted;
fixture.detectChanges();

componentDE = fixture.debugElement.query(By.css('[daff-input]'));
Expand All @@ -54,10 +49,6 @@ describe('@daffodil/design | DaffInputComponent', () => {
expect(wrapper).toBeTruthy();
});

it('should be able to take formSubmitted as input', () => {
expect(component.formSubmitted).toEqual(stubFormSubmitted);
});

describe('onFocus', () => {
it('should call focus on the native element', () => {
spyOn(componentDE.nativeElement, 'focus');
Expand Down

0 comments on commit 87a5e69

Please sign in to comment.