foreman_rh_cloud 12.1.3 → 12.1.5

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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -5
  3. data/app/controllers/concerns/insights_cloud/package_profile_upload_extensions.rb +33 -0
  4. data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +1 -2
  5. data/app/controllers/insights_cloud/ui_requests_controller.rb +99 -0
  6. data/app/services/foreman_rh_cloud/cert_auth.rb +9 -1
  7. data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +12 -13
  8. data/app/services/foreman_rh_cloud/gateway_request.rb +26 -0
  9. data/app/services/foreman_rh_cloud/insights_api_forwarder.rb +116 -0
  10. data/app/services/foreman_rh_cloud/tags_auth.rb +55 -0
  11. data/app/views/api/v2/hosts/insights/base.rabl +6 -0
  12. data/config/routes.rb +2 -0
  13. data/lib/foreman_inventory_upload/async/generate_report_job.rb +11 -5
  14. data/lib/foreman_inventory_upload/async/upload_report_job.rb +15 -4
  15. data/lib/foreman_inventory_upload/generators/archived_report.rb +2 -2
  16. data/lib/foreman_inventory_upload/generators/fact_helpers.rb +65 -13
  17. data/lib/foreman_inventory_upload/generators/queries.rb +7 -5
  18. data/lib/foreman_inventory_upload/generators/slice.rb +0 -1
  19. data/lib/foreman_inventory_upload.rb +2 -2
  20. data/lib/foreman_rh_cloud/engine.rb +5 -3
  21. data/lib/foreman_rh_cloud/version.rb +1 -1
  22. data/lib/insights_cloud.rb +8 -0
  23. data/lib/inventory_sync/async/inventory_hosts_sync.rb +2 -0
  24. data/lib/tasks/rh_cloud_inventory.rake +3 -2
  25. data/package.json +5 -1
  26. data/test/controllers/insights_cloud/ui_requests_controller_test.rb +169 -0
  27. data/test/unit/archived_report_generator_test.rb +1 -1
  28. data/test/unit/fact_helpers_test.rb +267 -2
  29. data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +20 -3
  30. data/test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb +176 -0
  31. data/test/unit/services/foreman_rh_cloud/tags_auth_test.rb +29 -0
  32. data/test/unit/slice_generator_test.rb +69 -10
  33. data/webpack/CVEsHostDetailsTab/CVEsHostDetailsTab.js +30 -10
  34. data/webpack/CVEsHostDetailsTab/__tests__/CVEsHostDetailsTab.test.js +18 -11
  35. data/webpack/CVEsHostDetailsTab/index.js +2 -2
  36. data/webpack/ForemanColumnExtensions/index.js +51 -0
  37. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +1 -0
  38. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/__snapshots__/InventoryFilter.test.js.snap +1 -0
  39. data/webpack/ForemanInventoryUpload/Components/InventorySettings/MinimalInventoryDropdown.js +2 -0
  40. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +8 -1
  41. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +4 -0
  42. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/CloudConnectorButton.js +3 -3
  43. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/__tests__/__snapshots__/CloudConnectorButton.test.js.snap +3 -0
  44. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +10 -4
  45. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +6 -6
  46. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/SettingsWarning.js +2 -0
  47. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SettingsWarning/__snapshots__/SettingsWarning.test.js.snap +2 -0
  48. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +1 -0
  49. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +1 -0
  50. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +3 -1
  51. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +3 -0
  52. data/webpack/ForemanRhCloudFills.js +6 -3
  53. data/webpack/ForemanRhCloudPages.js +6 -3
  54. data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +1 -0
  55. data/webpack/InsightsCloudSync/Components/InsightsTable/SelectAllAlert.js +2 -0
  56. data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTable.test.js.snap +1 -0
  57. data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js +3 -0
  58. data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModalFooter.js +12 -2
  59. data/webpack/InsightsCloudSync/Components/RemediationModal/Resolutions.js +1 -0
  60. data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +6 -1
  61. data/webpack/InsightsVulnerability/InsightsVulnerabilityListPage.js +21 -0
  62. data/webpack/InsightsVulnerability/InsightsVulnerabilityListPage.test.js +20 -0
  63. data/webpack/InsightsVulnerabilityHostIndexExtensions/CVECountCell.js +45 -0
  64. data/webpack/InsightsVulnerabilityHostIndexExtensions/__tests__/CVECountCell.test.js +28 -0
  65. data/webpack/common/DropdownToggle.js +1 -0
  66. data/webpack/common/ScalprumModule/ScalprumContext.js +63 -0
  67. data/webpack/common/Switcher/SwitcherPF4.js +1 -0
  68. data/webpack/common/Switcher/__tests__/__snapshots__/SwitcherPF4.test.js.snap +1 -0
  69. data/webpack/common/Switcher/index.js +1 -0
  70. data/webpack/global_index.js +3 -0
  71. metadata +19 -4
  72. data/webpack/InsightsVulnerability/InsightsVulnerability.js +0 -13
  73. data/webpack/InsightsVulnerability/InsightsVulnerability.test.js +0 -18
