Sha256: 8830cdd1bd07c213c8c08ada53eb3423120d3537137728b401eceb08ea48c4e1

Contents?: true

Size: 1.15 KB

Versions: 1

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 { inventoryStateWrapper } from '../../../../ForemanRhCloudTestHelpers';

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

1 entries across 1 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.7 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js