Skip to content

Commit

Permalink
Put back commented failing test to fix later
Browse files Browse the repository at this point in the history
Signed-off-by: aboyko <[email protected]>
  • Loading branch information
BoykoAlex authored and onobc committed Feb 6, 2025
1 parent 02578a0 commit f55b5f0
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions ui/src/app/shared/component/search/search.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,47 @@ describe('shared/component/search/search.component.ts', () => {
}, 220);
}, 320);
});

//TODO: Below tests are failing - please fix them

// describe('should use key shortcut', () => {
// beforeEach(done => {
// fixture.detectChanges();
// component.search.setValue('foo');
// component.inputQuickSearch.nativeElement.focus();
// setTimeout(() => {
// fixture.detectChanges();
// done();
// }, 320);
// });
//
// it('Escape', done => {
// const event = new KeyboardEvent('keyDown', { keyCode: 27 });
// component.onKeyDown(event);
// fixture.detectChanges();
// setTimeout(() => {
// fixture.detectChanges();
// expect(component.searching.apps).toBeFalsy();
// expect(component.searching.streams).toBeFalsy();
// expect(component.searching.tasks).toBeFalsy();
// expect(component.results.apps).toBeNull();
// expect(component.results.tasks).toBeNull();
// expect(component.results.streams).toBeNull();
// expect(component.search.value).toBe('');
// done();
// }, 220);
// });
//
// it('Down/Up/Enter', done => {
// const navigate = spyOn((<any>component).router, 'navigateByUrl');
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 40 }));
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 38 }));
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 39 }));
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 37 }));
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 13 }));
// fixture.detectChanges();
// expect(navigate.calls.mostRecent().args[0].toString()).toBe('/apps/processor/aggregator');
// done();
// });
// });
});

0 comments on commit f55b5f0

Please sign in to comment.