<commit_before>var cdb = require('cartodb.js');
var _ = require('underscore');
var LayerDefinitionModel = require('../../../../../javascripts/cartodb3/data/layer-definition-model');
var LayerContentView = require('../../../../../javascripts/cartodb3/editor/layers/layer-content-view');
var ConfigModel = require('../../../../../javascripts/cartodb3/data/config-model');

describe('editor/layers/layer-content-view', function () {
  beforeEach(function () {
    var configModel = new ConfigModel({
      base_url: '/u/pepe'
    });
    this.layer = new LayerDefinitionModel({
      id: 'l-1',
      type: 'tile'
    }, {
      parse: true,
      configModel: configModel
    });

    this.layer.layerTableModel = new cdb.core.Model({ table_name: 'hello' });
    this.stackLayoutModel = jasmine.createSpyObj('stackLayoutModel', ['prevStep']);
    this.view = new LayerContentView({
      layerDefinitionModel: this.layer,
      stackLayoutModel: this.stackLayoutModel
    });

    this.view.render();
  });

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

  it('should render correctly', function () {
    expect(_.size(this.view._subviews)).toBe(2);
    expect(this.view.$('.CDB-HeaderInfo-TitleText').text()).toBe('hello');
    expect(this.view.$('.CDB-NavMenu .CDB-NavMenu-Item').length).toBe(5);
  });

  it('should go to prev stack layout step if arrow is clicked', function () {
    this.view.$('.js-back').click();
    expect(this.stackLayoutModel.prevStep).toHaveBeenCalledWith('layers');
  });

  afterEach(function () {
    this.view.clean();
  });
});<commit_msg>Updates spec with the current classname<commit_after>var cdb = require('cartodb.js');
var _ = require('underscore');
var LayerDefinitionModel = require('../../../../../javascripts/cartodb3/data/layer-definition-model');
var LayerContentView = require('../../../../../javascripts/cartodb3/editor/layers/layer-content-view');
var ConfigModel = require('../../../../../javascripts/cartodb3/data/config-model');

describe('editor/layers/layer-content-view', function () {
  beforeEach(function () {
    var configModel = new ConfigModel({
      base_url: '/u/pepe'
    });
    this.layer = new LayerDefinitionModel({
      id: 'l-1',
      type: 'tile'
    }, {
      parse: true,
      configModel: configModel
    });

    this.layer.layerTableModel = new cdb.core.Model({ table_name: 'hello' });
    this.stackLayoutModel = jasmine.createSpyObj('stackLayoutModel', ['prevStep']);
    this.view = new LayerContentView({
      layerDefinitionModel: this.layer,
      stackLayoutModel: this.stackLayoutModel
    });

    this.view.render();
  });

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

  it('should render correctly', function () {
    expect(_.size(this.view._subviews)).toBe(2);
    expect(this.view.$('.Editor-HeaderInfo-TitleText').text()).toBe('hello');
    expect(this.view.$('.CDB-NavMenu .CDB-NavMenu-Item').length).toBe(5);
  });

  it('should go to prev stack layout step if arrow is clicked', function () {
    this.view.$('.js-back').click();
    expect(this.stackLayoutModel.prevStep).toHaveBeenCalledWith('layers');
  });

  afterEach(function () {
    this.view.clean();
  });
});
{'fraction_non_alphanumeric': 0.1923195084485407, 'fraction_numerical': 0.003686635944700461, 'mean_word_length': 3.448087431693989, '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': '4155175', 'n_tokens_mistral': 1021, 'n_tokens_neox': 986, 'n_words': 165}