mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
parent
5c2145dcf8
commit
8058b583dc
@ -351,7 +351,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set un-active the search after file/folder is clicked', () => {
|
it('should set deactivate the search after file/folder is clicked', () => {
|
||||||
component.searchActive = true;
|
component.searchActive = true;
|
||||||
component.onFileClicked({
|
component.onFileClicked({
|
||||||
value: 'node12345'
|
value: 'node12345'
|
||||||
@ -360,13 +360,13 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
expect(component.searchActive).toBe(false);
|
expect(component.searchActive).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reset the search term after file/folder is clicked', () => {
|
it('should NOT reset the search term after file/folder is clicked', () => {
|
||||||
component.liveSearchTerm = 'test';
|
component.liveSearchTerm = 'test';
|
||||||
component.onFileClicked({
|
component.onFileClicked({
|
||||||
value: 'node12345'
|
value: 'node12345'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(component.liveSearchTerm).toBe('');
|
expect(component.liveSearchTerm).toBe('test');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -170,8 +170,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFileClicked(event): void {
|
onFileClicked(event): void {
|
||||||
this.liveSearchTerm = '';
|
this.setAutoCompleteDisplayed(false);
|
||||||
this.searchActive = false;
|
|
||||||
this.fileSelect.emit(event);
|
this.fileSelect.emit(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user