93803: Fix broken SearchDataImpl

I'd originally removed this `...linksToFollow` but it's actually required here because it's used when constructing the RemoteData

Added cypress/downloads to .gitignore because I'd accidentally committed a downloads.html file after running e2e tests locally
This commit is contained in:
Yury Bondarenko
2022-09-14 10:30:34 +02:00
parent 919b406260
commit c517ed0dfa
3 changed files with 3 additions and 2 deletions

1
cypress/.gitignore vendored
View File

@@ -1,2 +1,3 @@
screenshots/
videos/
downloads/

View File

@@ -134,7 +134,7 @@ describe('SearchDataImpl', () => {
const out: any = service.searchBy('testMethod', options, false, true, ...linksToFollow);
expect(service.getSearchByHref).toHaveBeenCalledWith('testMethod', options, ...linksToFollow);
expect(service.findListByHref).toHaveBeenCalledWith('endpoint', undefined, false, true);
expect(service.findListByHref).toHaveBeenCalledWith('endpoint', undefined, false, true, ...linksToFollow);
expect(out).toBe('resulting remote data');
});
});

View File

@@ -99,7 +99,7 @@ export class SearchDataImpl<T extends CacheableObject> extends BaseDataService<T
searchBy(searchMethod: string, options: FindListOptions = {}, useCachedVersionIfAvailable = true, reRequestOnStale = true, ...linksToFollow: FollowLinkConfig<T>[]): Observable<RemoteData<PaginatedList<T>>> {
const hrefObs = this.getSearchByHref(searchMethod, options, ...linksToFollow);
return this.findListByHref(hrefObs, undefined, useCachedVersionIfAvailable, reRequestOnStale);
return this.findListByHref(hrefObs, undefined, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
}
/**