Sha256: dea0af585e13d7ebce78544997017ce98b25f6a80691205f9a8b90b7c49c2ded

Contents?: true

Size: 939 Bytes

Versions: 10

Compression:

Stored size: 939 Bytes

Contents

import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
import API from 'foremanReact/API';
import {
  fetchAccountsStatus,
  startAccountStatusPolling,
  stopAccountStatusPolling,
  restartProcess,
} from '../AccountListActions';
import {
  pollingProcessID,
  fetchAccountsStatusResponse,
} from '../AccountList.fixtures';
import { accountID, activeTab } from '../../Dashboard/Dashboard.fixtures';

jest.mock('foremanReact/API');
API.get.mockImplementation(async () => fetchAccountsStatusResponse);

const fixtures = {
  'should fetchAccountsStatus': () => fetchAccountsStatus(),
  'should startAccountStatusPolling': () =>
    startAccountStatusPolling(pollingProcessID),
  'should stopAccountStatusPolling': () =>
    stopAccountStatusPolling(pollingProcessID),
  'should restartProcess': () => restartProcess(accountID, activeTab),
};

describe('AccountList actions', () => testActionSnapshotWithFixtures(fixtures));

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-1.0.12 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-1.0.11 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-0.9.10 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-1.0.10 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-1.0.9 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-0.9.9 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-0.9.8 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-1.0.8 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js