Sha256: 557909a26dded3f72ab23c72452413b980aa05333220bdd36756e610f00aecd1

Contents?: true

Size: 933 Bytes

Versions: 5

Compression:

Stored size: 933 Bytes

Contents

import { testActionSnapshotWithFixtures } from '@theforeman/test';
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

5 entries across 5 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-2.0.11 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-2.0.10 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-2.0.9 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js
foreman_rh_cloud-2.0.8 webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js