@@ -19,11 +19,15 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
19
19
  const dropdownItems = [
20
20
  <DropdownItem
21
21
  key="recommendation-manual-sync"
22
+ ouiaId="recommendation-manual-sync"
22
23
  onClick={onRecommendationSync}
23
24
  >
24
25
  {__('Sync recommendations')}
25
26
  </DropdownItem>,
26
- <DropdownItem key="cloud-advisor-systems-link">
27
+ <DropdownItem
28
+ key="cloud-advisor-systems-link"
29
+ ouiaId="cloud-advisor-systems-link"
30
+ >
27
31
  <a
28
32
  href={redHatAdvisorSystems()}
29
33
  target="_blank"
@@ -38,6 +42,7 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
38
42
  return (
39
43
  <Dropdown
40
44
  className="title-dropdown"
45
+ ouiaId="title-dropdown"
41
46
  onSelect={() => setIsDropdownOpen(false)}
42
47
  toggle={
43
48
  <KebabToggle onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)} />
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { ScalprumComponent, ScalprumProvider } from '@scalprum/react-core';
3
+ import { providerOptions } from '../common/ScalprumModule/ScalprumContext';
4
+
5
+ const InsightsVulnerabilityListPage = () => {
6
+ const scope = 'vulnerability';
7
+ const module = './CveListPage';
8
+ return (
9
+ <div className="rh-cloud-insights-vulnerability-page">
10
+ <ScalprumComponent scope={scope} module={module} />
11
+ </div>
12
+ );
13
+ };
14
+
15
+ const InsightsVulnerabilityListPageWrap = () => (
16
+ <ScalprumProvider {...providerOptions}>
17
+ <InsightsVulnerabilityListPage />
18
+ </ScalprumProvider>
19
+ );
20
+
21
+ export default InsightsVulnerabilityListPageWrap;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import '@testing-library/jest-dom';
4
+ import InsightsVulnerabilityListPage from './InsightsVulnerabilityListPage';
5
+
6
+ jest.mock('@scalprum/react-core', () => ({
7
+ ScalprumComponent: jest.fn(props => (
8
+ <div data-testid="mock-scalprum-component">{JSON.stringify(props)}</div>
9
+ )),
10
+ ScalprumProvider: jest.fn(({ children }) => <div>{children}</div>),
11
+ }));
12
+
13
+ describe('InsightsVulnerabilityListPage component', () => {
14
+ it('renders the container with correct class', () => {
15
+ const { container } = render(<InsightsVulnerabilityListPage />);
16
+ expect(
17
+ container.querySelector('.rh-cloud-insights-vulnerability-page')
18
+ ).toBeTruthy();
19
+ });
20
+ });
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { UnknownIcon } from '@patternfly/react-icons';
4
+ import { Link } from 'react-router-dom';
5
+ import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
6
+
7
+ import { insightsCloudUrl } from '../InsightsCloudSync/InsightsCloudSyncHelpers';
8
+
9
+ const vulnerabilityApiPath = path =>
10
+ insightsCloudUrl(`api/vulnerability/v1/${path}`);
11
+
12
+ export const CVECountCell = ({ hostDetails }) => {
13
+ // eslint-disable-next-line camelcase
14
+ const uuid = hostDetails?.subscription_facet_attributes?.uuid;
15
+
16
+ const key = `HOST_CVE_COUNT_${uuid}`;
17
+ const response = useAPI(
18
+ uuid ? 'get' : null,
19
+ vulnerabilityApiPath(`systems?uuid=${uuid}`),
20
+ {
21
+ key,
22
+ }
23
+ );
24
+
25
+ if (uuid === undefined) {
26
+ return <UnknownIcon />;
27
+ }
28
+
29
+ // eslint-disable-next-line camelcase
30
+ const { cve_count } = (response.response?.data || [])[0]?.attributes || {};
31
+
32
+ const cveLink = (
33
+ // eslint-disable-next-line camelcase
34
+ <Link to={`hosts/${hostDetails.name}#/Vulnerabilities`}>{cve_count}</Link>
35
+ );
36
+
37
+ // eslint-disable-next-line camelcase
38
+ return cve_count === undefined ? <UnknownIcon /> : cveLink;
39
+ };
40
+
41
+ CVECountCell.propTypes = {
42
+ hostDetails: PropTypes.object.isRequired,
43
+ };
44
+
45
+ export default CVECountCell;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { API } from 'foremanReact/redux/API';
4
+ import { CVECountCell } from '../CVECountCell';
5
+
6
+ jest.mock('foremanReact/redux/API');
7
+ API.get.mockImplementation(async () => ({
8
+ data: [
9
+ {
10
+ attributes: {
11
+ cve_count: 1,
12
+ },
13
+ },
14
+ ],
15
+ }));
16
+
17
+ describe('CVECountCell', () => {
18
+ it('renders an empty cves count column', () => {
19
+ const hostDetailsMock = {
20
+ name: 'test-host.example.com',
21
+ subscription_facet_attributes: {
22
+ uuid: null, // no subscription
23
+ },
24
+ };
25
+ render(<CVECountCell hostDetails={hostDetailsMock} />);
26
+ expect(screen.getByRole('img', { hidden: true })).toBeTruthy();
27
+ });
28
+ });
@@ -6,6 +6,7 @@ const DropdownToggle = ({ items, ...props }) => {
6
6
  const [isOpen, setOpen] = useState(false);
7
7
  return (
8
8
  <Dropdown
9
+ ouiaId="toggle-dropdown"
9
10
  onSelect={() => setOpen(false)}
10
11
  toggle={<KebabToggle onToggle={(_event, value) => setOpen(value)} />}
11
12
  isOpen={isOpen}
@@ -0,0 +1,63 @@
1
+ export const modulesConfig = {
2
+ vulnerability: {
3
+ name: 'vulnerability',
4
+ manifestLocation: `${window.location.origin}/assets/apps/vulnerability/fed-mods.json`,
5
+ cdnPath: `${window.location.origin}/assets/apps/vulnerability/`,
6
+ },
7
+ };
8
+
9
+ export const mockUser = {
10
+ entitlements: {},
11
+ identity: {
12
+ account_number: 'string',
13
+ org_id: 'FOREMAN',
14
+ internal: {
15
+ org_id: 'string',
16
+ account_id: 'string',
17
+ },
18
+ type: 'string',
19
+ user: {
20
+ username: 'string',
21
+ email: 'string',
22
+ first_name: 'string',
23
+ last_name: 'string',
24
+ is_active: 'boolean',
25
+ is_internal: 'boolean',
26
+ is_org_admin: 'boolean',
27
+ locale: 'string',
28
+ },
29
+ },
30
+ };
31
+
32
+ export const providerOptions = {
33
+ pluginSDKOptions: {
34
+ pluginLoaderOptions: {
35
+ transformPluginManifest: manifest => {
36
+ if (
37
+ manifest.baseURL === 'auto' &&
38
+ modulesConfig[manifest.name]?.cdnPath
39
+ ) {
40
+ const _cdnPath = modulesConfig[manifest.name]?.cdnPath;
41
+ return {
42
+ ...manifest,
43
+ baseURL: _cdnPath,
44
+ loadScripts: manifest.loadScripts.map(
45
+ script => `${_cdnPath}${script}`
46
+ ),
47
+ };
48
+ }
49
+ return manifest;
50
+ },
51
+ },
52
+ },
53
+ api: {
54
+ chrome: {
55
+ isBeta: () => false,
56
+ on: () => {},
57
+ auth: {
58
+ getUser: () => Promise.resolve(mockUser),
59
+ },
60
+ },
61
+ },
62
+ config: modulesConfig,
63
+ };
@@ -14,6 +14,7 @@ const SwitcherPF4 = ({
14
14
  }) => (
15
15
  <Switch
16
16
  className="foreman-rh-cloud-switcher"
17
+ ouiaId="foreman-rh-cloud-switcher"
17
18
  id={`rh-cloud-switcher-${id}`}
18
19
  isChecked={isChecked}
19
20
  isDisabled={isDisabled}
@@ -19,5 +19,6 @@ exports[`InsightsCloudSync helpers should return insights cloud Url 1`] = `
19
19
  </div>
20
20
  }
21
21
  onChange={[MockFunction]}
22
+ ouiaId="foreman-rh-cloud-switcher"
22
23
  />
23
24
  `;
@@ -49,6 +49,7 @@ const Switcher = ({
49
49
  <Grid.Col sm={SwitchCol} style={{ marginBottom: '5px' }}>
50
50
  <Switch
51
51
  id={`rh-cloud-switcher-${id}`}
52
+ ouiaId={`rh-cloud-switcher-${id}`}
52
53
  isChecked={isChecked}
53
54
  onChange={onChange}
54
55
  label=" "
@@ -1,7 +1,10 @@
1
+ import { registerColumns } from 'foremanReact/components/HostsIndex/Columns/core';
1
2
  import { registerReducers } from './ForemanRhCloudReducers';
2
3
  import { registerFills } from './ForemanRhCloudFills';
3
4
  import { registerRoutes } from './ForemanRhCloudPages';
5
+ import hostsIndexColumnExtensions from './ForemanColumnExtensions/index';
4
6
 
5
7
  registerReducers();
6
8
  registerFills();
7
9
  registerRoutes();
10
+ registerColumns(hostsIndexColumnExtensions);
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: 12.1.3
4
+ version: 12.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
@@ -100,6 +100,7 @@ files:
100
100
  - app/controllers/api/v2/rh_cloud/inventory_controller.rb
101
101
  - app/controllers/concerns/insights_cloud/candlepin_cache.rb
102
102
  - app/controllers/concerns/insights_cloud/client_authentication.rb
103
+ - app/controllers/concerns/insights_cloud/package_profile_upload_extensions.rb
103
104
  - app/controllers/concerns/inventory_upload/report_actions.rb
104
105
  - app/controllers/concerns/inventory_upload/task_actions.rb
105
106
  - app/controllers/foreman_inventory_upload/accounts_controller.rb
@@ -113,6 +114,7 @@ files:
113
114
  - app/controllers/insights_cloud/hits_controller.rb
114
115
  - app/controllers/insights_cloud/settings_controller.rb
115
116
  - app/controllers/insights_cloud/tasks_controller.rb
117
+ - app/controllers/insights_cloud/ui_requests_controller.rb
116
118
  - app/helpers/foreman_insights_host_helper.rb
117
119
  - app/helpers/foreman_inventory_upload_helper.rb
118
120
  - app/helpers/foreman_inventory_upload_host_helper.rb
@@ -134,11 +136,14 @@ files:
134
136
  - app/services/foreman_rh_cloud/cloud_presence.rb
135
137
  - app/services/foreman_rh_cloud/cloud_request.rb
136
138
  - app/services/foreman_rh_cloud/cloud_request_forwarder.rb
139
+ - app/services/foreman_rh_cloud/gateway_request.rb
137
140
  - app/services/foreman_rh_cloud/hit_remediations_retriever.rb
138
141
  - app/services/foreman_rh_cloud/hits_uploader.rb
142
+ - app/services/foreman_rh_cloud/insights_api_forwarder.rb
139
143
  - app/services/foreman_rh_cloud/insights_status_cleaner.rb
140
144
  - app/services/foreman_rh_cloud/remediations_retriever.rb
141
145
  - app/services/foreman_rh_cloud/rules_ingester.rb
146
+ - app/services/foreman_rh_cloud/tags_auth.rb
142
147
  - app/services/foreman_rh_cloud/template_renderer_helper.rb
143
148
  - app/services/foreman_rh_cloud/url_remediations_retriever.rb
144
149
  - app/views/api/v2/advisor_engine/host_details.json.rabl
@@ -238,6 +243,7 @@ files:
238
243
  - test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
239
244
  - test/controllers/insights_cloud/api/cloud_request_controller_test.rb
240
245
  - test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
246
+ - test/controllers/insights_cloud/ui_requests_controller_test.rb
241
247
  - test/controllers/insights_sync/settings_controller_test.rb
242
248
  - test/controllers/inventory_upload/api/inventory_controller_test.rb
243
249
  - test/controllers/inventory_upload/cloud_status_controller_test.rb
@@ -274,8 +280,10 @@ files:
274
280
  - test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb
275
281
  - test/unit/services/foreman_rh_cloud/hit_remediations_retriever_test.rb
276
282
  - test/unit/services/foreman_rh_cloud/hits_uploader_test.rb
283
+ - test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb
277
284
  - test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
278
285
  - test/unit/services/foreman_rh_cloud/rules_ingester_test.rb
286
+ - test/unit/services/foreman_rh_cloud/tags_auth_test.rb
279
287
  - test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
280
288
  - test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb
281
289
  - test/unit/shell_process_job_test.rb
@@ -284,6 +292,7 @@ files:
284
292
  - webpack/CVEsHostDetailsTab/CVEsHostDetailsTab.js
285
293
  - webpack/CVEsHostDetailsTab/__tests__/CVEsHostDetailsTab.test.js
286
294
  - webpack/CVEsHostDetailsTab/index.js
295
+ - webpack/ForemanColumnExtensions/index.js
287
296
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js
288
297
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js
289
298
  - webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js
@@ -608,8 +617,10 @@ files:
608
617
  - webpack/InsightsHostDetailsTab/components/ListItem/ListItem.js
609
618
  - webpack/InsightsHostDetailsTab/components/ListItem/index.js
610
619
  - webpack/InsightsHostDetailsTab/index.js
611
- - webpack/InsightsVulnerability/InsightsVulnerability.js
612
- - webpack/InsightsVulnerability/InsightsVulnerability.test.js
620
+ - webpack/InsightsVulnerability/InsightsVulnerabilityListPage.js
621
+ - webpack/InsightsVulnerability/InsightsVulnerabilityListPage.test.js
622
+ - webpack/InsightsVulnerabilityHostIndexExtensions/CVECountCell.js
623
+ - webpack/InsightsVulnerabilityHostIndexExtensions/__tests__/CVECountCell.test.js
613
624
  - webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js
614
625
  - webpack/__mocks__/foremanReact/common/I18n.js
615
626
  - webpack/__mocks__/foremanReact/common/MountingService.js
@@ -636,6 +647,7 @@ files:
636
647
  - webpack/common/ForemanTasks/ForemanTasksHelpers.js
637
648
  - webpack/common/ForemanTasks/index.js
638
649
  - webpack/common/Hooks/ConfigHooks.js
650
+ - webpack/common/ScalprumModule/ScalprumContext.js
639
651
  - webpack/common/Switcher/HelpLabel.js
640
652
  - webpack/common/Switcher/SwitcherPF4.js
641
653
  - webpack/common/Switcher/SwitcherPF4.scss
@@ -669,7 +681,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
669
681
  - !ruby/object:Gem::Version
670
682
  version: '0'
671
683
  requirements: []
672
- rubygems_version: 3.6.7
684
+ rubygems_version: 3.6.9
673
685
  specification_version: 4
674
686
  summary: Summary of ForemanRhCloud.
675
687
  test_files:
@@ -677,6 +689,7 @@ test_files:
677
689
  - test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
678
690
  - test/controllers/insights_cloud/api/cloud_request_controller_test.rb
679
691
  - test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
692
+ - test/controllers/insights_cloud/ui_requests_controller_test.rb
680
693
  - test/controllers/insights_sync/settings_controller_test.rb
681
694
  - test/controllers/inventory_upload/api/inventory_controller_test.rb
682
695
  - test/controllers/inventory_upload/cloud_status_controller_test.rb
@@ -713,8 +726,10 @@ test_files:
713
726
  - test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb
714
727
  - test/unit/services/foreman_rh_cloud/hit_remediations_retriever_test.rb
715
728
  - test/unit/services/foreman_rh_cloud/hits_uploader_test.rb
729
+ - test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb
716
730
  - test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
717
731
  - test/unit/services/foreman_rh_cloud/rules_ingester_test.rb
732
+ - test/unit/services/foreman_rh_cloud/tags_auth_test.rb
718
733
  - test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
719
734
  - test/unit/services/foreman_rh_cloud/url_remediations_retriever_test.rb
720
735
  - test/unit/shell_process_job_test.rb
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
3
- import { translate as __ } from 'foremanReact/common/I18n';
4
-
5
- const InsightsVulnerability = () => (
6
- <PageLayout searchable={false} header={__('Vulnerability')}>
7
- <div className="insights-vulnerability">
8
- <p>This page is under development. Please check back soon for updates.</p>
9
- </div>
10
- </PageLayout>
11
- );
12
-
13
- export default InsightsVulnerability;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { render, screen } from '@testing-library/react';
3
- import '@testing-library/jest-dom';
4
- import InsightsVulnerability from './InsightsVulnerability';
5
-
6
- describe('InsightsVulnerability component', () => {
7
- it('renders the "under development" message', () => {
8
- render(<InsightsVulnerability />);
9
- expect(
10
- screen.getByText(/this page is under development/i)
11
- ).toBeInTheDocument();
12
- });
13
-
14
- it('renders the container with correct class', () => {
15
- const { container } = render(<InsightsVulnerability />);
16
- expect(container.querySelector('.insights-vulnerability')).toBeTruthy();
17
- });
18
- });