'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _enzyme = require('enzyme');

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _ = require('../');

var _2 = _interopRequireDefault(_);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var buildWrapper = function buildWrapper(props) {
  return (0, _enzyme.shallow)(_react2.default.createElement(
    _2.default,
    _extends({
      footerProps: { prop1: 'prop1Value' },
      onChangeStep: jest.fn(),
      steps: ['Step 1', 'Step 2', 'Step 3']
    }, props),
    _react2.default.createElement(
      _2.default.Step,
      null,
      'Step 1 Content'
    ),
    _react2.default.createElement(
      _2.default.Step,
      null,
      'Step 2 Content'
    ),
    _react2.default.createElement(
      _2.default.Step,
      null,
      'Step 3 Content'
    )
  ));
};

describe('Wizard', function () {
  it('should render wizard with the first step as the current step by default', function () {
    expect(buildWrapper()).toMatchSnapshot();
  });

  it('should render wizard with the given step as the current step', function () {
    var wrapper = buildWrapper({ currentStep: 1 });
    expect(wrapper).toMatchSnapshot();
  });
});