foreman_snapshot_management 4.2.2 → 4.4.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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/foreman_snapshot_management/version.rb +1 -1
  3. data/webpack/components/SnapshotManagement/SnapshotManagementReducer.js +0 -7
  4. data/webpack/components/SnapshotManagement/SnapshotManagementSelectors.js +0 -1
  5. data/webpack/components/SnapshotManagement/__tests__/SnapshotManagement.test.js +35 -0
  6. data/webpack/components/SnapshotManagement/__tests__/__snapshots__/SnapshotManagementReducer.test.js.snap +0 -3
  7. data/webpack/components/SnapshotManagement/components/SnapshotForm/SnapshotForm.js +39 -74
  8. data/webpack/components/SnapshotManagement/components/SnapshotForm/SnapshotFormField.js +62 -0
  9. data/webpack/components/SnapshotManagement/components/SnapshotForm/SnapshotFormHelper.js +64 -0
  10. data/webpack/components/SnapshotManagement/components/SnapshotForm/__tests__/SnapshotForm.test.js +72 -24
  11. data/webpack/components/SnapshotManagement/components/SnapshotFormModal/SnapshotFormModal.js +40 -28
  12. data/webpack/components/SnapshotManagement/components/SnapshotFormModal/__tests__/SnapshotFormModal.test.js +37 -9
  13. data/webpack/components/SnapshotManagement/components/SnapshotFormModal/index.js +8 -2
  14. data/webpack/components/SnapshotManagement/components/SnapshotFormModal/useSnapshotFormModal.js +11 -2
  15. data/webpack/components/SnapshotManagement/components/SnapshotList/SnapshotList.js +185 -229
  16. data/webpack/components/SnapshotManagement/components/SnapshotList/SnapshotListHelper.js +55 -22
  17. data/webpack/components/SnapshotManagement/components/SnapshotList/__tests__/SnapshotList.test.js +73 -54
  18. data/webpack/components/SnapshotManagement/components/SnapshotList/snapshotList.scss +6 -0
  19. data/webpack/components/SnapshotManagement/index.js +0 -1
  20. data/webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js +28 -17
  21. data/webpack/global_index.js +6 -3
  22. data/webpack/global_test_setup.js +3 -1
  23. data/webpack/test_setup.js +0 -5
  24. metadata +6 -7
  25. data/webpack/components/SnapshotManagement/components/SnapshotForm/__tests__/__snapshots__/SnapshotForm.test.js.snap +0 -571
  26. data/webpack/components/SnapshotManagement/components/SnapshotFormModal/__tests__/__snapshots__/SnapshotFormModal.test.js.snap +0 -44
  27. data/webpack/components/SnapshotManagement/components/SnapshotList/__tests__/__snapshots__/SnapshotList.test.js.snap +0 -1081
  28. data/webpack/components/SnapshotManagementCard/__tests__/__snapshots__/SnapshotManagementCard.test.js.snap +0 -122
