Sha256: 92ce413ce5bc468f62b6f6ffd22996c20af8c86ac85109accffb637b0944100a

Contents?: true

Size: 957 Bytes

Versions: 5

Compression:

Stored size: 957 Bytes

Contents

import { testComponentSnapshotsWithFixtures } from '@theforeman/test';

import { ActionButton } from './ActionButton';

const fixtures = {
  'render with cancellable true props': {
    availableActions: {
      cancellable: true,
      resumable: false,
    },
    taskActions: {
      cancel: jest.fn(),
      resume: jest.fn(),
    },
    id: 'id',
    name: 'some-name',
  },
  'render with resumable true props': {
    availableActions: {
      cancellable: false,
      resumable: true,
    },
    taskActions: {
      cancel: jest.fn(),
      resume: jest.fn(),
    },
    id: 'id',
    name: 'some-name',
  },
  'render with cancellable false props': {
    availableActions: {
      cancellable: false,
      resumable: false,
    },
    taskActions: {
      cancel: jest.fn(),
      resume: jest.fn(),
    },
    id: 'id',
    name: 'some-name',
  },
};

describe('ActionButton', () =>
  testComponentSnapshotsWithFixtures(ActionButton, fixtures));

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman-tasks-1.1.3 webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js
foreman-tasks-1.1.2 webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js
foreman-tasks-1.1.1 webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js
foreman-tasks-1.1.0 webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js
foreman-tasks-1.0.1 webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js