Sha256: 4de16f4951fbff69de6e3f0969936670d51d1d59ceb699dfefd50689471f1069

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

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

const state = {
  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

6 entries across 6 versions & 2 rubygems

Version Path
foreman_rh_cloud-2.0.6 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-2.0.5 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_rh_cloud-2.0.4 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_inventory_upload-2.0.4.pre.2 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_inventory_upload-2.0.4.pre.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js
foreman_inventory_upload-2.0.3 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js