foreman_rh_cloud 13.2.10 → 13.2.11

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/concerns/rh_cloud_host.rb +36 -1
  3. data/app/services/foreman_rh_cloud/url_remediations_retriever.rb +19 -5
  4. data/lib/foreman_inventory_upload/async/upload_report_direct_job.rb +2 -0
  5. data/lib/foreman_rh_cloud/version.rb +1 -1
  6. data/package.json +1 -1
  7. data/test/jobs/upload_report_direct_job_test.rb +29 -0
  8. data/test/unit/insights_facet_test.rb +5 -0
  9. data/test/unit/rh_cloud_host_test.rb +68 -0
  10. data/test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb +82 -5
  11. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js +10 -9
  12. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +13 -9
  13. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +20 -9
  14. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +31 -8
  15. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +26 -10
  16. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +33 -9
  17. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +55 -35
  18. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +13 -9
  19. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js +12 -15
  20. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js +32 -12
  21. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js +15 -7
  22. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorButton.test.js +47 -18
  23. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.test.js +58 -15
  24. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js +23 -9
  25. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js +19 -17
  26. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/integrations.test.js +25 -37
  27. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +28 -8
  28. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +25 -8
  29. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +11 -9
  30. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +11 -9
  31. data/webpack/ForemanInventoryUpload/ForemanInventoryHelpers.js +4 -4
  32. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +33 -12
  33. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js +36 -8
  34. metadata +1 -42
  35. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap +0 -18
  36. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/__snapshots__/EmptyState.test.js.snap +0 -25
  37. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/__snapshots__/ErrorState.test.js.snap +0 -20
  38. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +0 -47
  39. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +0 -59
  40. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +0 -34
  41. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +0 -14
  42. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +0 -25
  43. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap +0 -49
  44. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap +0 -86
  45. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap +0 -75
  46. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap +0 -46
  47. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/__snapshots__/FileDownload.test.js.snap +0 -26
  48. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js +0 -14
  49. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js +0 -28
  50. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js +0 -21
  51. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +0 -21
  52. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap +0 -17
  53. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap +0 -19
  54. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap +0 -9
  55. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap +0 -43
  56. data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/AdvancedSettingActions.test.js +0 -9
  57. data/webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/__snapshots__/AdvancedSettingActions.test.js.snap +0 -18
  58. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettingsActions.test.js +0 -14
  59. data/webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettingsActions.test.js.snap +0 -26
  60. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +0 -68
  61. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorActions.test.js +0 -9
  62. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorActions.test.js.snap +0 -11
  63. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +0 -59
  64. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap +0 -32
  65. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -15
  66. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap +0 -3
  67. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/integrations.test.js.snap +0 -58
  68. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap +0 -23
  69. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap +0 -74
  70. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/__snapshots__/TabContainer.test.js.snap +0 -18
  71. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/__snapshots__/TabFooter.test.js.snap +0 -12
  72. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +0 -96
  73. data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js +0 -10
  74. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap +0 -5
  75. data/webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap +0 -14
@@ -1,13 +1,15 @@
1
- import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
-
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
3
  import TabFooter from '../TabFooter';
4
4
 
5
- const fixtures = {
6
- 'render without Props': {},
7
- /** fixtures, props for the component */
8
- };
9
-
10
5
  describe('TabFooter', () => {
11
- describe('rendering', () =>
12
- testComponentSnapshotsWithFixtures(TabFooter, fixtures));
6
+ it('renders children', () => {
7
+ render(<TabFooter><span>Footer content</span></TabFooter>);
8
+ expect(screen.getByText('Footer content')).toBeTruthy();
9
+ });
10
+
11
+ it('renders with the tab-footer class', () => {
12
+ const { container } = render(<TabFooter />);
13
+ expect(container.querySelector('.tab-footer')).toBeTruthy();
14
+ });
13
15
  });
@@ -1,14 +1,14 @@
1
1
  import URI from 'urijs';
2
+ import { getDocsURL } from 'foremanReact/common/helpers';
2
3
  import { foremanUrl } from '../ForemanRhCloudHelpers';
