@internetarchive/collection-browser 3.1.1-alpha-webdev6778.11 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/src/collection-browser.d.ts +4 -0
  2. package/dist/src/collection-browser.js +25 -3
  3. package/dist/src/collection-browser.js.map +1 -1
  4. package/dist/src/tiles/base-tile-component.d.ts +7 -0
  5. package/dist/src/tiles/base-tile-component.js +13 -0
  6. package/dist/src/tiles/base-tile-component.js.map +1 -1
  7. package/dist/src/tiles/grid/account-tile.js +1 -0
  8. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  9. package/dist/src/tiles/grid/collection-tile.js +1 -0
  10. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  11. package/dist/src/tiles/grid/item-tile.d.ts +1 -1
  12. package/dist/src/tiles/grid/item-tile.js +3 -4
  13. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  14. package/dist/src/tiles/list/tile-list-compact.js +4 -2
  15. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  16. package/dist/src/tiles/list/tile-list.js +3 -3
  17. package/dist/src/tiles/list/tile-list.js.map +1 -1
  18. package/dist/src/tiles/tile-dispatcher.js +4 -0
  19. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  20. package/dist/src/utils/format-date.d.ts +15 -1
  21. package/dist/src/utils/format-date.js +8 -3
  22. package/dist/src/utils/format-date.js.map +1 -1
  23. package/dist/test/collection-browser.test.js +217 -187
  24. package/dist/test/collection-browser.test.js.map +1 -1
  25. package/dist/test/tiles/grid/item-tile.test.js +51 -0
  26. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  27. package/dist/test/tiles/list/tile-list-compact.test.js +51 -0
  28. package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
  29. package/dist/test/tiles/list/tile-list.test.js +51 -0
  30. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  31. package/dist/test/utils/format-date.test.js +31 -1
  32. package/dist/test/utils/format-date.test.js.map +1 -1
  33. package/package.json +2 -2
  34. package/src/collection-browser.ts +29 -2
  35. package/src/tiles/base-tile-component.ts +12 -0
  36. package/src/tiles/grid/account-tile.ts +1 -0
  37. package/src/tiles/grid/collection-tile.ts +1 -0
  38. package/src/tiles/grid/item-tile.ts +6 -5
  39. package/src/tiles/list/tile-list-compact.ts +5 -2
  40. package/src/tiles/list/tile-list.ts +7 -3
  41. package/src/tiles/tile-dispatcher.ts +4 -0
  42. package/src/utils/format-date.ts +23 -3
  43. package/test/collection-browser.test.ts +2403 -2359
  44. package/test/tiles/grid/item-tile.test.ts +56 -0
  45. package/test/tiles/list/tile-list-compact.test.ts +54 -0
  46. package/test/tiles/list/tile-list.test.ts +55 -0
  47. package/test/utils/format-date.test.ts +51 -1
@@ -71,7 +71,7 @@ describe('Collection Browser', () => {
71
71
  });
