"use strict";

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

var _presenter = _interopRequireDefault(require("../presenter"));

var _Button = _interopRequireDefault(require("@instructure/ui-buttons/lib/components/Button"));

describe('TakeStimulus presenter', function () {
  var defaultProps = {
    reopenOn: true,
    sessionId: '1'
  };
  var testbed = createTestbed(withContext(_presenter.default), defaultProps);
  it('does not render a Button if reopenOn false', function () {
    testbed.render({
      reopenOn: false
    });
    expect(testbed.findChildrenByType(_Button.default)).to.be.empty();
  });
  it('renders a Button if reopenOn true', function () {
    testbed.render();
    expect(testbed.findChildrenByType(_Button.default)).to.not.be.empty();
  });
  it('renders nothing if reopenOn false', function () {
    testbed.render({
      reopenOn: false
    });
    expect(testbed.findChildrenByTagName('div')).to.be.empty();
  });
});