Sha256: c421a6b16ab825c123a938083995aa275c8369ce7e55208633b2c85e988188c9

Contents?: true

Size: 1.15 KB

Versions: 20

Compression:

Stored size: 1.15 KB

Contents

import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
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

20 entries across 20 versions & 1 rubygems

Version Path
foreman_rh_cloud-1.0.18 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.17 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.16 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.15 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.14 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.14 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.13.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.13.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.13 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.13 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.12 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.11 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.10 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.10 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.9 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.9 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-0.9.8 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-1.0.8 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js