"use strict";

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

var _enzyme = require("enzyme");

var _Header = _interopRequireDefault(require("../Header"));

var _Header2 = _interopRequireDefault(require("../Header.less"));

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

describe('Header Specs', function () {
  it('should render with title text upper-cased', function () {
    var msg = 'Upper-cased Header';
    var header = (0, _enzyme.mount)(_react.default.createElement(_Header.default, null, _react.default.createElement("title", null, msg)));
    var expected = msg.toUpperCase();
    var actual = header.find('h1').text();
    expect(actual).to.equal(expected);
  });
  it('should have fullBleed class applied', function () {
    var header = (0, _enzyme.mount)(_react.default.createElement(_Header.default, {
      fullBleed: true
    }, _react.default.createElement("title", null, "Header")));
    var expected = true;
    var actual = header.find('header').hasClass(_Header2.default.fullBleed);
    expect(actual).to.equal(expected);
  });
  it('should inject a custom component when headerInput is used', function () {
    // This just uses an <input> tag for easy discoverability. It should behave the same way
    // as a moonstone/Input, the standard here, but that would require importing a diffenent
    // component than what we're testing here.
    var header = (0, _enzyme.mount)(_react.default.createElement(_Header.default, null, _react.default.createElement("title", null, "Header"), _react.default.createElement("headerInput", null, _react.default.createElement("input", {
      placeholder: "An easy to find legal DOM node"
    }))));
    var expected = 1;
    var actual = header.find('input');
    expect(actual).to.have.length(expected);
  });
});