Skip to content

Commit

Permalink
Use spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
molily committed Jan 25, 2021
1 parent f12bd31 commit 0897e54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/components/search-form/search-form.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { findEl } from '../../spec-helpers/element.spec-helper';
import { findEl, setFieldValue } from '../../spec-helpers/element.spec-helper';
import { SearchFormComponent } from './search-form.component';

const searchTerm = 'flowers';
Expand All @@ -26,8 +26,7 @@ describe('SearchFormComponent', () => {
actualSearchTerm = otherSearchTerm;
});

const searchTermInput = findEl(fixture, 'searchTermInput');
searchTermInput.nativeElement.value = searchTerm;
setFieldValue(fixture, 'searchTermInput', searchTerm);

findEl(fixture, 'form').triggerEventHandler('ngSubmit', {});

Expand Down

0 comments on commit 0897e54

Please sign in to comment.