Sha256: 2c9ce5ab6b3b59f128e6c5d9b5936e107a461edd911cd980c027099cf7f13769

Contents?: true

Size: 545 Bytes

Versions: 6

Compression:

Stored size: 545 Bytes

Contents

import React from 'react';
import { render, fireEvent, screen } from '@testing-library/react';
import { StartEndDates } from '../StartEndDates';

const setEnds = jest.fn();
const props = {
  starts: '',
  setStarts: jest.fn(),
  ends: 'some-end-date',
  setEnds,
};

describe('StartEndDates', () => {
  it('never ends', () => {
    render(<StartEndDates {...props} />);
    const neverEnds = screen.getByLabelText('Never ends', {
      selector: 'input',
    });
    fireEvent.click(neverEnds);
    expect(setEnds).toBeCalledWith('');
  });
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_remote_execution-4.5.6 webpack/JobWizard/steps/Schedule/__tests__/StartEndDates.test.js
foreman_remote_execution-4.5.5 webpack/JobWizard/steps/Schedule/__tests__/StartEndDates.test.js
foreman_remote_execution-4.5.4 webpack/JobWizard/steps/Schedule/__tests__/StartEndDates.test.js
foreman_remote_execution-4.7.0 webpack/JobWizard/steps/Schedule/__tests__/StartEndDates.test.js
foreman_remote_execution-4.5.3 webpack/JobWizard/steps/Schedule/__tests__/StartEndDates.test.js
foreman_remote_execution-4.5.2 webpack/JobWizard/steps/Schedule/__tests__/StartEndDates.test.js