From c517ed0dfabd9f973d8ca89c6223eeba621eba8f Mon Sep 17 00:00:00 2001 From: Yury Bondarenko Date: Wed, 14 Sep 2022 10:30:34 +0200 Subject: [PATCH] 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 --- cypress/.gitignore | 1 + src/app/core/data/base/search-data.spec.ts | 2 +- src/app/core/data/base/search-data.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cypress/.gitignore b/cypress/.gitignore index 99bd2a6312..645beff45f 100644 --- a/cypress/.gitignore +++ b/cypress/.gitignore @@ -1,2 +1,3 @@ screenshots/ videos/ +downloads/ diff --git a/src/app/core/data/base/search-data.spec.ts b/src/app/core/data/base/search-data.spec.ts index d314960e97..31dddeddfc 100644 --- a/src/app/core/data/base/search-data.spec.ts +++ b/src/app/core/data/base/search-data.spec.ts @@ -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'); }); }); diff --git a/src/app/core/data/base/search-data.ts b/src/app/core/data/base/search-data.ts index 751bff5c3a..536d6d6e25 100644 --- a/src/app/core/data/base/search-data.ts +++ b/src/app/core/data/base/search-data.ts @@ -99,7 +99,7 @@ export class SearchDataImpl extends BaseDataService[]): Observable>> { const hrefObs = this.getSearchByHref(searchMethod, options, ...linksToFollow); - return this.findListByHref(hrefObs, undefined, useCachedVersionIfAvailable, reRequestOnStale); + return this.findListByHref(hrefObs, undefined, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow); } /**