72
72
  it('filterBy creator with analytics', async () => {
73
73
  const mockAnalyticsHandler = new MockAnalyticsHandler();
74
- const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
74
+ const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
75
75
  </collection-browser>`);
76
76
  el.searchContext = 'betaSearchService';
77
77
  el.selectedSort = 'creator';
@@ -90,7 +90,7 @@ describe('Collection Browser', () => {
90
90
  });
91
91
  it('filterBy title with analytics', async () => {
92
92
  const mockAnalyticsHandler = new MockAnalyticsHandler();
93
- const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
93
+ const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
94
94
  </collection-browser>`);
95
95
  el.searchContext = 'beta-search-service';
96
96
  el.selectedSort = 'title';
@@ -119,7 +119,7 @@ describe('Collection Browser', () => {
119
119
  collection: {},
120
120
  year: {},
121
121
  };
122
- const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
122
+ const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
123
123
  </collection-browser>`);
124
124
  el.searchContext = 'search-service';
125
125
  el.selectedFacets = mockedSelectedFacets;
@@ -166,7 +166,7 @@ describe('Collection Browser', () => {
166
166
  collection: {},
167
167
  year: {},
168
168
  };
169
- const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
169
+ const el = await fixture(html `<collection-browser .analyticsHandler=${mockAnalyticsHandler}>
170
170
  </collection-browser>`);
171
171
  el.searchContext = 'beta-search-service';
172
172
  el.selectedFacets = mockedSelectedFacets;
@@ -204,7 +204,7 @@ describe('Collection Browser', () => {
204
204
  it('should render with a sort bar, facets, and infinite scroller', async () => {
205
205
  var _a, _b, _c;
206
206
  const searchService = new MockSearchService();
207
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
207
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
208
208
  </collection-browser>`);
209
209
  el.baseQuery = 'hello';
210
210
  await el.updateComplete;
@@ -219,7 +219,7 @@ describe('Collection Browser', () => {
219
219
  it('queries the search service when given a base query', async () => {
220
220
  var _a, _b, _c;
221
221
  const searchService = new MockSearchService();
222
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
222
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
223
223
  </collection-browser>`);
224
224
  el.baseQuery = 'collection:foo';
225
225
  await el.updateComplete;
@@ -227,10 +227,40 @@ describe('Collection Browser', () => {
227
227
  expect((_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.query).to.equal('collection:foo');
228
228
  expect((_c = (_b = el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('#big-results-label')) === null || _c === void 0 ? void 0 : _c.textContent).to.contains('Results');
229
229
  });
230
+ it('queries the search service when given a list of identifiers and no query', async () => {
231
+ var _a, _b, _c;
232
+ const searchService = new MockSearchService();
233
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
234
+ </collection-browser>`);
235
+ el.identifiers = ['foo', 'bar'];
236
+ await el.updateComplete;
237
+ await el.initialSearchComplete;
238
+ expect((_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.identifiers).to.deep.equal([
239
+ 'foo',
240
+ 'bar',
241
+ ]);
242
+ expect((_c = (_b = el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('#big-results-label')) === null || _c === void 0 ? void 0 : _c.textContent).to.contains('Results');
243
+ });
244
+ it('queries the search service when given a list of identifiers with a query', async () => {
245
+ var _a, _b, _c, _d;
246
+ const searchService = new MockSearchService();
247
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
248
+ </collection-browser>`);
249
+ el.baseQuery = 'collection:foo';
250
+ el.identifiers = ['foo', 'bar'];
251
+ await el.updateComplete;
252
+ await el.initialSearchComplete;
253
+ expect((_a = searchService.searchParams) === null || _a === void 0 ? void 0 : _a.query).to.equal('collection:foo');
254
+ expect((_b = searchService.searchParams) === null || _b === void 0 ? void 0 : _b.identifiers).to.deep.equal([
255
+ 'foo',
256
+ 'bar',
257
+ ]);
258
+ expect((_d = (_c = el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('#big-results-label')) === null || _d === void 0 ? void 0 : _d.textContent).to.contains('Results');
259
+ });
230
260
  it('queries the search service with a metadata search', async () => {
231
261
  var _a, _b, _c;
232
262
  const searchService = new MockSearchService();
233
- const el = await fixture(html ` <collection-browser .searchService=${searchService}>
263
+ const el = await fixture(html ` <collection-browser .searchService=${searchService}>
234
264
  </collection-browser>`);
235
265
  el.searchType = SearchType.METADATA;
236
266
  await el.updateComplete;
@@ -243,7 +273,7 @@ describe('Collection Browser', () => {
243
273
  });
244
274
  it('can change search type', async () => {
245
275
  const searchService = new MockSearchService();
246
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
276
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
247
277
  </collection-browser>`);
248
278
  el.baseQuery = 'collection:foo';
249
279
  await el.updateComplete;
@@ -255,7 +285,7 @@ describe('Collection Browser', () => {
255
285
  it('queries the search service with a fulltext search', async () => {
256
286
  var _a, _b, _c;
257
287
  const searchService = new MockSearchService();
258
- const el = await fixture(html ` <collection-browser .searchService=${searchService}>
288
+ const el = await fixture(html ` <collection-browser .searchService=${searchService}>
259
289
  </collection-browser>`);
260
290
  el.searchType = SearchType.FULLTEXT;
261
291
  await el.updateComplete;
@@ -269,7 +299,7 @@ describe('Collection Browser', () => {
269
299
  it('queries the search service with a radio search', async () => {
270
300
  var _a, _b, _c;
271
301
  const searchService = new MockSearchService();
272
- const el = await fixture(html ` <collection-browser .searchService=${searchService}>
302
+ const el = await fixture(html ` <collection-browser .searchService=${searchService}>
273
303
  </collection-browser>`);
274
304
  el.searchType = SearchType.RADIO;
275
305
  await el.updateComplete;
@@ -283,7 +313,7 @@ describe('Collection Browser', () => {
283
313
  it('queries the search service with a TV search', async () => {
284
314
  var _a, _b, _c;
285
315
  const searchService = new MockSearchService();
286
- const el = await fixture(html ` <collection-browser .searchService=${searchService}>
316
+ const el = await fixture(html ` <collection-browser .searchService=${searchService}>
287
317
  </collection-browser>`);
288
318
  el.searchType = SearchType.TV;
289
319
  await el.updateComplete;
@@ -323,7 +353,7 @@ describe('Collection Browser', () => {
323
353
  collection: {},
324
354
  year: {},
325
355
  };
326
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
356
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
327
357
  </collection-browser>`);
328
358
  el.baseQuery = 'collection:foo';
329
359
  el.selectedFacets = selectedFacets;
@@ -356,7 +386,7 @@ describe('Collection Browser', () => {
356
386
  url.searchParams.append('sin', 'TXT');
357
387
  window.history.replaceState({}, '', url);
358
388
  const searchService = new MockSearchService();
359
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
389
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
360
390
  </collection-browser>`);
361
391
  expect(el.searchType).to.equal(SearchType.FULLTEXT);
362
392
  });
@@ -366,10 +396,10 @@ describe('Collection Browser', () => {
366
396
  url.searchParams.append('sin', 'TXT');
367
397
  window.history.replaceState({}, '', url);
368
398
  const searchService = new MockSearchService();
369
- const el = await fixture(html `<collection-browser
370
- .searchService=${searchService}
371
- suppressURLSinParam
372
- >
399
+ const el = await fixture(html `<collection-browser
400
+ .searchService=${searchService}
401
+ suppressURLSinParam
402
+ >
373
403
  </collection-browser>`);
374
404
  url = new URL(window.location.href);
375
405
  expect(el.searchType).to.equal(SearchType.DEFAULT);
@@ -381,7 +411,7 @@ describe('Collection Browser', () => {
381
411
  });
382
412
  it('can construct tile models with many fields present', async () => {
383
413
  const searchService = new MockSearchService();
384
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
414
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
385
415
  </collection-browser>`);
386
416
  el.baseQuery = 'many-fields';
387
417
  await el.updateComplete;
@@ -394,10 +424,10 @@ describe('Collection Browser', () => {
394
424
  it('emits empty results event when search fetches no results', async () => {
395
425
  const searchService = new MockSearchService();
396
426
  const emptyResultsSpy = sinon.spy();
397
- const el = await fixture(html `<collection-browser
398
- .searchService=${searchService}
399
- @emptyResults=${emptyResultsSpy}
400
- >
427
+ const el = await fixture(html `<collection-browser
428
+ .searchService=${searchService}
429
+ @emptyResults=${emptyResultsSpy}
430
+ >
401
431
  </collection-browser>`);
402
432
  el.baseQuery = 'no-results';
403
433
  await el.updateComplete;
@@ -407,10 +437,10 @@ describe('Collection Browser', () => {
407
437
  it('emits searchError event when search results in an error', async () => {
408
438
  const searchService = new MockSearchService();
409
439
  const searchErrorSpy = sinon.spy();
410
- const el = await fixture(html `<collection-browser
411
- .searchService=${searchService}
412
- @searchError=${searchErrorSpy}
413
- >
440
+ const el = await fixture(html `<collection-browser
441
+ .searchService=${searchService}
442
+ @searchError=${searchErrorSpy}
443
+ >
414
444
  </collection-browser>`);
415
445
  el.baseQuery = 'error';
416
446
  await el.updateComplete;
@@ -420,7 +450,7 @@ describe('Collection Browser', () => {
420
450
  it('applies loggedin flag to tile models if needed', async () => {
421
451
  var _a;
422
452
  const searchService = new MockSearchService();
423
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
453
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
424
454
  </collection-browser>`);
425
455
  el.baseQuery = 'loggedin';
426
456
  await el.updateComplete;
@@ -434,7 +464,7 @@ describe('Collection Browser', () => {
434
464
  it('applies no-preview flag to tile models if needed', async () => {
435
465
  var _a;
436
466
  const searchService = new MockSearchService();
437
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
467
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
438
468
  </collection-browser>`);
439
469
  el.baseQuery = 'no-preview';
440
470
  await el.updateComplete;
@@ -448,7 +478,7 @@ describe('Collection Browser', () => {
448
478
  it('both loggedin and no-preview flags can be set simultaneously', async () => {
449
479
  var _a, _b;
450
480
  const searchService = new MockSearchService();
451
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
481
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
452
482
  </collection-browser>`);
453
483
  el.baseQuery = 'loggedin-no-preview';
454
484
  await el.updateComplete;
@@ -463,7 +493,7 @@ describe('Collection Browser', () => {
463
493
  it('joins full description array into a single string with line breaks', async () => {
464
494
  var _a;
465
495
  const searchService = new MockSearchService();
466
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
496
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
467
497
  </collection-browser>`);
468
498
  // This query receives an array description like ['line1', 'line2']
469
499
  el.baseQuery = 'multi-line-description';
@@ -479,9 +509,9 @@ describe('Collection Browser', () => {
479
509
  it('can change search type', async () => {
480
510
  var _a;
481
511
  const searchService = new MockSearchService();
482
- const el = await fixture(html `<collection-browser
483
- .searchService=${searchService}
484
- .searchType=${SearchType.METADATA}
512
+ const el = await fixture(html `<collection-browser
513
+ .searchService=${searchService}
514
+ .searchType=${SearchType.METADATA}
485
515
  ></collection-browser>`);
486
516
  el.baseQuery = 'collection:foo';
487
517
  el.searchType = SearchType.FULLTEXT;
@@ -493,8 +523,8 @@ describe('Collection Browser', () => {
493
523
  it('trims queries of leading/trailing whitespace', async () => {
494
524
  var _a;
495
525
  const searchService = new MockSearchService();
496
- const el = await fixture(html `<collection-browser
497
- .searchService=${searchService}
526
+ const el = await fixture(html `<collection-browser
527
+ .searchService=${searchService}
498
528
  ></collection-browser>`);
499
529
  el.baseQuery = ' collection:foo ';
500
530
  await el.updateComplete;
@@ -504,8 +534,8 @@ describe('Collection Browser', () => {
504
534
  it('shows error message when error response received', async () => {
505
535
  var _a, _b;
506
536
  const searchService = new MockSearchService();
507
- const el = await fixture(html `<collection-browser
508
- .searchService=${searchService}
537
+ const el = await fixture(html `<collection-browser
538
+ .searchService=${searchService}
509
539
  ></collection-browser>`);
510
540
  el.baseQuery = 'error';
511
541
  await el.updateComplete;
@@ -518,8 +548,8 @@ describe('Collection Browser', () => {
518
548
  it('shows error message when error response received for a collection', async () => {
519
549
  var _a, _b;
520
550
  const searchService = new MockSearchService();
521
- const el = await fixture(html `<collection-browser
522
- .searchService=${searchService}
551
+ const el = await fixture(html `<collection-browser
552
+ .searchService=${searchService}
523
553
  ></collection-browser>`);
524
554
  el.withinCollection = 'error';
525
555
  await el.updateComplete;
@@ -534,8 +564,8 @@ describe('Collection Browser', () => {
534
564
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
535
565
  window.Sentry = { captureMessage: sentrySpy };
536
566
  const searchService = new MockSearchService();
537
- const el = await fixture(html `<collection-browser
538
- .searchService=${searchService}
567
+ const el = await fixture(html `<collection-browser
568
+ .searchService=${searchService}
539
569
  ></collection-browser>`);
540
570
  el.baseQuery = 'malformed';
541
571
  await el.updateComplete;
@@ -544,7 +574,7 @@ describe('Collection Browser', () => {
544
574
  });
545
575
  it('adds collection names to cache when present on response', async () => {
546
576
  const searchService = new MockSearchService();
547
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
577
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
548
578
  </collection-browser>`);
549
579
  el.baseQuery = 'collection-titles';
550
580
  await el.updateComplete;
@@ -556,7 +586,7 @@ describe('Collection Browser', () => {
556
586
  });
557
587
  it('adds tv channel aliases to cache when present on response', async () => {
558
588
  const searchService = new MockSearchService();
559
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
589
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
560
590
  </collection-browser>`);
561
591
  el.baseQuery = 'channel-aliases';
562
592
  await el.updateComplete;
@@ -570,7 +600,7 @@ describe('Collection Browser', () => {
570
600
  asyncResponse: true,
571
601
  resultsSpy,
572
602
  });
573
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
603
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
574
604
  </collection-browser>`);
575
605
  el.baseQuery = 'with-sort';
576
606
  el.selectedSort = SortField.date;
@@ -587,7 +617,7 @@ describe('Collection Browser', () => {
587
617
  asyncResponse: true,
588
618
  resultsSpy,
589
619
  });
590
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
620
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
591
621
  </collection-browser>`);
592
622
  el.baseQuery = 'with-sort';
593
623
  el.selectedSort = SortField.date;
@@ -609,7 +639,7 @@ describe('Collection Browser', () => {
609
639
  asyncResponse: true,
610
640
  resultsSpy,
611
641
  });
612
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
642
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
613
643
  </collection-browser>`);
614
644
  el.baseQuery = 'single-result';
615
645
  await el.updateComplete;
@@ -630,7 +660,7 @@ describe('Collection Browser', () => {
630
660
  asyncResponse: true,
631
661
  resultsSpy,
632
662
  });
633
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
663
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
634
664
  </collection-browser>`);
635
665
  el.baseQuery = 'with-sort';
636
666
  el.selectedSort = SortField.date;
@@ -649,7 +679,7 @@ describe('Collection Browser', () => {
649
679
  it('sets sort properties when user changes sort', async () => {
650
680
  var _a, _b, _c, _d, _e, _f;
651
681
  const searchService = new MockSearchService();
652
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
682
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
653
683
  </collection-browser>`);
654
684
  expect(el.selectedSort).to.equal(SortField.default);
655
685
  el.baseQuery = 'foo';
@@ -672,7 +702,7 @@ describe('Collection Browser', () => {
672
702
  it('sets sort filter properties when user selects title filter', async () => {
673
703
  var _a, _b, _c, _d;
674
704
  const searchService = new MockSearchService();
675
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
705
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
676
706
  </collection-browser>`);
677
707
  el.baseQuery = 'first-title';
678
708
  el.selectedSort = 'title';
@@ -686,7 +716,7 @@ describe('Collection Browser', () => {
686
716
  it('sets sort filter properties when user selects creator filter', async () => {
687
717
  var _a, _b, _c, _d;
688
718
  const searchService = new MockSearchService();
689
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
719
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
690
720
  </collection-browser>`);
691
721
  el.baseQuery = 'first-creator';
692
722
  el.selectedSort = 'creator';
@@ -709,7 +739,7 @@ describe('Collection Browser', () => {
709
739
  subject: {},
710
740
  year: {},
711
741
  };
712
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
742
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
713
743
  </collection-browser>`);
714
744
  el.baseQuery = 'first-creator';
715
745
  el.selectedSort = 'creator';
@@ -737,7 +767,7 @@ describe('Collection Browser', () => {
737
767
  it('applies correct search filter when TV clip filter set to commercials', async () => {
738
768
  var _a, _b, _c;
739
769
  const searchService = new MockSearchService();
740
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
770
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
741
771
  </collection-browser>`);
742
772
  el.baseQuery = 'tv-fields';
743
773
  el.searchType = SearchType.TV;
@@ -749,7 +779,7 @@ describe('Collection Browser', () => {
749
779
  it('applies correct search filter when TV clip filter set to factchecks', async () => {
750
780
  var _a, _b, _c;
751
781
  const searchService = new MockSearchService();
752
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
782
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
753
783
  </collection-browser>`);
754
784
  el.baseQuery = 'tv-fields';
755
785
  el.searchType = SearchType.TV;
@@ -761,7 +791,7 @@ describe('Collection Browser', () => {
761
791
  it('applies correct search filter when TV clip filter set to quotes', async () => {
762
792
  var _a, _b, _c;
763
793
  const searchService = new MockSearchService();
764
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
794
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
765
795
  </collection-browser>`);
766
796
  el.baseQuery = 'tv-fields';
767
797
  el.searchType = SearchType.TV;
@@ -773,7 +803,7 @@ describe('Collection Browser', () => {
773
803
  it('resets letter filters when query changes', async () => {
774
804
  var _a, _b, _c, _d, _e, _f, _g;
775
805
  const searchService = new MockSearchService();
776
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
806
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
777
807
  </collection-browser>`);
778
808
  el.baseQuery = 'first-creator';
779
809
  el.selectedSort = 'creator';
@@ -794,11 +824,11 @@ describe('Collection Browser', () => {
794
824
  var _a, _b, _c;
795
825
  const searchService = new MockSearchService();
796
826
  const mockAnalyticsHandler = new MockAnalyticsHandler();
797
- const el = await fixture(html `<collection-browser
798
- .searchService=${searchService}
799
- .analyticsHandler=${mockAnalyticsHandler}
800
- .suppressPlaceholders=${true}
801
- >
827
+ const el = await fixture(html `<collection-browser
828
+ .searchService=${searchService}
829
+ .analyticsHandler=${mockAnalyticsHandler}
830
+ .suppressPlaceholders=${true}
831
+ >
802
832
  </collection-browser>`);
803
833
  el.baseQuery = 'years'; // Includes year_histogram aggregation in response
804
834
  el.showHistogramDatePicker = true;
@@ -827,10 +857,10 @@ describe('Collection Browser', () => {
827
857
  it('sets date range query when monthly date picker selection changed', async () => {
828
858
  var _a, _b, _c;
829
859
  const searchService = new MockSearchService();
830
- const el = await fixture(html `<collection-browser
831
- .searchService=${searchService}
832
- .suppressPlaceholders=${true}
833
- >
860
+ const el = await fixture(html `<collection-browser
861
+ .searchService=${searchService}
862
+ .suppressPlaceholders=${true}
863
+ >
834
864
  </collection-browser>`);
835
865
  el.baseQuery = 'months'; // Includes date_histogram aggregation in response
836
866
  el.searchType = SearchType.TV;
@@ -861,9 +891,9 @@ describe('Collection Browser', () => {
861
891
  var _a, _b, _c, _d;
862
892
  const spy = sinon.spy();
863
893
  const searchService = new MockSearchService();
864
- const el = await fixture(html `<collection-browser
865
- .searchService=${searchService}
866
- @searchResultsLoadingChanged=${spy}
894
+ const el = await fixture(html `<collection-browser
895
+ .searchService=${searchService}
896
+ @searchResultsLoadingChanged=${spy}
867
897
  ></collection-browser>`);
868
898
  spy.resetHistory();
869
899
  el.baseQuery = 'collection:foo';
@@ -877,9 +907,9 @@ describe('Collection Browser', () => {
877
907
  it('collapses extra set of quotes around href field', async () => {
878
908
  var _a;
879
909
  const searchService = new MockSearchService();
880
- const el = await fixture(html `<collection-browser
881
- .searchService=${searchService}
882
- .baseNavigationUrl=${''}
910
+ const el = await fixture(html `<collection-browser
911
+ .searchService=${searchService}
912
+ .baseNavigationUrl=${''}
883
913
  ></collection-browser>`);
884
914
  el.baseQuery = 'extra-quoted-href';
885
915
  await el.updateComplete;
@@ -892,9 +922,9 @@ describe('Collection Browser', () => {
892
922
  it('sets default sort from collection metadata', async () => {
893
923
  var _a;
894
924
  const searchService = new MockSearchService();
895
- const el = await fixture(html `<collection-browser
896
- .searchService=${searchService}
897
- .baseNavigationUrl=${''}
925
+ const el = await fixture(html `<collection-browser
926
+ .searchService=${searchService}
927
+ .baseNavigationUrl=${''}
898
928
  ></collection-browser>`);
899
929
  el.withinCollection = 'default-sort';
900
930
  await el.updateComplete;
@@ -911,9 +941,9 @@ describe('Collection Browser', () => {
911
941
  it('sets default sort from collection metadata in "-field" format', async () => {
912
942
  var _a;
913
943
  const searchService = new MockSearchService();
914
- const el = await fixture(html `<collection-browser
915
- .searchService=${searchService}
916
- .baseNavigationUrl=${''}
944
+ const el = await fixture(html `<collection-browser
945
+ .searchService=${searchService}
946
+ .baseNavigationUrl=${''}
917
947
  ></collection-browser>`);
918
948
  el.withinCollection = 'default-sort-concise';
919
949
  await el.updateComplete;
@@ -928,8 +958,8 @@ describe('Collection Browser', () => {
928
958
  expect(sortBar.sortDirection).to.be.null;
929
959
  });
930
960
  it('falls back to weekly views default sorting on profiles when tab not set', async () => {
931
- const el = await fixture(html `<collection-browser
932
- .withinProfile=${'@foobar'}
961
+ const el = await fixture(html `<collection-browser
962
+ .withinProfile=${'@foobar'}
933
963
  ></collection-browser>`);
934
964
  el.applyDefaultProfileSort();
935
965
  expect(el.defaultSortParam).to.deep.equal({
@@ -940,9 +970,9 @@ describe('Collection Browser', () => {
940
970
  it('uses relevance sort as default when a query is set', async () => {
941
971
  var _a;
942
972
  const searchService = new MockSearchService();
943
- const el = await fixture(html `<collection-browser
944
- .searchService=${searchService}
945
- .baseNavigationUrl=${''}
973
+ const el = await fixture(html `<collection-browser
974
+ .searchService=${searchService}
975
+ .baseNavigationUrl=${''}
946
976
  ></collection-browser>`);
947
977
  el.withinCollection = 'default-sort';
948
978
  el.baseQuery = 'default-sort';
@@ -960,9 +990,9 @@ describe('Collection Browser', () => {
960
990
  it('uses date favorited sort as default when targeting fav- collection', async () => {
961
991
  var _a;
962
992
  const searchService = new MockSearchService();
963
- const el = await fixture(html `<collection-browser
964
- .searchService=${searchService}
965
- .baseNavigationUrl=${''}
993
+ const el = await fixture(html `<collection-browser
994
+ .searchService=${searchService}
995
+ .baseNavigationUrl=${''}
966
996
  ></collection-browser>`);
967
997
  el.withinCollection = 'fav-sort';
968
998
  await el.updateComplete;
@@ -979,7 +1009,7 @@ describe('Collection Browser', () => {
979
1009
  it('scrolls to page', async () => {
980
1010
  var _a;
981
1011
  const searchService = new MockSearchService();
982
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1012
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
983
1013
  </collection-browser>`);
984
1014
  // Infinite scroller won't exist unless there's a base query.
985
1015
  // First ensure that we don't throw errors when it doesn't exist.
@@ -1001,9 +1031,9 @@ describe('Collection Browser', () => {
1001
1031
  it('shows mobile facets in mobile view', async () => {
1002
1032
  var _a, _b;
1003
1033
  const searchService = new MockSearchService();
1004
- const el = await fixture(html `<collection-browser
1005
- .searchService=${searchService}
1006
- .mobileBreakpoint=${9999}
1034
+ const el = await fixture(html `<collection-browser
1035
+ .searchService=${searchService}
1036
+ .mobileBreakpoint=${9999}
1007
1037
  ></collection-browser>`);
1008
1038
  el.baseQuery = 'collection:foo';
1009
1039
  await el.updateComplete;
@@ -1023,11 +1053,11 @@ describe('Collection Browser', () => {
1023
1053
  var _a, _b;
1024
1054
  const searchService = new MockSearchService();
1025
1055
  const analyticsHandler = new MockAnalyticsHandler();
1026
- const el = await fixture(html `<collection-browser
1027
- .searchService=${searchService}
1028
- .analyticsHandler=${analyticsHandler}
1029
- .searchContext=${'foobar-context'}
1030
- .mobileBreakpoint=${9999}
1056
+ const el = await fixture(html `<collection-browser
1057
+ .searchService=${searchService}
1058
+ .analyticsHandler=${analyticsHandler}
1059
+ .searchContext=${'foobar-context'}
1060
+ .mobileBreakpoint=${9999}
1031
1061
  ></collection-browser>`);
1032
1062
  el.baseQuery = 'collection:foo';
1033
1063
  await el.updateComplete;
@@ -1067,9 +1097,9 @@ describe('Collection Browser', () => {
1067
1097
  });
1068
1098
  it('sets parent collections to prop when searching a collection', async () => {
1069
1099
  const searchService = new MockSearchService();
1070
- const el = await fixture(html `<collection-browser
1071
- .searchService=${searchService}
1072
- .withinCollection=${'fake'}
1100
+ const el = await fixture(html `<collection-browser
1101
+ .searchService=${searchService}
1102
+ .withinCollection=${'fake'}
1073
1103
  ></collection-browser>`);
1074
1104
  el.baseQuery = 'parent-collections';
1075
1105
  await el.updateComplete;
@@ -1079,9 +1109,9 @@ describe('Collection Browser', () => {
1079
1109
  });
1080
1110
  it('recognizes TV collections', async () => {
1081
1111
  const searchService = new MockSearchService();
1082
- const el = await fixture(html `<collection-browser
1083
- .searchService=${searchService}
1084
- .withinCollection=${'TV-FOO'}
1112
+ const el = await fixture(html `<collection-browser
1113
+ .searchService=${searchService}
1114
+ .withinCollection=${'TV-FOO'}
1085
1115
  ></collection-browser>`);
1086
1116
  el.baseQuery = 'tv-collection';
1087
1117
  await el.updateComplete;
@@ -1093,9 +1123,9 @@ describe('Collection Browser', () => {
1093
1123
  var _a;
1094
1124
  const mockAnalyticsHandler = new MockAnalyticsHandler();
1095
1125
  const searchService = new MockSearchService();
1096
- const el = await fixture(html `<collection-browser
1097
- .analyticsHandler=${mockAnalyticsHandler}
1098
- .searchService=${searchService}
1126
+ const el = await fixture(html `<collection-browser
1127
+ .analyticsHandler=${mockAnalyticsHandler}
1128
+ .searchService=${searchService}
1099
1129
  ></collection-browser>`);
1100
1130
  const infiniteScrollerRefreshSpy = sinon.spy();
1101
1131
  // Infinite scroller won't exist unless there's a base query
@@ -1141,7 +1171,7 @@ describe('Collection Browser', () => {
1141
1171
  it('query the search service for single result', async () => {
1142
1172
  var _a, _b;
1143
1173
  const searchService = new MockSearchService();
1144
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1174
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
1145
1175
  </collection-browser>`);
1146
1176
  el.baseQuery = 'single-result';
1147
1177
  await el.updateComplete;
@@ -1170,7 +1200,7 @@ describe('Collection Browser', () => {
1170
1200
  searchParams.append('and[]', 'year:[2000 TO 2010]');
1171
1201
  window.history.replaceState({}, '', url);
1172
1202
  const searchService = new MockSearchService();
1173
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1203
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
1174
1204
  </collection-browser>`);
1175
1205
  await el.initialSearchComplete;
1176
1206
  await el.updateComplete;
@@ -1196,10 +1226,10 @@ describe('Collection Browser', () => {
1196
1226
  searchParams.append('and[]', 'year:[2000 TO 2010]');
1197
1227
  window.history.replaceState({}, '', url);
1198
1228
  const searchService = new MockSearchService();
1199
- const el = await fixture(html `<collection-browser
1200
- .searchService=${searchService}
1201
- .withinCollection=${'foobar'}
1202
- >
1229
+ const el = await fixture(html `<collection-browser
1230
+ .searchService=${searchService}
1231
+ .withinCollection=${'foobar'}
1232
+ >
1203
1233
  </collection-browser>`);
1204
1234
  await el.initialSearchComplete;
1205
1235
  await el.updateComplete;
@@ -1224,11 +1254,11 @@ describe('Collection Browser', () => {
1224
1254
  searchParams.append('and[]', 'year:[2000 TO 2010]');
1225
1255
  window.history.replaceState({}, '', url);
1226
1256
  const searchService = new MockSearchService();
1227
- const el = await fixture(html `<collection-browser
1228
- .searchService=${searchService}
1229
- .withinProfile=${'@foobar'}
1230
- .profileElement=${'uploads'}
1231
- >
1257
+ const el = await fixture(html `<collection-browser
1258
+ .searchService=${searchService}
1259
+ .withinProfile=${'@foobar'}
1260
+ .profileElement=${'uploads'}
1261
+ >
1232
1262
  </collection-browser>`);
1233
1263
  await el.initialSearchComplete;
1234
1264
  await el.updateComplete;
@@ -1255,7 +1285,7 @@ describe('Collection Browser', () => {
1255
1285
  searchParams.append('and[]', 'year:[2000 TO 2010]');
1256
1286
  window.history.replaceState({}, '', url);
1257
1287
  const searchService = new MockSearchService();
1258
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1288
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
1259
1289
  </collection-browser>`);
1260
1290
  await el.initialSearchComplete;
1261
1291
  await el.updateComplete;
@@ -1283,10 +1313,10 @@ describe('Collection Browser', () => {
1283
1313
  searchParams.append('and[]', 'year:[2000 TO 2010]');
1284
1314
  window.history.replaceState({}, '', url);
1285
1315
  const searchService = new MockSearchService();
1286
- const el = await fixture(html `<collection-browser
1287
- .searchService=${searchService}
1288
- .withinCollection=${'foobar'}
1289
- >
1316
+ const el = await fixture(html `<collection-browser
1317
+ .searchService=${searchService}
1318
+ .withinCollection=${'foobar'}
1319
+ >
1290
1320
  </collection-browser>`);
1291
1321
  el.baseQuery = 'bar';
1292
1322
  await el.updateComplete;
@@ -1313,10 +1343,10 @@ describe('Collection Browser', () => {
1313
1343
  searchParams.append('and[]', 'year:[2000 TO 2010]');
1314
1344
  window.history.replaceState({}, '', url);
1315
1345
  const searchService = new MockSearchService();
1316
- const el = await fixture(html `<collection-browser
1317
- .searchService=${searchService}
1318
- .withinCollection=${'foobar'}
1319
- >
1346
+ const el = await fixture(html `<collection-browser
1347
+ .searchService=${searchService}
1348
+ .withinCollection=${'foobar'}
1349
+ >
1320
1350
  </collection-browser>`);
1321
1351
  el.withinCollection = 'bar';
1322
1352
  await el.updateComplete;
@@ -1333,11 +1363,11 @@ describe('Collection Browser', () => {
1333
1363
  it('correctly retrieves web archive hits', async () => {
1334
1364
  var _a, _b, _c;
1335
1365
  const searchService = new MockSearchService();
1336
- const el = await fixture(html `<collection-browser
1337
- .searchService=${searchService}
1338
- .withinProfile=${'@foo'}
1339
- .profileElement=${'web_archives'}
1340
- >
1366
+ const el = await fixture(html `<collection-browser
1367
+ .searchService=${searchService}
1368
+ .withinProfile=${'@foo'}
1369
+ .profileElement=${'web_archives'}
1370
+ >
1341
1371
  </collection-browser>`);
1342
1372
  el.baseQuery = 'web-archive';
1343
1373
  await el.updateComplete;
@@ -1351,10 +1381,10 @@ describe('Collection Browser', () => {
1351
1381
  it('shows dropdown accordion in facet sidebar when opt-in strategy is specified', async () => {
1352
1382
  var _a;
1353
1383
  const searchService = new MockSearchService();
1354
- const el = await fixture(html `<collection-browser
1355
- .searchService=${searchService}
1356
- facetLoadStrategy=${'opt-in'}
1357
- >
1384
+ const el = await fixture(html `<collection-browser
1385
+ .searchService=${searchService}
1386
+ facetLoadStrategy=${'opt-in'}
1387
+ >
1358
1388
  </collection-browser>`);
1359
1389
  el.baseQuery = 'foo';
1360
1390
  await el.updateComplete;
@@ -1365,10 +1395,10 @@ describe('Collection Browser', () => {
1365
1395
  it('shows temporarily unavailable message when facets suppressed', async () => {
1366
1396
  var _a, _b;
1367
1397
  const searchService = new MockSearchService();
1368
- const el = await fixture(html `<collection-browser
1369
- .searchService=${searchService}
1370
- facetLoadStrategy=${'off'}
1371
- >
1398
+ const el = await fixture(html `<collection-browser
1399
+ .searchService=${searchService}
1400
+ facetLoadStrategy=${'off'}
1401
+ >
1372
1402
  </collection-browser>`);
1373
1403
  el.baseQuery = 'foo';
1374
1404
  await el.updateComplete;
@@ -1380,7 +1410,7 @@ describe('Collection Browser', () => {
1380
1410
  it('shows manage bar interface instead of sort bar when in manage view', async () => {
1381
1411
  var _a, _b, _c, _d;
1382
1412
  const searchService = new MockSearchService();
1383
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1413
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
1384
1414
  </collection-browser>`);
1385
1415
  el.baseQuery = 'foo';
1386
1416
  await el.updateComplete;
@@ -1396,11 +1426,11 @@ describe('Collection Browser', () => {
1396
1426
  });
1397
1427
  it('switches to grid display mode when manage view activated', async () => {
1398
1428
  const searchService = new MockSearchService();
1399
- const el = await fixture(html `<collection-browser
1400
- .searchService=${searchService}
1401
- .baseQuery=${'foo'}
1402
- .displayMode=${'list-detail'}
1403
- >
1429
+ const el = await fixture(html `<collection-browser
1430
+ .searchService=${searchService}
1431
+ .baseQuery=${'foo'}
1432
+ .displayMode=${'list-detail'}
1433
+ >
1404
1434
  </collection-browser>`);
1405
1435
  el.isManageView = true;
1406
1436
  await el.updateComplete;
@@ -1409,10 +1439,10 @@ describe('Collection Browser', () => {
1409
1439
  it('can remove all checked tiles', async () => {
1410
1440
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1411
1441
  const searchService = new MockSearchService();
1412
- const el = await fixture(html `<collection-browser
1413
- .searchService=${searchService}
1414
- .baseNavigationUrl=${''}
1415
- >
1442
+ const el = await fixture(html `<collection-browser
1443
+ .searchService=${searchService}
1444
+ .baseNavigationUrl=${''}
1445
+ >
1416
1446
  </collection-browser>`);
1417
1447
  el.baseQuery = 'foo';
1418
1448
  el.pageSize = 1; // To hit the edge case of a page break while offsetting tiles
@@ -1448,10 +1478,10 @@ describe('Collection Browser', () => {
1448
1478
  });
1449
1479
  it('can check/uncheck all tiles', async () => {
1450
1480
  const searchService = new MockSearchService();
1451
- const el = await fixture(html `<collection-browser
1452
- .searchService=${searchService}
1453
- .baseNavigationUrl=${''}
1454
- >
1481
+ const el = await fixture(html `<collection-browser
1482
+ .searchService=${searchService}
1483
+ .baseNavigationUrl=${''}
1484
+ >
1455
1485
  </collection-browser>`);
1456
1486
  el.baseQuery = 'foo';
1457
1487
  await el.updateComplete;
@@ -1471,10 +1501,10 @@ describe('Collection Browser', () => {
1471
1501
  var _a, _b;
1472
1502
  const spy = sinon.spy();
1473
1503
  const searchService = new MockSearchService();
1474
- const el = await fixture(html `<collection-browser
1475
- .searchService=${searchService}
1476
- .baseNavigationUrl=${''}
1477
- @manageModeChanged=${spy}
1504
+ const el = await fixture(html `<collection-browser
1505
+ .searchService=${searchService}
1506
+ .baseNavigationUrl=${''}
1507
+ @manageModeChanged=${spy}
1478
1508
  ></collection-browser>`);
1479
1509
  el.isManageView = true;
1480
1510
  await el.updateComplete;
@@ -1489,11 +1519,11 @@ describe('Collection Browser', () => {
1489
1519
  var _a, _b, _c, _d, _e;
1490
1520
  const spy = sinon.spy();
1491
1521
  const searchService = new MockSearchService();
1492
- const el = await fixture(html `<collection-browser
1493
- .searchService=${searchService}
1494
- .baseNavigationUrl=${''}
1495
- @itemRemovalRequested=${spy}
1496
- >
1522
+ const el = await fixture(html `<collection-browser
1523
+ .searchService=${searchService}
1524
+ .baseNavigationUrl=${''}
1525
+ @itemRemovalRequested=${spy}
1526
+ >
1497
1527
  </collection-browser>`);
1498
1528
  el.baseQuery = 'foo';
1499
1529
  await el.updateComplete;
@@ -1523,10 +1553,10 @@ describe('Collection Browser', () => {
1523
1553
  it('disables manage view when manage bar cancelled', async () => {
1524
1554
  var _a;
1525
1555
  const searchService = new MockSearchService();
1526
- const el = await fixture(html `<collection-browser
1527
- .searchService=${searchService}
1528
- .baseNavigationUrl=${''}
1529
- >
1556
+ const el = await fixture(html `<collection-browser
1557
+ .searchService=${searchService}
1558
+ .baseNavigationUrl=${''}
1559
+ >
1530
1560
  </collection-browser>`);
1531
1561
  el.baseQuery = 'foo';
1532
1562
  await el.updateComplete;
@@ -1543,7 +1573,7 @@ describe('Collection Browser', () => {
1543
1573
  it('enable/disable manage view delete button when you selectAll/unselectAll', async () => {
1544
1574
  var _a, _b, _c, _d;
1545
1575
  const searchService = new MockSearchService();
1546
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1576
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
1547
1577
  </collection-browser>`);
1548
1578
  el.baseQuery = 'foo';
1549
1579
  await el.updateComplete;
@@ -1571,10 +1601,10 @@ describe('Collection Browser', () => {
1571
1601
  it('shows Blurring checkbox for admin users', async () => {
1572
1602
  var _a;
1573
1603
  const searchService = new MockSearchService();
1574
- const el = await fixture(html `<collection-browser
1575
- .baseNavigationUrl=${''}
1576
- .searchService=${searchService}
1577
- >
1604
+ const el = await fixture(html `<collection-browser
1605
+ .baseNavigationUrl=${''}
1606
+ .searchService=${searchService}
1607
+ >
1578
1608
  </collection-browser>`);
1579
1609
  el.baseQuery = 'archive-org-user-loggedin';
1580
1610
  await el.updateComplete;
@@ -1586,10 +1616,10 @@ describe('Collection Browser', () => {
1586
1616
  it('unchecks Blurring checkbox for admin users with blurring preference off', async () => {
1587
1617
  var _a;
1588
1618
  const searchService = new MockSearchService();
1589
- const el = await fixture(html `<collection-browser
1590
- .baseNavigationUrl=${''}
1591
- .searchService=${searchService}
1592
- >
1619
+ const el = await fixture(html `<collection-browser
1620
+ .baseNavigationUrl=${''}
1621
+ .searchService=${searchService}
1622
+ >
1593
1623
  </collection-browser>`);
1594
1624
  el.baseQuery = 'archive-org-user-loggedin-noblur';
1595
1625
  await el.updateComplete;
@@ -1601,10 +1631,10 @@ describe('Collection Browser', () => {
1601
1631
  it('toggles blur state when Blurring checkbox is toggled', async () => {
1602
1632
  var _a, _b, _c;
1603
1633
  const searchService = new MockSearchService();
1604
- const el = await fixture(html `<collection-browser
1605
- .baseNavigationUrl=${''}
1606
- .searchService=${searchService}
1607
- >
1634
+ const el = await fixture(html `<collection-browser
1635
+ .baseNavigationUrl=${''}
1636
+ .searchService=${searchService}
1637
+ >
1608
1638
  </collection-browser>`);
1609
1639
  el.baseQuery = 'archive-org-user-loggedin';
1610
1640
  await el.updateComplete;
@@ -1620,11 +1650,11 @@ describe('Collection Browser', () => {
1620
1650
  it('applies loans tab properties to sort bar', async () => {
1621
1651
  var _a;
1622
1652
  const searchService = new MockSearchService();
1623
- const el = await fixture(html `<collection-browser
1624
- .baseNavigationUrl=${''}
1625
- .searchService=${searchService}
1626
- .enableSortOptionsSlot=${true}
1627
- >
1653
+ const el = await fixture(html `<collection-browser
1654
+ .baseNavigationUrl=${''}
1655
+ .searchService=${searchService}
1656
+ .enableSortOptionsSlot=${true}
1657
+ >
1628
1658
  </collection-browser>`);
1629
1659
  el.baseQuery = 'collection:foo';
1630
1660
  await el.updateComplete;
@@ -1639,9 +1669,9 @@ describe('Collection Browser', () => {
1639
1669
  it('can suppress presence of result count', async () => {
1640
1670
  var _a;
1641
1671
  const searchService = new MockSearchService();
1642
- const el = await fixture(html `<collection-browser
1643
- .searchService=${searchService}
1644
- suppressResultCount
1672
+ const el = await fixture(html `<collection-browser
1673
+ .searchService=${searchService}
1674
+ suppressResultCount
1645
1675
  ></collection-browser>`);
1646
1676
  el.baseQuery = 'collection:foo';
1647
1677
  await el.updateComplete;
@@ -1652,9 +1682,9 @@ describe('Collection Browser', () => {
1652
1682
  it('can suppress presence of result tiles', async () => {
1653
1683
  var _a;
1654
1684
  const searchService = new MockSearchService();
1655
- const el = await fixture(html `<collection-browser
1656
- .searchService=${searchService}
1657
- suppressResultTiles
1685
+ const el = await fixture(html `<collection-browser
1686
+ .searchService=${searchService}
1687
+ suppressResultTiles
1658
1688
  ></collection-browser>`);
1659
1689
  el.baseQuery = 'collection:foo';
1660
1690
  await el.updateComplete;
@@ -1667,7 +1697,7 @@ describe('Collection Browser', () => {
1667
1697
  asyncResponse: true,
1668
1698
  resultsSpy,
1669
1699
  });
1670
- const el = await fixture(html `<collection-browser .searchService=${searchService}>
1700
+ const el = await fixture(html `<collection-browser .searchService=${searchService}>
1671
1701
  </collection-browser>`);
1672
1702
  const numberOfPages = 15;
1673
1703
  el.baseQuery = 'jack';