@jbrowse/plugin-data-management 1.4.1 → 1.5.2
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.
- package/dist/AddTrackWidget/components/TrackSourceSelect.d.ts +2 -1
- package/dist/AddTrackWidget/model.d.ts +1 -363
- package/dist/PluginStoreWidget/components/CustomPluginForm.d.ts +1 -1
- package/dist/PluginStoreWidget/components/PluginCard.d.ts +2 -2
- package/dist/SetDefaultSession/SetDefaultSession.d.ts +4 -6
- package/dist/index.d.ts +8 -12
- package/dist/plugin-data-management.cjs.development.js +627 -501
- package/dist/plugin-data-management.cjs.development.js.map +1 -1
- package/dist/plugin-data-management.cjs.production.min.js +1 -1
- package/dist/plugin-data-management.cjs.production.min.js.map +1 -1
- package/dist/plugin-data-management.esm.js +614 -507
- package/dist/plugin-data-management.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/AddConnectionWidget/components/AddConnectionWidget.test.js +3 -8
- package/src/AddTrackWidget/components/AddTrackWidget.test.js +2 -3
- package/src/AddTrackWidget/components/AddTrackWidget.tsx +4 -2
- package/src/AddTrackWidget/components/ConfirmTrack.tsx +160 -88
- package/src/AddTrackWidget/components/TrackSourceSelect.tsx +30 -23
- package/src/AddTrackWidget/components/__snapshots__/AddTrackWidget.test.js.snap +157 -124
- package/src/AddTrackWidget/index.test.jsx +78 -26
- package/src/AddTrackWidget/model.ts +5 -14
- package/src/AssemblyManager/AssemblyAddForm.tsx +7 -6
- package/src/AssemblyManager/AssemblyManager.test.tsx +1 -0
- package/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +27 -17
- package/src/HierarchicalTrackSelectorWidget/model.js +3 -2
- package/src/PluginStoreWidget/components/CustomPluginForm.tsx +164 -56
- package/src/PluginStoreWidget/components/InstalledPlugin.tsx +10 -2
- package/src/PluginStoreWidget/components/PluginCard.tsx +7 -9
- package/src/PluginStoreWidget/components/PluginStoreWidget.test.js +9 -10
- package/src/PluginStoreWidget/components/PluginStoreWidget.tsx +36 -26
- package/src/PluginStoreWidget/components/__snapshots__/PluginStoreWidget.test.js.snap +89 -51
- package/src/SetDefaultSession/SetDefaultSession.test.tsx +7 -81
- package/src/SetDefaultSession/SetDefaultSession.tsx +51 -162
- package/src/index.ts +1 -51
- package/src/ucsc-trackhub/configSchema.js +4 -1
- package/src/ucsc-trackhub/model.js +31 -31
- package/src/ucsc-trackhub/ucscTrackHub.js +40 -12
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
class="makeStyles-root"
|
|
6
|
+
>
|
|
5
7
|
<div
|
|
6
|
-
class="MuiFormControl-root MuiTextField-root
|
|
8
|
+
class="MuiFormControl-root MuiTextField-root MuiFormControl-fullWidth"
|
|
7
9
|
>
|
|
8
10
|
<label
|
|
9
11
|
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated"
|
|
@@ -116,9 +118,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
116
118
|
>
|
|
117
119
|
<svg
|
|
118
120
|
aria-hidden="true"
|
|
119
|
-
class="MuiSvgIcon-root"
|
|
121
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
120
122
|
focusable="false"
|
|
121
|
-
style="margin-right: 0.5rem;"
|
|
122
123
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
123
124
|
viewBox="0 0 24 24"
|
|
124
125
|
>
|
|
@@ -137,9 +138,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
137
138
|
>
|
|
138
139
|
<svg
|
|
139
140
|
aria-hidden="true"
|
|
140
|
-
class="MuiSvgIcon-root"
|
|
141
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
141
142
|
focusable="false"
|
|
142
|
-
style="margin-right: 0.5rem;"
|
|
143
143
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
144
144
|
viewBox="0 0 24 24"
|
|
145
145
|
>
|
|
@@ -158,9 +158,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
158
158
|
>
|
|
159
159
|
<svg
|
|
160
160
|
aria-hidden="true"
|
|
161
|
-
class="MuiSvgIcon-root"
|
|
161
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
162
162
|
focusable="false"
|
|
163
|
-
style="margin-right: 0.5rem;"
|
|
164
163
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
165
164
|
viewBox="0 0 24 24"
|
|
166
165
|
>
|
|
@@ -179,9 +178,28 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
179
178
|
>
|
|
180
179
|
<svg
|
|
181
180
|
aria-hidden="true"
|
|
182
|
-
class="MuiSvgIcon-root"
|
|
181
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
182
|
+
focusable="false"
|
|
183
|
+
title="This plugin was installed by an administrator, you cannot remove it."
|
|
184
|
+
viewBox="0 0 24 24"
|
|
185
|
+
>
|
|
186
|
+
<path
|
|
187
|
+
d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"
|
|
188
|
+
/>
|
|
189
|
+
</svg>
|
|
190
|
+
<p
|
|
191
|
+
class="MuiTypography-root MuiTypography-body1"
|
|
192
|
+
>
|
|
193
|
+
AuthenticationPlugin
|
|
194
|
+
</p>
|
|
195
|
+
</li>
|
|
196
|
+
<li
|
|
197
|
+
class="MuiListItem-root MuiListItem-gutters"
|
|
198
|
+
>
|
|
199
|
+
<svg
|
|
200
|
+
aria-hidden="true"
|
|
201
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
183
202
|
focusable="false"
|
|
184
|
-
style="margin-right: 0.5rem;"
|
|
185
203
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
186
204
|
viewBox="0 0 24 24"
|
|
187
205
|
>
|
|
@@ -200,9 +218,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
200
218
|
>
|
|
201
219
|
<svg
|
|
202
220
|
aria-hidden="true"
|
|
203
|
-
class="MuiSvgIcon-root"
|
|
221
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
204
222
|
focusable="false"
|
|
205
|
-
style="margin-right: 0.5rem;"
|
|
206
223
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
207
224
|
viewBox="0 0 24 24"
|
|
208
225
|
>
|
|
@@ -221,9 +238,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
221
238
|
>
|
|
222
239
|
<svg
|
|
223
240
|
aria-hidden="true"
|
|
224
|
-
class="MuiSvgIcon-root"
|
|
241
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
225
242
|
focusable="false"
|
|
226
|
-
style="margin-right: 0.5rem;"
|
|
227
243
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
228
244
|
viewBox="0 0 24 24"
|
|
229
245
|
>
|
|
@@ -242,9 +258,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
242
258
|
>
|
|
243
259
|
<svg
|
|
244
260
|
aria-hidden="true"
|
|
245
|
-
class="MuiSvgIcon-root"
|
|
261
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
246
262
|
focusable="false"
|
|
247
|
-
style="margin-right: 0.5rem;"
|
|
248
263
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
249
264
|
viewBox="0 0 24 24"
|
|
250
265
|
>
|
|
@@ -263,9 +278,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
263
278
|
>
|
|
264
279
|
<svg
|
|
265
280
|
aria-hidden="true"
|
|
266
|
-
class="MuiSvgIcon-root"
|
|
281
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
267
282
|
focusable="false"
|
|
268
|
-
style="margin-right: 0.5rem;"
|
|
269
283
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
270
284
|
viewBox="0 0 24 24"
|
|
271
285
|
>
|
|
@@ -284,9 +298,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
284
298
|
>
|
|
285
299
|
<svg
|
|
286
300
|
aria-hidden="true"
|
|
287
|
-
class="MuiSvgIcon-root"
|
|
301
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
288
302
|
focusable="false"
|
|
289
|
-
style="margin-right: 0.5rem;"
|
|
290
303
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
291
304
|
viewBox="0 0 24 24"
|
|
292
305
|
>
|
|
@@ -297,7 +310,7 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
297
310
|
<p
|
|
298
311
|
class="MuiTypography-root MuiTypography-body1"
|
|
299
312
|
>
|
|
300
|
-
|
|
313
|
+
GTFPlugin
|
|
301
314
|
</p>
|
|
302
315
|
</li>
|
|
303
316
|
<li
|
|
@@ -305,9 +318,28 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
305
318
|
>
|
|
306
319
|
<svg
|
|
307
320
|
aria-hidden="true"
|
|
308
|
-
class="MuiSvgIcon-root"
|
|
321
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
322
|
+
focusable="false"
|
|
323
|
+
title="This plugin was installed by an administrator, you cannot remove it."
|
|
324
|
+
viewBox="0 0 24 24"
|
|
325
|
+
>
|
|
326
|
+
<path
|
|
327
|
+
d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"
|
|
328
|
+
/>
|
|
329
|
+
</svg>
|
|
330
|
+
<p
|
|
331
|
+
class="MuiTypography-root MuiTypography-body1"
|
|
332
|
+
>
|
|
333
|
+
GFF3Plugin
|
|
334
|
+
</p>
|
|
335
|
+
</li>
|
|
336
|
+
<li
|
|
337
|
+
class="MuiListItem-root MuiListItem-gutters"
|
|
338
|
+
>
|
|
339
|
+
<svg
|
|
340
|
+
aria-hidden="true"
|
|
341
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
309
342
|
focusable="false"
|
|
310
|
-
style="margin-right: 0.5rem;"
|
|
311
343
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
312
344
|
viewBox="0 0 24 24"
|
|
313
345
|
>
|
|
@@ -326,9 +358,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
326
358
|
>
|
|
327
359
|
<svg
|
|
328
360
|
aria-hidden="true"
|
|
329
|
-
class="MuiSvgIcon-root"
|
|
361
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
330
362
|
focusable="false"
|
|
331
|
-
style="margin-right: 0.5rem;"
|
|
332
363
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
333
364
|
viewBox="0 0 24 24"
|
|
334
365
|
>
|
|
@@ -347,9 +378,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
347
378
|
>
|
|
348
379
|
<svg
|
|
349
380
|
aria-hidden="true"
|
|
350
|
-
class="MuiSvgIcon-root"
|
|
381
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
351
382
|
focusable="false"
|
|
352
|
-
style="margin-right: 0.5rem;"
|
|
353
383
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
354
384
|
viewBox="0 0 24 24"
|
|
355
385
|
>
|
|
@@ -368,9 +398,28 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
368
398
|
>
|
|
369
399
|
<svg
|
|
370
400
|
aria-hidden="true"
|
|
371
|
-
class="MuiSvgIcon-root"
|
|
401
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
402
|
+
focusable="false"
|
|
403
|
+
title="This plugin was installed by an administrator, you cannot remove it."
|
|
404
|
+
viewBox="0 0 24 24"
|
|
405
|
+
>
|
|
406
|
+
<path
|
|
407
|
+
d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"
|
|
408
|
+
/>
|
|
409
|
+
</svg>
|
|
410
|
+
<p
|
|
411
|
+
class="MuiTypography-root MuiTypography-body1"
|
|
412
|
+
>
|
|
413
|
+
ArcRenderer
|
|
414
|
+
</p>
|
|
415
|
+
</li>
|
|
416
|
+
<li
|
|
417
|
+
class="MuiListItem-root MuiListItem-gutters"
|
|
418
|
+
>
|
|
419
|
+
<svg
|
|
420
|
+
aria-hidden="true"
|
|
421
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
372
422
|
focusable="false"
|
|
373
|
-
style="margin-right: 0.5rem;"
|
|
374
423
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
375
424
|
viewBox="0 0 24 24"
|
|
376
425
|
>
|
|
@@ -389,9 +438,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
389
438
|
>
|
|
390
439
|
<svg
|
|
391
440
|
aria-hidden="true"
|
|
392
|
-
class="MuiSvgIcon-root"
|
|
441
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
393
442
|
focusable="false"
|
|
394
|
-
style="margin-right: 0.5rem;"
|
|
395
443
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
396
444
|
viewBox="0 0 24 24"
|
|
397
445
|
>
|
|
@@ -410,9 +458,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
410
458
|
>
|
|
411
459
|
<svg
|
|
412
460
|
aria-hidden="true"
|
|
413
|
-
class="MuiSvgIcon-root"
|
|
461
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
414
462
|
focusable="false"
|
|
415
|
-
style="margin-right: 0.5rem;"
|
|
416
463
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
417
464
|
viewBox="0 0 24 24"
|
|
418
465
|
>
|
|
@@ -431,9 +478,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
431
478
|
>
|
|
432
479
|
<svg
|
|
433
480
|
aria-hidden="true"
|
|
434
|
-
class="MuiSvgIcon-root"
|
|
481
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
435
482
|
focusable="false"
|
|
436
|
-
style="margin-right: 0.5rem;"
|
|
437
483
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
438
484
|
viewBox="0 0 24 24"
|
|
439
485
|
>
|
|
@@ -452,9 +498,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
452
498
|
>
|
|
453
499
|
<svg
|
|
454
500
|
aria-hidden="true"
|
|
455
|
-
class="MuiSvgIcon-root"
|
|
501
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
456
502
|
focusable="false"
|
|
457
|
-
style="margin-right: 0.5rem;"
|
|
458
503
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
459
504
|
viewBox="0 0 24 24"
|
|
460
505
|
>
|
|
@@ -473,9 +518,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
473
518
|
>
|
|
474
519
|
<svg
|
|
475
520
|
aria-hidden="true"
|
|
476
|
-
class="MuiSvgIcon-root"
|
|
521
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
477
522
|
focusable="false"
|
|
478
|
-
style="margin-right: 0.5rem;"
|
|
479
523
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
480
524
|
viewBox="0 0 24 24"
|
|
481
525
|
>
|
|
@@ -494,9 +538,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
494
538
|
>
|
|
495
539
|
<svg
|
|
496
540
|
aria-hidden="true"
|
|
497
|
-
class="MuiSvgIcon-root"
|
|
541
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
498
542
|
focusable="false"
|
|
499
|
-
style="margin-right: 0.5rem;"
|
|
500
543
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
501
544
|
viewBox="0 0 24 24"
|
|
502
545
|
>
|
|
@@ -515,9 +558,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
515
558
|
>
|
|
516
559
|
<svg
|
|
517
560
|
aria-hidden="true"
|
|
518
|
-
class="MuiSvgIcon-root"
|
|
561
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
519
562
|
focusable="false"
|
|
520
|
-
style="margin-right: 0.5rem;"
|
|
521
563
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
522
564
|
viewBox="0 0 24 24"
|
|
523
565
|
>
|
|
@@ -536,9 +578,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
536
578
|
>
|
|
537
579
|
<svg
|
|
538
580
|
aria-hidden="true"
|
|
539
|
-
class="MuiSvgIcon-root"
|
|
581
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
540
582
|
focusable="false"
|
|
541
|
-
style="margin-right: 0.5rem;"
|
|
542
583
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
543
584
|
viewBox="0 0 24 24"
|
|
544
585
|
>
|
|
@@ -557,9 +598,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
557
598
|
>
|
|
558
599
|
<svg
|
|
559
600
|
aria-hidden="true"
|
|
560
|
-
class="MuiSvgIcon-root"
|
|
601
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
561
602
|
focusable="false"
|
|
562
|
-
style="margin-right: 0.5rem;"
|
|
563
603
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
564
604
|
viewBox="0 0 24 24"
|
|
565
605
|
>
|
|
@@ -578,9 +618,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
578
618
|
>
|
|
579
619
|
<svg
|
|
580
620
|
aria-hidden="true"
|
|
581
|
-
class="MuiSvgIcon-root"
|
|
621
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
582
622
|
focusable="false"
|
|
583
|
-
style="margin-right: 0.5rem;"
|
|
584
623
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
585
624
|
viewBox="0 0 24 24"
|
|
586
625
|
>
|
|
@@ -599,9 +638,8 @@ exports[`<PluginStoreWidget /> renders with the available plugins 1`] = `
|
|
|
599
638
|
>
|
|
600
639
|
<svg
|
|
601
640
|
aria-hidden="true"
|
|
602
|
-
class="MuiSvgIcon-root"
|
|
641
|
+
class="MuiSvgIcon-root makeStyles-lockedPluginTooltip"
|
|
603
642
|
focusable="false"
|
|
604
|
-
style="margin-right: 0.5rem;"
|
|
605
643
|
title="This plugin was installed by an administrator, you cannot remove it."
|
|
606
644
|
viewBox="0 0 24 24"
|
|
607
645
|
>
|
|
@@ -14,6 +14,7 @@ const mockRootModel = {
|
|
|
14
14
|
type: 'testSeqAdapter',
|
|
15
15
|
twoBitLocation: {
|
|
16
16
|
uri: 'test.2bit',
|
|
17
|
+
locationType: 'UriLocation',
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
20
|
},
|
|
@@ -22,108 +23,33 @@ const mockRootModel = {
|
|
|
22
23
|
setDefaultSessionConf: jest.fn(),
|
|
23
24
|
},
|
|
24
25
|
session: {
|
|
25
|
-
savedSessions:
|
|
26
|
+
savedSessions: [],
|
|
27
|
+
notify: jest.fn(),
|
|
26
28
|
},
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
describe('SetDefaultSession GUI', () => {
|
|
30
|
-
it('renders succesfully', () => {
|
|
31
|
-
const { getByText } = render(
|
|
32
|
-
<SetDefaultSession
|
|
33
|
-
rootModel={mockRootModel}
|
|
34
|
-
open
|
|
35
|
-
onClose={() => {}}
|
|
36
|
-
currentDefault="New session"
|
|
37
|
-
/>,
|
|
38
|
-
)
|
|
39
|
-
expect(getByText('Set Default Session')).toBeTruthy()
|
|
40
|
-
})
|
|
41
|
-
|
|
42
32
|
it('closes when the return button is clicked', () => {
|
|
43
33
|
const onClose = jest.fn()
|
|
44
34
|
const { getByText } = render(
|
|
45
|
-
<SetDefaultSession
|
|
46
|
-
rootModel={mockRootModel}
|
|
47
|
-
open
|
|
48
|
-
onClose={onClose}
|
|
49
|
-
currentDefault="New session"
|
|
50
|
-
/>,
|
|
35
|
+
<SetDefaultSession rootModel={mockRootModel} onClose={onClose} />,
|
|
51
36
|
)
|
|
52
|
-
fireEvent.click(getByText('
|
|
37
|
+
fireEvent.click(getByText('Cancel'))
|
|
53
38
|
expect(onClose).toHaveBeenCalled()
|
|
54
39
|
})
|
|
55
40
|
|
|
56
|
-
it('shows no sessions if none are saved', () => {
|
|
57
|
-
const { getByText } = render(
|
|
58
|
-
<SetDefaultSession
|
|
59
|
-
rootModel={mockRootModel}
|
|
60
|
-
open
|
|
61
|
-
onClose={() => {}}
|
|
62
|
-
currentDefault="New session"
|
|
63
|
-
/>,
|
|
64
|
-
)
|
|
65
|
-
expect(getByText('No saved sessions found')).toBeTruthy()
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
it('lists the saved sessions', () => {
|
|
69
|
-
const MockSavedSessions = {
|
|
70
|
-
...mockRootModel,
|
|
71
|
-
session: {
|
|
72
|
-
savedSessions: [
|
|
73
|
-
{
|
|
74
|
-
name: `New session`,
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
}
|
|
79
|
-
const { getByText } = render(
|
|
80
|
-
<SetDefaultSession
|
|
81
|
-
rootModel={MockSavedSessions}
|
|
82
|
-
open
|
|
83
|
-
onClose={() => {}}
|
|
84
|
-
currentDefault="New session"
|
|
85
|
-
/>,
|
|
86
|
-
)
|
|
87
|
-
expect(getByText('New session')).toBeTruthy()
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
it('sets to the default session when checked', () => {
|
|
91
|
-
const MockSession = {
|
|
92
|
-
...mockRootModel,
|
|
93
|
-
session: {
|
|
94
|
-
name: `Moo session`,
|
|
95
|
-
savedSessions: [],
|
|
96
|
-
notify: jest.fn(),
|
|
97
|
-
},
|
|
98
|
-
}
|
|
99
|
-
const { getByRole } = render(
|
|
100
|
-
<SetDefaultSession
|
|
101
|
-
rootModel={MockSession}
|
|
102
|
-
open
|
|
103
|
-
onClose={() => {}}
|
|
104
|
-
currentDefault="New session"
|
|
105
|
-
/>,
|
|
106
|
-
)
|
|
107
|
-
fireEvent.click(getByRole('radio'))
|
|
108
|
-
expect(MockSession.jbrowse.setDefaultSessionConf).toHaveBeenCalled()
|
|
109
|
-
})
|
|
110
|
-
|
|
111
41
|
it('unsets to the default session with reset button', () => {
|
|
112
42
|
const MockSession = {
|
|
113
43
|
...mockRootModel,
|
|
114
44
|
session: {
|
|
45
|
+
...mockRootModel.session,
|
|
115
46
|
name: `Moo session`,
|
|
116
47
|
savedSessions: [],
|
|
117
48
|
notify: jest.fn(),
|
|
118
49
|
},
|
|
119
50
|
}
|
|
120
51
|
const { getByText } = render(
|
|
121
|
-
<SetDefaultSession
|
|
122
|
-
rootModel={MockSession}
|
|
123
|
-
open
|
|
124
|
-
onClose={() => {}}
|
|
125
|
-
currentDefault="New session"
|
|
126
|
-
/>,
|
|
52
|
+
<SetDefaultSession rootModel={MockSession} onClose={() => {}} />,
|
|
127
53
|
)
|
|
128
54
|
fireEvent.click(getByText('Clear default session'))
|
|
129
55
|
expect(MockSession.jbrowse.setDefaultSessionConf).toHaveBeenCalledWith({
|