@@ -1,571 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`SnapshotForm rendering render 1`] = `
4
- <Formik
5
- enableReinitialize={false}
6
- initialValues={
7
- Object {
8
- "description": "",
9
- "includeRam": false,
10
- "name": "",
11
- "useQuiesce": false,
12
- }
13
- }
14
- isInitialValid={false}
15
- onSubmit={[Function]}
16
- validateOnBlur={true}
17
- validateOnChange={true}
18
- validationSchema={
19
- ObjectSchema {
20
- "_blacklist": RefSet {
21
- "list": Array [],
22
- "refs": Array [],
23
- },
24
- "_conditions": Array [],
25
- "_defaultDefault": [Function],
26
- "_deps": Array [],
27
- "_excludedEdges": Array [],
28
- "_exclusive": Object {},
29
- "_mutate": undefined,
30
- "_nodes": Array [
31
- "snapshotMode",
32
- "useQuiesce",
33
- "includeRam",
34
- "description",
35
- "name",
36
- ],
37
- "_options": Object {
38
- "abortEarly": true,
39
- "recursive": true,
40
- },
41
- "_type": "object",
42
- "_typeError": [Function],
43
- "_whitelist": RefSet {
44
- "list": Array [],
45
- "refs": Array [],
46
- },
47
- "fields": Object {
48
- "description": StringSchema {
49
- "_blacklist": RefSet {
50
- "list": Array [],
51
- "refs": Array [],
52
- },
53
- "_conditions": Array [],
54
- "_deps": Array [],
55
- "_exclusive": Object {},
56
- "_mutate": undefined,
57
- "_options": Object {
58
- "abortEarly": true,
59
- "recursive": true,
60
- },
61
- "_type": "string",
62
- "_typeError": [Function],
63
- "_whitelist": RefSet {
64
- "list": Array [],
65
- "refs": Array [],
66
- },
67
- "tests": Array [],
68
- "transforms": Array [
69
- [Function],
70
- ],
71
- "type": "string",
72
- },
73
- "includeRam": BooleanSchema {
74
- "_blacklist": RefSet {
75
- "list": Array [],
76
- "refs": Array [],
77
- },
78
- "_conditions": Array [],
79
- "_deps": Array [],
80
- "_exclusive": Object {},
81
- "_mutate": undefined,
82
- "_options": Object {
83
- "abortEarly": true,
84
- "recursive": true,
85
- },
86
- "_type": "boolean",
87
- "_typeError": [Function],
88
- "_whitelist": RefSet {
89
- "list": Array [],
90
- "refs": Array [],
91
- },
92
- "tests": Array [],
93
- "transforms": Array [
94
- [Function],
95
- ],
96
- "type": "boolean",
97
- },
98
- "name": StringSchema {
99
- "_blacklist": RefSet {
100
- "list": Array [],
101
- "refs": Array [],
102
- },
103
- "_conditions": Array [],
104
- "_deps": Array [],
105
- "_exclusive": Object {
106
- "max": true,
107
- "required": true,
108
- },
109
- "_mutate": undefined,
110
- "_options": Object {
111
- "abortEarly": true,
112
- "recursive": true,
113
- },
114
- "_type": "string",
115
- "_typeError": [Function],
116
- "_whitelist": RefSet {
117
- "list": Array [],
118
- "refs": Array [],
119
- },
120
- "tests": Array [
121
- [Function],
122
- [Function],
123
- ],
124
- "transforms": Array [
125
- [Function],
126
- ],
127
- "type": "string",
128
- },
129
- "snapshotMode": StringSchema {
130
- "_blacklist": RefSet {
131
- "list": Array [],
132
- "refs": Array [],
133
- },
134
- "_conditions": Array [],
135
- "_deps": Array [],
136
- "_exclusive": Object {},
137
- "_mutate": undefined,
138
- "_options": Object {
139
- "abortEarly": true,
140
- "recursive": true,
141
- },
142
- "_type": "string",
143
- "_typeError": [Function],
144
- "_whitelist": RefSet {
145
- "list": Array [],
146
- "refs": Array [],
147
- },
148
- "tests": Array [],
149
- "transforms": Array [
150
- [Function],
151
- ],
152
- "type": "string",
153
- },
154
- "useQuiesce": BooleanSchema {
155
- "_blacklist": RefSet {
156
- "list": Array [],
157
- "refs": Array [],
158
- },
159
- "_conditions": Array [],
160
- "_deps": Array [],
161
- "_exclusive": Object {},
162
- "_mutate": undefined,
163
- "_options": Object {
164
- "abortEarly": true,
165
- "recursive": true,
166
- },
167
- "_type": "boolean",
168
- "_typeError": [Function],
169
- "_whitelist": RefSet {
170
- "list": Array [],
171
- "refs": Array [],
172
- },
173
- "tests": Array [],
174
- "transforms": Array [
175
- [Function],
176
- ],
177
- "type": "boolean",
178
- },
179
- },
180
- "tests": Array [],
181
- "transforms": Array [
182
- [Function],
183
- ],
184
- "type": "object",
185
- }
186
- }
187
- >
188
- <Component />
189
- </Formik>
190
- `;
191
-
192
- exports[`SnapshotForm rendering render with limitSnapshotNameFormat capability 1`] = `
193
- <Formik
194
- enableReinitialize={false}
195
- initialValues={
196
- Object {
197
- "description": "",
198
- "includeRam": false,
199
- "name": "",
200
- "useQuiesce": false,
201
- }
202
- }
203
- isInitialValid={false}
204
- onSubmit={[Function]}
205
- validateOnBlur={true}
206
- validateOnChange={true}
207
- validationSchema={
208
- ObjectSchema {
209
- "_blacklist": RefSet {
210
- "list": Array [],
211
- "refs": Array [],
212
- },
213
- "_conditions": Array [],
214
- "_defaultDefault": [Function],
215
- "_deps": Array [],
216
- "_excludedEdges": Array [],
217
- "_exclusive": Object {},
218
- "_mutate": undefined,
219
- "_nodes": Array [
220
- "snapshotMode",
221
- "useQuiesce",
222
- "includeRam",
223
- "description",
224
- "name",
225
- ],
226
- "_options": Object {
227
- "abortEarly": true,
228
- "recursive": true,
229
- },
230
- "_type": "object",
231
- "_typeError": [Function],
232
- "_whitelist": RefSet {
233
- "list": Array [],
234
- "refs": Array [],
235
- },
236
- "fields": Object {
237
- "description": StringSchema {
238
- "_blacklist": RefSet {
239
- "list": Array [],
240
- "refs": Array [],
241
- },
242
- "_conditions": Array [],
243
- "_deps": Array [],
244
- "_exclusive": Object {},
245
- "_mutate": undefined,
246
- "_options": Object {
247
- "abortEarly": true,
248
- "recursive": true,
249
- },
250
- "_type": "string",
251
- "_typeError": [Function],
252
- "_whitelist": RefSet {
253
- "list": Array [],
254
- "refs": Array [],
255
- },
256
- "tests": Array [],
257
- "transforms": Array [
258
- [Function],
259
- ],
260
- "type": "string",
261
- },
262
- "includeRam": BooleanSchema {
263
- "_blacklist": RefSet {
264
- "list": Array [],
265
- "refs": Array [],
266
- },
267
- "_conditions": Array [],
268
- "_deps": Array [],
269
- "_exclusive": Object {},
270
- "_mutate": undefined,
271
- "_options": Object {
272
- "abortEarly": true,
273
- "recursive": true,
274
- },
275
- "_type": "boolean",
276
- "_typeError": [Function],
277
- "_whitelist": RefSet {
278
- "list": Array [],
279
- "refs": Array [],
280
- },
281
- "tests": Array [],
282
- "transforms": Array [
283
- [Function],
284
- ],
285
- "type": "boolean",
286
- },
287
- "name": StringSchema {
288
- "_blacklist": RefSet {
289
- "list": Array [],
290
- "refs": Array [],
291
- },
292
- "_conditions": Array [],
293
- "_deps": Array [],
294
- "_exclusive": Object {
295
- "matches": false,
296
- "max": true,
297
- "min": true,
298
- "required": true,
299
- },
300
- "_mutate": undefined,
301
- "_options": Object {
302
- "abortEarly": true,
303
- "recursive": true,
304
- },
305
- "_type": "string",
306
- "_typeError": [Function],
307
- "_whitelist": RefSet {
308
- "list": Array [],
309
- "refs": Array [],
310
- },
311
- "tests": Array [
312
- [Function],
313
- [Function],
314
- [Function],
315
- [Function],
316
- ],
317
- "transforms": Array [
318
- [Function],
319
- ],
320
- "type": "string",
321
- },
322
- "snapshotMode": StringSchema {
323
- "_blacklist": RefSet {
324
- "list": Array [],
325
- "refs": Array [],
326
- },
327
- "_conditions": Array [],
328
- "_deps": Array [],
329
- "_exclusive": Object {},
330
- "_mutate": undefined,
331
- "_options": Object {
332
- "abortEarly": true,
333
- "recursive": true,
334
- },
335
- "_type": "string",
336
- "_typeError": [Function],
337
- "_whitelist": RefSet {
338
- "list": Array [],
339
- "refs": Array [],
340
- },
341
- "tests": Array [],
342
- "transforms": Array [
343
- [Function],
344
- ],
345
- "type": "string",
346
- },
347
- "useQuiesce": BooleanSchema {
348
- "_blacklist": RefSet {
349
- "list": Array [],
350
- "refs": Array [],
351
- },
352
- "_conditions": Array [],
353
- "_deps": Array [],
354
- "_exclusive": Object {},
355
- "_mutate": undefined,
356
- "_options": Object {
357
- "abortEarly": true,
358
- "recursive": true,
359
- },
360
- "_type": "boolean",
361
- "_typeError": [Function],
362
- "_whitelist": RefSet {
363
- "list": Array [],
364
- "refs": Array [],
365
- },
366
- "tests": Array [],
367
- "transforms": Array [
368
- [Function],
369
- ],
370
- "type": "boolean",
371
- },
372
- },
373
- "tests": Array [],
374
- "transforms": Array [
375
- [Function],
376
- ],
377
- "type": "object",
378
- }
379
- }
380
- >
381
- <Component />
382
- </Formik>
383
- `;
384
-
385
- exports[`SnapshotForm rendering render with optional Props 1`] = `
386
- <Formik
387
- enableReinitialize={false}
388
- initialValues={
389
- Object {
390
- "description": "Hello World",
391
- "includeRam": true,
392
- "name": "Snapshot1",
393
- }
394
- }
395
- isInitialValid={false}
396
- onSubmit={[Function]}
397
- validateOnBlur={true}
398
- validateOnChange={true}
399
- validationSchema={
400
- ObjectSchema {
401
- "_blacklist": RefSet {
402
- "list": Array [],
403
- "refs": Array [],
404
- },
405
- "_conditions": Array [],
406
- "_defaultDefault": [Function],
407
- "_deps": Array [],
408
- "_excludedEdges": Array [],
409
- "_exclusive": Object {},
410
- "_mutate": undefined,
411
- "_nodes": Array [
412
- "snapshotMode",
413
- "useQuiesce",
414
- "includeRam",
415
- "description",
416
- "name",
417
- ],
418
- "_options": Object {
419
- "abortEarly": true,
420
- "recursive": true,
421
- },
422
- "_type": "object",
423
- "_typeError": [Function],
424
- "_whitelist": RefSet {
425
- "list": Array [],
426
- "refs": Array [],
427
- },
428
- "fields": Object {
429
- "description": StringSchema {
430
- "_blacklist": RefSet {
431
- "list": Array [],
432
- "refs": Array [],
433
- },
434
- "_conditions": Array [],
435
- "_deps": Array [],
436
- "_exclusive": Object {},
437
- "_mutate": undefined,
438
- "_options": Object {
439
- "abortEarly": true,
440
- "recursive": true,
441
- },
442
- "_type": "string",
443
- "_typeError": [Function],
444
- "_whitelist": RefSet {
445
- "list": Array [],
446
- "refs": Array [],
447
- },
448
- "tests": Array [],
449
- "transforms": Array [
450
- [Function],
451
- ],
452
- "type": "string",
453
- },
454
- "includeRam": BooleanSchema {
455
- "_blacklist": RefSet {
456
- "list": Array [],
457
- "refs": Array [],
458
- },
459
- "_conditions": Array [],
460
- "_deps": Array [],
461
- "_exclusive": Object {},
462
- "_mutate": undefined,
463
- "_options": Object {
464
- "abortEarly": true,
465
- "recursive": true,
466
- },
467
- "_type": "boolean",
468
- "_typeError": [Function],
469
- "_whitelist": RefSet {
470
- "list": Array [],
471
- "refs": Array [],
472
- },
473
- "tests": Array [],
474
- "transforms": Array [
475
- [Function],
476
- ],
477
- "type": "boolean",
478
- },
479
- "name": StringSchema {
480
- "_blacklist": RefSet {
481
- "list": Array [],
482
- "refs": Array [],
483
- },
484
- "_conditions": Array [],
485
- "_deps": Array [],
486
- "_exclusive": Object {
487
- "max": true,
488
- "required": true,
489
- },
490
- "_mutate": undefined,
491
- "_options": Object {
492
- "abortEarly": true,
493
- "recursive": true,
494
- },
495
- "_type": "string",
496
- "_typeError": [Function],
497
- "_whitelist": RefSet {
498
- "list": Array [],
499
- "refs": Array [],
500
- },
501
- "tests": Array [
502
- [Function],
503
- [Function],
504
- ],
505
- "transforms": Array [
506
- [Function],
507
- ],
508
- "type": "string",
509
- },
510
- "snapshotMode": StringSchema {
511
- "_blacklist": RefSet {
512
- "list": Array [],
513
- "refs": Array [],
514
- },
515
- "_conditions": Array [],
516
- "_deps": Array [],
517
- "_exclusive": Object {},
518
- "_mutate": undefined,
519
- "_options": Object {
520
- "abortEarly": true,
521
- "recursive": true,
522
- },
523
- "_type": "string",
524
- "_typeError": [Function],
525
- "_whitelist": RefSet {
526
- "list": Array [],
527
- "refs": Array [],
528
- },
529
- "tests": Array [],
530
- "transforms": Array [
531
- [Function],
532
- ],
533
- "type": "string",
534
- },
535
- "useQuiesce": BooleanSchema {
536
- "_blacklist": RefSet {
537
- "list": Array [],
538
- "refs": Array [],
539
- },
540
- "_conditions": Array [],
541
- "_deps": Array [],
542
- "_exclusive": Object {},
543
- "_mutate": undefined,
544
- "_options": Object {
545
- "abortEarly": true,
546
- "recursive": true,
547
- },
548
- "_type": "boolean",
549
- "_typeError": [Function],
550
- "_whitelist": RefSet {
551
- "list": Array [],
552
- "refs": Array [],
553
- },
554
- "tests": Array [],
555
- "transforms": Array [
556
- [Function],
557
- ],
558
- "type": "boolean",
559
- },
560
- },
561
- "tests": Array [],
562
- "transforms": Array [
563
- [Function],
564
- ],
565
- "type": "object",
566
- }
567
- }
568
- >
569
- <Component />
570
- </Formik>
571
- `;
@@ -1,44 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`SnapshotFormModal renders normal 1`] = `
4
- <ConnectedForemanModal
5
- enforceFocus={true}
6
- id="foremanSnapshotMgmtSnapshotFormModal"
7
- ouiaId="snapshot-form-modal"
8
- title=""
9
- >
10
- <ForemanModalHeader
11
- closeButton={false}
12
- >
13
- <TextContent
14
- className="pf-v5-u-mb-md"
15
- >
16
- <Title
17
- headingLevel="h1"
18
- ouiaId="snapshot-modal-title"
19
- size="3xl"
20
- >
21
- Create snapshot
22
- </Title>
23
- <Text
24
- className="pf-v5-u-color-200 pf-v5-u-font-size-sm pf-v5-u-mt-sm"
25
- component="small"
26
- ouiaId="snapshot-modal-hosts-count"
27
- >
28
- 1 host is selected for snapshot creation
29
- </Text>
30
- </TextContent>
31
- </ForemanModalHeader>
32
- <WrappedSnapshotForm
33
- fetchBulkParams={[Function]}
34
- host={
35
- Object {
36
- "id": 42,
37
- "name": "deep.thought",
38
- }
39
- }
40
- selectedHosts={Array []}
41
- setModalClosed={[Function]}
42
- />
43
- </ConnectedForemanModal>
44
- `;