mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-5392] - Make search text input more configurable & add an event … (#7188)
* [AAE-5392] - Make search text input more configurable & add an event emitter to indicate the states of it * Remove fdescribe * Emit empty search term when the search gets cleared * Emit the empty search term when the search gets collapsed by the Search icon * Same onBlur, emit the empty search term * Add unit tests for emitters resetting the search term * Fix comments, use reset event emitter instead of emitting an empty search term * Update documentation * Revert reset to boolean * Fix flaky unit test
This commit is contained in:
@@ -321,17 +321,17 @@ describe('SearchControlComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should NOT display a autocomplete list control when configured not to', (done) => {
|
||||
it('should NOT display a autocomplete list control when configured not to', async () => {
|
||||
searchServiceSpy.and.returnValue(of(JSON.parse(JSON.stringify(results))));
|
||||
component.liveSearchEnabled = false;
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
typeWordIntoSearchInput('TEST');
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(element.querySelector('#autocomplete-search-result-list')).toBeNull();
|
||||
done();
|
||||
});
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(element.querySelector('#autocomplete-search-result-list')).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user