Sha256: f06eb2aa60d6d63dd492dc0c0b921379ee54276bb2d942d459f946cc8202bff7

Contents?: true

Size: 1.02 KB

Versions: 65

Compression:

Stored size: 1.02 KB

Contents

import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
import { ConfirmModal } from '../ConfirmModal';
import { RESUME_SELECTED_MODAL } from '../../../TasksTableConstants';
import { FORCE_UNLOCK_MODAL } from '../../../../TaskActions/TaskActionsConstants';

const fixtures = {
  'renders ConfirmModal': {
    actionType: RESUME_SELECTED_MODAL,
    actionText: 'some text',
    actionState: 'some state',
    selectedRowsLen: 1,
    id: 'modalID',
    parentTaskID: 'parent-id',
    allRowsSelected: true,
    url: 'some-url',
    uriQuery: { state: 'stopped' },
    setModalClosed: jest.fn(),
  },

  'renders ConfirmModal for unlock ': {
    actionType: FORCE_UNLOCK_MODAL,
    actionText: 'some text',
    actionState: 'some state',
    selectedRowsLen: 1,
    id: 'modalID',
    parentTaskID: 'parent-id',
    allRowsSelected: true,
    url: 'some-url',
    uriQuery: { state: 'stopped' },
    setModalClosed: jest.fn(),
  },
};

describe('ConfirmModal', () => {
  testComponentSnapshotsWithFixtures(ConfirmModal, fixtures);
});

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
foreman-tasks-3.0.0 webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js
foreman-tasks-2.0.2 webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js
foreman-tasks-2.0.1 webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js
foreman-tasks-2.0.0 webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js
foreman-tasks-1.2.0 webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js