Sha256: 2ec7adcc6ec1714ae96eed7302facf79f2a7bc1558b6438515773aefa4e9fa59

Contents?: true

Size: 925 Bytes

Versions: 3

Compression:

Stored size: 925 Bytes

Contents

import { STATUS } from 'foremanReact/constants';

export const minProps = {
  getTableItems: jest.fn(),
  getBreadcrumbs: jest.fn(),
  itemCount: 2,
  selectPage: jest.fn(),
  selectAllRows: jest.fn(),
  unselectAllRows: jest.fn(),
  selectRow: jest.fn(),
  unselectRow: jest.fn(),
  selectedRows: [],
  pagination: {
    page: 1,
    perPage: 10,
  },
  history: { location: { search: '' } },
  results: ['a', 'b'],
  sort: {
    by: 'q',
    order: 'w',
  },
  openClickedModal: jest.fn(),
  openModalAction: jest.fn(),
  openModal: jest.fn(),
};

export default {
  'render with minimal Props': {
    ...minProps,
  },
  'render with no results': {
    ...minProps,
    results: [],
    status: STATUS.RESOLVED,
  },
  'render with error Props': {
    ...minProps,
    results: ['a'],
    status: STATUS.ERROR,
  },
  'render with loading Props': {
    ...minProps,
    results: ['a'],
    status: STATUS.PENDING,
  },
};

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman-tasks-2.0.1 webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js
foreman-tasks-2.0.0 webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js
foreman-tasks-1.2.0 webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js