mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2010] Move/copy, when searching for folder multiple results are returned (#2727)
* adding debounce time in object picker unify search api fix multiples duplicate result remove limit of 4 character to search * remove three.min.js * remove unused import * tlsint fix and remove file * rename sitesApiService to sitesService as all the other services * fix test timeout async
This commit is contained in:
@@ -19,7 +19,7 @@ import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MaterialModule } from '../../material.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AuthenticationService, SearchApiService } from '@alfresco/adf-core';
|
||||
import { AuthenticationService, SearchService } from '@alfresco/adf-core';
|
||||
import { ThumbnailService } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { noResult, results } from '../../mock';
|
||||
@@ -33,7 +33,7 @@ describe('SearchControlComponent', () => {
|
||||
let component: SearchControlComponent;
|
||||
let element: HTMLElement;
|
||||
let debugElement: DebugElement;
|
||||
let searchService: SearchApiService;
|
||||
let searchService: SearchService;
|
||||
let authService: AuthenticationService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -48,12 +48,12 @@ describe('SearchControlComponent', () => {
|
||||
],
|
||||
providers: [
|
||||
ThumbnailService,
|
||||
SearchApiService
|
||||
SearchService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
fixture = TestBed.createComponent(SearchControlComponent);
|
||||
debugElement = fixture.debugElement;
|
||||
searchService = TestBed.get(SearchApiService);
|
||||
searchService = TestBed.get(SearchService);
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SearchApiService } from '@alfresco/adf-core';
|
||||
import { SearchService } from '@alfresco/adf-core';
|
||||
import { QueryBody } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { SearchModule } from '../../index';
|
||||
@@ -37,7 +37,7 @@ describe('SearchComponent', () => {
|
||||
|
||||
let fixture: ComponentFixture<SimpleSearchTestComponent>, element: HTMLElement;
|
||||
let component: SimpleSearchTestComponent;
|
||||
let searchService: SearchApiService;
|
||||
let searchService: SearchService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -49,7 +49,7 @@ describe('SearchComponent', () => {
|
||||
fixture = TestBed.createComponent(SimpleSearchTestComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
searchService = TestBed.get(SearchApiService);
|
||||
searchService = TestBed.get(SearchService);
|
||||
});
|
||||
}));
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { SearchApiService } from '@alfresco/adf-core';
|
||||
import { SearchService } from '@alfresco/adf-core';
|
||||
import {
|
||||
AfterContentInit,
|
||||
ChangeDetectionStrategy,
|
||||
@@ -101,7 +101,7 @@ export class SearchComponent implements AfterContentInit, OnChanges {
|
||||
_classList: { [key: string]: boolean } = {};
|
||||
|
||||
constructor(
|
||||
private searchService: SearchApiService,
|
||||
private searchService: SearchService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private _elementRef: ElementRef) {
|
||||
this.keyPressedStream.asObservable()
|
||||
@@ -148,7 +148,6 @@ export class SearchComponent implements AfterContentInit, OnChanges {
|
||||
let searchOpts: QueryBody = this.getSearchNode(searchTerm);
|
||||
|
||||
if (this.hasValidSearchQuery(searchOpts)) {
|
||||
searchTerm = searchTerm + '*';
|
||||
this.searchService
|
||||
.search(searchOpts)
|
||||
.subscribe(
|
||||
|
Reference in New Issue
Block a user