<commit_before>'use strict';

jest.dontMock('../row');
jest.dontMock('jquery');

var $ = require('jquery');

describe('InputGroupRow', function() {
  var InputGroupRow, inputGroupRow, React, TestUtils;

  beforeEach(function() {
    React = require('react/addons');
    TestUtils = React.addons.TestUtils;
    InputGroupRow = require('../row');
    inputGroupRow = (
      <InputGroupRow label="test">
        <input type="text"/>
      </InputGroupRow>
    );
  });

  it('is a InputGroupRow element', function() {
    expect(TestUtils.isElementOfType(inputGroupRow, InputGroupRow)).toEqual(true);
  });

  it('is defined', function() {
    expect(InputGroupRow).toBeDefined();
  });

  it('has class input-row', function() {
    var elem = TestUtils.renderIntoDocument(inputGroupRow);
    var node = elem.getDOMNode();
    expect($(node).hasClass('input-row')).toEqual(true);
  });
});<commit_msg>Added a few extra tests for InputGroupRow.<commit_after>'use strict';

jest.dontMock('../row');
jest.dontMock('jquery');

var $ = require('jquery');

describe('InputGroupRow', function() {
  var InputGroupRow, inputGroupRow, React, TestUtils;

  beforeEach(function() {
    React = require('react/addons');
    TestUtils = React.addons.TestUtils;
    InputGroupRow = require('../row');
    inputGroupRow = (
      <InputGroupRow label="test">
        <input type="text" id="test"/>
      </InputGroupRow>
    );
  });

  it('is a InputGroupRow element', function() {
    expect(TestUtils.isElementOfType(inputGroupRow, InputGroupRow)).toEqual(true);
  });

  it('is defined', function() {
    expect(InputGroupRow).toBeDefined();
  });

  it('has class input-row', function() {
    var elem = TestUtils.renderIntoDocument(inputGroupRow);
    var node = elem.getDOMNode();
    expect($(node).hasClass('input-row')).toEqual(true);
  });

  it('sets label correctly', function() {
    var elem = TestUtils.renderIntoDocument(inputGroupRow);
    expect(elem.props.label).toEqual('test');
    var node = elem.getDOMNode();
    expect($('label', node).text()).toEqual('test');
  });

  it('renders the input correctly', function() {
    var elem = TestUtils.renderIntoDocument(inputGroupRow);
    expect(elem.props.label).toEqual('test');
    var node = elem.getDOMNode();
    expect($('input', node).attr('id')).toEqual('test');
  });
});
{'fraction_non_alphanumeric': 0.1792452830188679, 'fraction_numerical': 0.0, 'mean_word_length': 4.207589285714286, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5994243', 'n_tokens_mistral': 727, 'n_tokens_neox': 723, 'n_words': 130}