Sha256: 277fae7dbe6a0c9ec4d0f19764173471ee3e5aaed3ac62244c5e2aa90043a40a

Contents?: true

Size: 1.15 KB

Versions: 98

Compression:

Stored size: 1.15 KB

Contents

import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
import {
  selectDashboard,
  selectPollingProcessID,
  selectActiveTab,
  selectUploading,
  selectGenerating,
} from '../DashboardSelectors';
import {
  logs,
  completed,
  pollingProcessID,
  activeTab,
  accountID,
} from '../Dashboard.fixtures';
import { rhCloudStateWrapper } from '../../../../ForemanRhCloudTestHelpers';

const state = rhCloudStateWrapper({
  dashboard: {
    [accountID]: {
      generating: {
        logs,
        completed,
      },
      uploading: {
        logs,
        completed,
      },
      activeTab,
      pollingProcessID,
    },
  },
});

const fixtures = {
  'should return Dashboard': () => selectDashboard(state, accountID),
  'should return Dashboard uploading': () => selectUploading(state, accountID),
  'should return Dashboard generating': () =>
    selectGenerating(state, accountID),
  'should return Dashboard pollingProcessID': () =>
    selectPollingProcessID(state, accountID),
  'should return Dashboard activeTab': () => selectActiveTab(state, accountID),
};

describe('Dashboard selectors', () =>
  testSelectorsSnapshotWithFixtures(fixtures));

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
foreman_rh_cloud-4.0.27 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.26 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.26 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.25.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.25 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.25 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.24.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.24.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.24 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.24 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.23 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.23 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.22 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.22 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-4.0.21.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.21.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.21 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.20 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-3.0.19 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-2.0.18.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js