Sha256: 3504638e1f4c54bf151e6d9b150839dc31578b30bb86b884f454f2e857e073f1

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';

import SnapshotManagementCard from '../SnapshotManagementCard';

const hostDetails = {
  id: 42,
  name: 'deep.thought',
  uuid: '829aa26a-928f-11ee-b9d1-0242ac120002',
  permissions: {
    create_snapshots: true,
    edit_snapshots: false,
    revert_snapshots: true,
    destroy_snapshots: false,
  },
};

const hostDetailsVmware = {
  ...hostDetails,
  capabilities: [
    'build',
    'image',
    'snapshots',
    'snapshot_include_quiesce',
    'snapshot_include_ram',
    'editable_snapshot_name',
  ],
};
const hostDetailsProxmox = {
  ...hostDetails,
  capabilities: [
    'build',
    'new_volume',
    'new_interface',
    'image',
    'snapshots',
    'limit_snapshot_name_format',
  ],
};

const fixtures = {
  'without optional Props': {},
  'with Props': { hostDetails },
  'with VMWare capabilities': {
    hostDetails: hostDetailsVmware,
  },
  'with Proxmox capabilities': {
    hostDetails: hostDetailsProxmox,
  },
};

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_snapshot_management-4.0.0 webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js
foreman_snapshot_management-3.0.1 webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js
foreman_snapshot_management-3.0.0 webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js