Skip to content

Commit

Permalink
[ACS-8898] Empty context menu on multi-selected libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland committed Nov 27, 2024
1 parent 48e9d56 commit cf37315
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
* limitations under the License.
*/

import { Subject, Observable, from, ReplaySubject, BehaviorSubject } from 'rxjs';
import { BehaviorSubject, from, Observable, ReplaySubject, Subject } from 'rxjs';
import { AppConfigService } from '@alfresco/adf-core';
import {
SearchRequest,
RequestFacetFields,
RequestSortDefinitionInner,
ResultSetPaging,
RequestHighlight,
RequestScope,
RequestSortDefinitionInner,
ResultSetPaging,
SEARCH_LANGUAGE,
SearchApi,
SEARCH_LANGUAGE
SearchRequest
} from '@alfresco/js-api';
import { SearchCategory } from '../models/search-category.interface';
import { FilterQuery } from '../models/filter-query.interface';
Expand Down Expand Up @@ -596,6 +596,7 @@ export abstract class BaseQueryBuilderService {
* @param searchUrl search url to navigate to
*/
async navigateToSearch(query: string, searchUrl: string) {
this.update();
this.userQuery = query;
await this.execute();
await this.router.navigate([searchUrl], {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,11 @@ describe('SearchQueryBuilder', () => {
it('should encode query from filter raw params and update query params on navigating to search', async () => {
spyOn(router, 'navigate');
const builder = createQueryBuilder();
spyOn(builder, 'update');
await builder.navigateToSearch('test query', '/search');

expect(builder.filterRawParams).toEqual({ userQuery: '(test query)' });
expect(builder.update).toHaveBeenCalled();
expect(router.navigate).toHaveBeenCalledWith([], {
relativeTo: activatedRoute,
queryParams: { q: 'eyJ1c2VyUXVlcnkiOiIodGVzdCBxdWVyeSkifQ==' },
Expand Down

0 comments on commit cf37315

Please sign in to comment.