Skip to content

Commit

Permalink
Dropdown unit test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Mar 24, 2021
1 parent c40b434 commit 2592a53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/components/autocomplete/autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ describe('AutoComplete', () => {
const firstItemEl = fixture.debugElement.query(By.css('li')).nativeElement;
firstItemEl.click();
fixture.detectChanges();

expect(autocomplete.value).toEqual("Volvo");
expect(selectItemSpy).toHaveBeenCalled();
expect(inputEl.nativeElement.value).toEqual(autocomplete.value);
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/dropdown/dropdown.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe('Dropdown', () => {
filterInputEl.nativeElement.value = "n";
filterInputEl.nativeElement.dispatchEvent(new Event('keydown'));
const event = {'target':{'value':'n'}};
dropdown.onFilter(event)
dropdown.onFilterInputChange(event)
fixture.detectChanges();

items=fixture.debugElement.query(By.css('.p-dropdown-items'));
Expand Down Expand Up @@ -282,7 +282,7 @@ describe('Dropdown', () => {
filterInputEl.nativeElement.value = "primeng";
filterInputEl.nativeElement.dispatchEvent(new Event('keydown'));
const event = {'target':{'value':'primeng'}};
dropdown.onFilter(event)
dropdown.onFilterInputChange(event)
fixture.detectChanges();

const items = fixture.debugElement.query(By.css('.p-dropdown-items'));
Expand Down

0 comments on commit 2592a53

Please sign in to comment.