<commit_before>var TabPaneItemView = require('../../../../../javascripts/cartodb3/components/tab-pane/tab-pane-item-view');
var cdb = require('cartodb-deep-insights.js');
var _ = require('underscore');

describe('components/tab-pane-item-view', function () {
  beforeEach(function () {
    this.model = new cdb.core.Model({
      createButtonView: function () {
        return new cdb.core.View();
      }
    });

    this.view = new TabPaneItemView({
      model: this.model
    });
  });

  it('should have no leaks', function () {
    this.view.render();
    expect(this.view).toHaveNoLeaks();
  });

  it('should render the view', function () {
    this.view.render();
    expect(_.size(this.view._subviews)).toBe(1);
  });

  afterEach(function () {
    this.view.clean();
  });
});<commit_msg>Adds spec for click<commit_after>var TabPaneItemView = require('../../../../../javascripts/cartodb3/components/tab-pane/tab-pane-item-view');
var cdb = require('cartodb-deep-insights.js');

describe('components/tab-pane-item-view', function () {
  beforeEach(function () {
    this.model = new cdb.core.Model({
      createButtonView: function () {
        return new cdb.core.View();
      }
    });

    this.view = new TabPaneItemView({
      model: this.model
    });
    this.view.render();
  });

  it('should have no leaks', function () {
    expect(this.view).toHaveNoLeaks();
  });

  it('should select the view', function () {
    this.view.$el.click();
    expect(this.view.model.get('selected')).toBeTruthy();
  });

  afterEach(function () {
    this.view.clean();
  });
});
{'fraction_non_alphanumeric': 0.1953371140516698, 'fraction_numerical': 0.001890359168241966, 'mean_word_length': 3.020253164556962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2772224', 'n_tokens_mistral': 532, 'n_tokens_neox': 515, 'n_words': 81}