Sha256: 9d286f8114d3be7be571760f9596998815eebd42888a25d47037467719305026

Contents?: true

Size: 738 Bytes

Versions: 5

Compression:

Stored size: 738 Bytes

Contents

import React from 'react';
import { testComponentSnapshotsWithFixtures, shallow } from '@theforeman/test';

import { ResumeButton } from './ResumeButton';

const fixtures = {
  'render with minimal props': {
    id: 'some-id',
    name: 'some-name',
  },
};

describe('ResumeButton', () => {
  describe('rendering', () =>
    testComponentSnapshotsWithFixtures(ResumeButton, fixtures));
  describe('should use id and name on click', () => {
    const onClick = jest.fn();
    const id = 'some-id';
    const name = 'some-name';
    const component = shallow(
      <ResumeButton id={id} name={name} onClick={onClick} />
    );
    component.find('Button').simulate('click');

    expect(onClick).toHaveBeenCalledWith(id, name);
  });
});

Version data entries

5 entries across 5 versions & 1 rubygems

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