3
4
 
4
5
  export const inventoryUrl = path =>
5
6
  foremanUrl(`/foreman_inventory_upload/${path}`);
6
7
 
7
8
  export const getInventoryDocsUrl = () =>
8
- foremanUrl(
9
- `/links/manual/?root_url=${URI.encode(
10
- 'https://docs.redhat.com/en/documentation/red_hat_lightspeed/1-latest/html-single/red_hat_lightspeed_remediations_guide/index'
11
- )}`
9
+ getDocsURL(
10
+ 'Managing_Hosts',
11
+ 'configuring-foreman-server-for-cloud-connection'
12
12
  );
13
13
 
14
14
  export const getSubscriptionServiceDocsUrl = () =>
@@ -1,17 +1,38 @@
1
- import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
- import { noop } from 'foremanReact/common/helpers';
3
-
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
4
3
  import InventoryAutoUpload from '../InventoryAutoUpload';
5
4
 
6
- const fixtures = {
7
- 'render with props': {
8
- autoUploadEnabled: true,
9
- setSetting: noop,
10
- getSettings: noop,
11
- },
12
- };
5
+ jest.mock(
6
+ '../../../Components/InventorySettings/InventorySettings',
7
+ () => () => <div data-testid="inventory-settings">InventorySettings</div>
8
+ );
13
9
 
14
10
  describe('InventoryAutoUpload', () => {
15
- describe('rendering', () =>
16
- testComponentSnapshotsWithFixtures(InventoryAutoUpload, fixtures));
11
+ const buildProps = (overrides = {}) => ({
12
+ autoUploadEnabled: true,
13
+ setSetting: jest.fn(),
14
+ getSettings: jest.fn(),
15
+ ...overrides,
16
+ });
17
+
18
+ it('renders the heading', () => {
19
+ render(<InventoryAutoUpload {...buildProps()} />);
20
+ expect(screen.getByText('Red Hat Cloud Inventory')).toBeTruthy();
21
+ });
22
+
23
+ it('renders the auto upload switcher', () => {
24
+ render(<InventoryAutoUpload {...buildProps()} />);
25
+ expect(screen.getByText('Inventory Auto Upload')).toBeTruthy();
26
+ });
27
+
28
+ it('renders the advanced settings button', () => {
29
+ render(<InventoryAutoUpload {...buildProps()} />);
30
+ expect(screen.getByRole('button', { name: /Show Advanced Settings/ })).toBeTruthy();
31
+ });
32
+
33
+ it('calls getSettings on mount', () => {
34
+ const props = buildProps();
35
+ render(<InventoryAutoUpload {...props} />);
36
+ expect(props.getSettings).toHaveBeenCalled();
37
+ });
17
38
  });
@@ -1,10 +1,38 @@
1
- import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
- import { inventoryUrl, getInventoryDocsUrl } from '../ForemanInventoryHelpers';
1
+ jest.mock('foremanReact/common/helpers', () => ({
2
+ getDocsURL: jest.fn(),
3
+ }));
3
4
 
4
- const fixtures = {
5
- 'should return inventory Url': () => inventoryUrl('test_path'),
6
- 'should return inventory docs url': () => getInventoryDocsUrl(),
7
- };
5
+ import { getDocsURL } from 'foremanReact/common/helpers';
6
+ import { getInventoryDocsUrl, isExitCodeLoading } from '../ForemanInventoryHelpers';
8
7
 
9
- describe('ForemanInventoryUpload helpers', () =>
10
- testSelectorsSnapshotWithFixtures(fixtures));
8
+ describe('ForemanInventoryUpload helpers', () => {
9
+ describe('getInventoryDocsUrl', () => {
10
+ it('requests the Managing Hosts guide at the cloud connection chapter', () => {
11
+ getInventoryDocsUrl();
12
+ expect(getDocsURL).toHaveBeenCalledWith(
13
+ 'Managing_Hosts',
14
+ 'configuring-foreman-server-for-cloud-connection'
15
+ );
16
+ });
17
+ });
18
+
19
+ describe('isExitCodeLoading', () => {
20
+ it('returns true when exit code contains "running"', () => {
21
+ expect(isExitCodeLoading('currently running')).toBe(true);
22
+ });
23
+
24
+ it('returns true when exit code contains "restarting"', () => {
25
+ expect(isExitCodeLoading('restarting now')).toBe(true);
26
+ });
27
+
28
+ it('is case-insensitive', () => {
29
+ expect(isExitCodeLoading('RUNNING')).toBe(true);
30
+ expect(isExitCodeLoading('Restarting')).toBe(true);
31
+ });
32
+
33
+ it('returns false when exit code contains neither', () => {
34
+ expect(isExitCodeLoading('exit 0')).toBe(false);
35
+ expect(isExitCodeLoading('completed')).toBe(false);
36
+ });
37
+ });
38
+ });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.2.10
4
+ version: 13.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
@@ -328,45 +328,33 @@ files:
328
328
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountListSelectors.js
329
329
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/EmptyResults.js
330
330
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/EmptyResults.test.js
331
- - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/__tests__/__snapshots__/EmptyResults.test.js.snap
332
331
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/emptyResults.scss
333
332
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/index.js
334
333
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.fixtures.js
335
334
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.js
336
335
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyStateHelper.js
337
336
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js
338
- - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/__snapshots__/EmptyState.test.js.snap
339
337
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/emptyState.scss
340
338
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/index.js
341
339
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorState.fixtures.js
342
340
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorState.js
343
341
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorStateHelper.js
344
342
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js
345
- - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/__snapshots__/ErrorState.test.js.snap
346
343
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/errorState.scss
347
344
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/index.js
348
345
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.fixtures.js
349
346
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItem.js
350
347
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/ListItemHelper.js
351
348
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js
352
- - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap
353
349
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/index.js
354
350
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.fixtures.js
355
351
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
356
352
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatusHelper.js
357
353
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js
358
- - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap
359
354
  - webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/index.js
360
355
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js
361
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
362
356
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListHelper.test.js
363
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js
364
357
  - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js
365
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js
366
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountList.test.js.snap
367
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListActions.test.js.snap
368
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListReducer.test.js.snap
369
- - webpack/ForemanInventoryUpload/Components/AccountList/__tests__/__snapshots__/AccountListSelectors.test.js.snap
370
358
  - webpack/ForemanInventoryUpload/Components/AccountList/accountList.scss
371
359
  - webpack/ForemanInventoryUpload/Components/AccountList/index.js
372
360
  - webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js
@@ -380,7 +368,6 @@ files:
380
368
  - webpack/ForemanInventoryUpload/Components/FileDownload/FileDownload.js
381
369
  - webpack/ForemanInventoryUpload/Components/FileDownload/FileDownloadHelper.js
382
370
  - webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js
383
- - webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/__snapshots__/FileDownload.test.js.snap
384
371
  - webpack/ForemanInventoryUpload/Components/FileDownload/fileDownload.scss
385
372
  - webpack/ForemanInventoryUpload/Components/FileDownload/index.js
386
373
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/ClearButton.js
@@ -392,21 +379,11 @@ files:
392
379
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterReducer.js
393
380
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilterSelectors.js
394
381
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilter.test.js
395
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterActions.test.js
396
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
397
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterSelectors.test.js
398
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap
399
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterActions.test.js.snap
400
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterReducer.test.js.snap
401
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilterSelectors.test.js.snap
402
- - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/integration.test.js.snap
403
382
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js
404
383
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/index.js
405
384
  - webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss
406
385
  - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/AdvancedSettingActions.js
407
386
  - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/AdvancedSettingsConstants.js
408
- - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/AdvancedSettingActions.test.js
409
- - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/__tests__/__snapshots__/AdvancedSettingActions.test.js.snap
410
387
  - webpack/ForemanInventoryUpload/Components/InventorySettings/AdvancedSetting/index.js
411
388
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.js
412
389
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.scss
@@ -414,8 +391,6 @@ files:
414
391
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettingsConstants.js
415
392
  - webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettingsSelectors.js
416
393
  - webpack/ForemanInventoryUpload/Components/InventorySettings/MinimalInventoryDropdown.js
417
- - webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/InventorySettingsActions.test.js
418
- - webpack/ForemanInventoryUpload/Components/InventorySettings/__tests__/__snapshots__/InventorySettingsActions.test.js.snap
419
394
  - webpack/ForemanInventoryUpload/Components/InventorySettings/index.js
420
395
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js
421
396
  - webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.js
@@ -428,15 +403,11 @@ files:
428
403
  - webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js
429
404
  - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js
430
405
  - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js
431
- - webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap
432
406
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorActions.js
433
407
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorButton.js
434
408
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorConstants.js
435
409
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorSelectors.js
436
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorActions.test.js
437
410
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/CloudConnectorButton.test.js
438
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorActions.test.js.snap
439
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap
440
411
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/index.js
441
412
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js
442
413
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js
@@ -444,7 +415,6 @@ files:
444
415
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/index.js
445
416
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.js
446
417
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.test.js
447
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap
448
418
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/index.js
449
419
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js
450
420
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js
@@ -453,9 +423,6 @@ files:
453
423
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js
454
424
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonFixtures.js
455
425
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButtonSelectors.test.js
456
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap
457
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButtonSelectors.test.js.snap
458
- - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/integrations.test.js.snap
459
426
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/integrations.test.js
460
427
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
461
428
  - webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/__tests__/Toast.test.js
@@ -469,28 +436,24 @@ files:
469
436
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRun.js
470
437
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRunHelper.js
471
438
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js
472
- - webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/__snapshots__/ScheduledRun.test.js.snap
473
439
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/index.js
474
440
  - webpack/ForemanInventoryUpload/Components/ScheduledRun/scheduledRun.scss
475
441
  - webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.fixtures.js
476
442
  - webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.js
477
443
  - webpack/ForemanInventoryUpload/Components/StatusChart/StatusChartHelper.js
478
444
  - webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js
479
- - webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/__snapshots__/StatusChart.test.js.snap
480
445
  - webpack/ForemanInventoryUpload/Components/StatusChart/index.js
481
446
  - webpack/ForemanInventoryUpload/Components/StatusChart/statusChart.scss
482
447
  - webpack/ForemanInventoryUpload/Components/TabContainer/TabContainer.fixtures.js
483
448
  - webpack/ForemanInventoryUpload/Components/TabContainer/TabContainer.js
484
449
  - webpack/ForemanInventoryUpload/Components/TabContainer/TabContainerHelper.js
485
450
  - webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js
486
- - webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/__snapshots__/TabContainer.test.js.snap
487
451
  - webpack/ForemanInventoryUpload/Components/TabContainer/index.js
488
452
  - webpack/ForemanInventoryUpload/Components/TabContainer/tabContainer.scss
489
453
  - webpack/ForemanInventoryUpload/Components/TabFooter/TabFooter.fixtures.js
490
454
  - webpack/ForemanInventoryUpload/Components/TabFooter/TabFooter.js
491
455
  - webpack/ForemanInventoryUpload/Components/TabFooter/TabFooterHelper.js
492
456
  - webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js
493
- - webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/__snapshots__/TabFooter.test.js.snap
494
457
  - webpack/ForemanInventoryUpload/Components/TabFooter/index.js
495
458
  - webpack/ForemanInventoryUpload/Components/TabFooter/tabFooter.scss
496
459
  - webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.fixtures.js
@@ -511,12 +474,8 @@ files:
511
474
  - webpack/ForemanInventoryUpload/ForemanInventoryUploadReducers.js
512
475
  - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js
513
476
  - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js
514
- - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap
515
477
  - webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/index.js
516
478
  - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js
517
- - webpack/ForemanInventoryUpload/__tests__/ForemanInventoryUpload.test.js
518
- - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryHelpers.test.js.snap
519
- - webpack/ForemanInventoryUpload/__tests__/__snapshots__/ForemanInventoryUpload.test.js.snap
520
479
  - webpack/ForemanInventoryUpload/index.js
521
480
  - webpack/ForemanRhCloudFills.js
522
481
  - webpack/ForemanRhCloudHelpers.js
@@ -1,18 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`EmptyResults rendering render without Props 1`] = `
4
- <EmptyState
5
- className=""
6
- >
7
- <EmptyStateTitle
8
- className=""
9
- >
10
- <Icon
11
- className="no_results_icon"
12
- name="meh-o"
13
- type="fa"
14
- />
15
- Oops! Couldn't find organization that matches your query
16
- </EmptyStateTitle>
17
- </EmptyState>
18
- `;
@@ -1,25 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`EmptyState rendering render without Props 1`] = `
4
- <EmptyState
5
- className=""
6
- >
7
- <Spinner
8
- className=""
9
- inline={true}
10
- inverse={false}
11
- loading={true}
12
- size="lg"
13
- />
14
- <EmptyStateTitle
15
- className=""
16
- >
17
- Fetching data about your accounts
18
- </EmptyStateTitle>
19
- <EmptyStateInfo
20
- className=""
21
- >
22
- Loading...
23
- </EmptyStateInfo>
24
- </EmptyState>
25
- `;
@@ -1,20 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ErrorState rendering render without Props 1`] = `
4
- <div
5
- className="error_state"
6
- >
7
- <Icon
8
- className="error_icon"
9
- name="times"
10
- size="2x"
11
- type="fa"
12
- />
13
- <p>
14
- Encountered an error while trying to access the server:
15
- </p>
16
- <p
17
- className="error_description"
18
- />
19
- </div>
20
- `;
@@ -1,47 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ListItem rendering render with Props 1`] = `
4
- <AccordionItem>
5
- <AccordionToggle
6
- isExpanded={false}
7
- onClick={[Function]}
8
- >
9
- <span>
10
- <Label
11
- className="account-icon"
12
- color="blue"
13
- icon={<UserIcon />}
14
- variant="outline"
15
- />
16
- test
17
- </span>
18
- <ListItemStatus
19
- account={
20
- Object {
21
- "generated_status": "unknown",
22
- "id": 1,
23
- "report_file_paths": Array [],
24
- "uploaded_status": "unknown",
25
- }
26
- }
27
- key="test_status"
28
- />
29
- </AccordionToggle>
30
- <AccordionContent
31
- isHidden={true}
32
- >
33
- <Dashboard
34
- account={
35
- Object {
36
- "generated_status": "unknown",
37
- "id": 1,
38
- "report_file_paths": Array [],
39
- "uploaded_status": "unknown",
40
- }
41
- }
42
- accountID={1}
43
- onTaskStart={null}
44
- />
45
- </AccordionContent>
46
- </AccordionItem>
47
- `;
@@ -1,59 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ListItemStatus rendering render with Props 1`] = `
4
- <Grid
5
- className="status"
6
- hasGutter={true}
7
- >
8
- <GridItem
9
- className="item"
10
- span={6}
11
- >
12
- <p>
13
- Generated
14
- </p>
15
- <CheckIcon />
16
- </GridItem>
17
- <GridItem
18
- className="item"
19
- span={6}
20
- >
21
- <p>
22
- Uploaded
23
- </p>
24
- <Spinner
25
- size="sm"
26
- />
27
- </GridItem>
28
- </Grid>
29
- `;
30
-
31
- exports[`ListItemStatus rendering render without Props 1`] = `
32
- <Grid
33
- className="status"
34
- hasGutter={true}
35
- >
36
- <GridItem
37
- className="item"
38
- span={6}
39
- >
40
- <p>
41
- Generated
42
- </p>
43
- <span>
44
- --
45
- </span>
46
- </GridItem>
47
- <GridItem
48
- className="item"
49
- span={6}
50
- >
51
- <p>
52
- Uploaded
53
- </p>
54
- <span>
55
- --
56
- </span>
57
- </GridItem>
58
- </Grid>
59
- `;
@@ -1,34 +0,0 @@
1
- import { testActionSnapshotWithFixtures } from '@theforeman/test';
2
- import { API } from 'foremanReact/redux/API';
3
- import {
4
- fetchAccountsStatus,
5
- startAccountStatusPolling,
6
- stopAccountStatusPolling,
7
- restartProcess,
8
- } from '../AccountListActions';
9
- import {
10
- pollingProcessID,
11
- fetchAccountsStatusResponse,
12
- } from '../AccountList.fixtures';
13
- import { accountID, activeTab } from '../../Dashboard/Dashboard.fixtures';
14
-
15
- jest.mock('foremanReact/redux/API');
16
- API.get.mockImplementation(async () => fetchAccountsStatusResponse);
17
-
18
- const fixtures = {
19
- 'should fetchAccountsStatus': () => fetchAccountsStatus(),
20
- 'should startAccountStatusPolling': () =>
21
- startAccountStatusPolling(pollingProcessID),
22
- 'should stopAccountStatusPolling': () =>
23
- stopAccountStatusPolling(pollingProcessID),
24
- 'should restartProcess': () => restartProcess(accountID, activeTab),
25
- 'should invoke toast notification upon failure': () => {
26
- API.post.mockImplementationOnce(() =>
27
- Promise.reject(new Error('test error'))
28
- );
29
-
30
- return restartProcess(accountID, activeTab);
31
- },
32
- };
33
-
34
- describe('AccountList actions', () => testActionSnapshotWithFixtures(fixtures));
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { IntegrationTestHelper } from '@theforeman/test';
3
-
4
- import AccountList from '../index';
5
- import reducers from '../../../../ForemanRhCloudReducers';
6
-
7
- describe('AccountList integration test', () => {
8
- it('should flow', async () => {
9
- const integrationTestHelper = new IntegrationTestHelper(reducers);
10
- const component = integrationTestHelper.mount(<AccountList />);
11
- component.update();
12
- /** Create a Flow test */
13
- });
14
- });
@@ -1,25 +0,0 @@
1
- import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
- import {
3
- selectAccountsList,
4
- selectAccounts,
5
- selectPollingProcessID,
6
- } from '../AccountListSelectors';
7
- import { pollingProcessID, accounts } from '../AccountList.fixtures';
8
- import { rhCloudStateWrapper } from '../../../../ForemanRhCloudTestHelpers';
9
-
10
- const state = rhCloudStateWrapper({
11
- accountsList: {
12
- accounts,
13
- pollingProcessID,
14
- },
15
- });
16
-
17
- const fixtures = {
18
- 'should return AccountsList': () => selectAccountsList(state),
19
- 'should return AccountList accounts': () => selectAccounts(state),
20
- 'should return AccountList pollingProcessID': () =>
21
- selectPollingProcessID(state),
22
- };
23
-
24
- describe('AccountList selectors', () =>
25
- testSelectorsSnapshotWithFixtures(fixtures));
@@ -1,49 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`AccountList rendering render with props 1`] = `
4
- <Accordion
5
- className="account-list"
6
- >
7
- <ListItem
8
- account={
9
- Object {
10
- "generated_status": "running",
11
- "id": 1,
12
- "uploaded_status": "running",
13
- }
14
- }
15
- defaultExpanded={true}
16
- key="Account1"
17
- label="Account1"
18
- onTaskStart={[Function]}
19
- />
20
- <ListItem
21
- account={
22
- Object {
23
- "generated_status": "failure",
24
- "id": 2,
25
- "uploaded_status": "unknown",
26
- }
27
- }
28
- defaultExpanded={false}
29
- key="Account2"
30
- label="Account2"
31
- onTaskStart={[Function]}
32
- />
33
- <ListItem
34
- account={
35
- Object {
36
- "generated_status": "running",
37
- "id": 3,
38
- "uploaded_status": "success",
39
- }
40
- }
41
- defaultExpanded={false}
42
- key="Account3"
43
- label="Account3"
44
- onTaskStart={[Function]}
45
- />
46
- </Accordion>
47
- `;
48
-
49
- exports[`AccountList rendering show empty results 1`] = `<inventoryEmptyResults />`;