"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _react = _interopRequireDefault(require("react"));

var _enzyme = require("enzyme");

var _ = _interopRequireDefault(require("."));

describe('TutorialObstacle', function () {
  var node;
  var props;
  beforeEach(function () {
    props = {
      body: 'Mmmm iced tea.',
      heading: 'What you are seeing here is a miracle',
      closeTutorialModal: jest.fn()
    };
    node = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_["default"], props));
  });
  it('should display the TutorialObstacle component', function () {
    expect(node.find('.TutorialObstacle').hasClass('TutorialObstacle')).toBe(true);
  });
  it('should call closeTutorialModal on click', function () {
    var button = node.find('button').first();
    button.simulate('click');
    expect(props.closeTutorialModal).toHaveBeenCalledTimes(1);
  });
});