Skip to content

Commit f55b5f0

Browse files
BoykoAlexonobc
authored andcommitted
Put back commented failing test to fix later
Signed-off-by: aboyko <[email protected]>
1 parent 02578a0 commit f55b5f0

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

ui/src/app/shared/component/search/search.component.spec.ts

+43
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,47 @@ describe('shared/component/search/search.component.ts', () => {
194194
}, 220);
195195
}, 320);
196196
});
197+
198+
//TODO: Below tests are failing - please fix them
199+
200+
// describe('should use key shortcut', () => {
201+
// beforeEach(done => {
202+
// fixture.detectChanges();
203+
// component.search.setValue('foo');
204+
// component.inputQuickSearch.nativeElement.focus();
205+
// setTimeout(() => {
206+
// fixture.detectChanges();
207+
// done();
208+
// }, 320);
209+
// });
210+
//
211+
// it('Escape', done => {
212+
// const event = new KeyboardEvent('keyDown', { keyCode: 27 });
213+
// component.onKeyDown(event);
214+
// fixture.detectChanges();
215+
// setTimeout(() => {
216+
// fixture.detectChanges();
217+
// expect(component.searching.apps).toBeFalsy();
218+
// expect(component.searching.streams).toBeFalsy();
219+
// expect(component.searching.tasks).toBeFalsy();
220+
// expect(component.results.apps).toBeNull();
221+
// expect(component.results.tasks).toBeNull();
222+
// expect(component.results.streams).toBeNull();
223+
// expect(component.search.value).toBe('');
224+
// done();
225+
// }, 220);
226+
// });
227+
//
228+
// it('Down/Up/Enter', done => {
229+
// const navigate = spyOn((<any>component).router, 'navigateByUrl');
230+
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 40 }));
231+
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 38 }));
232+
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 39 }));
233+
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 37 }));
234+
// component.onKeyDown(new KeyboardEvent('keyDown', { keyCode: 13 }));
235+
// fixture.detectChanges();
236+
// expect(navigate.calls.mostRecent().args[0].toString()).toBe('/apps/processor/aggregator');
237+
// done();
238+
// });
239+
// });
197240
});

0 commit comments

Comments
 (0)