<commit_before>
describe("mapview", function() {

  var view;
  beforeEach(function() {
    var table = TestUtil.createTable('test');
    var infowindow = new cdb.geo.ui.InfowindowModel({ });
    var map = new cdb.admin.Map();
    map.layers.add(new cdb.geo.MapLayer());
    map.layers.add(new cdb.geo.MapLayer());

    view = new cdb.admin.MapTab({
      model: map,
      table: table,
      infowindow: infowindow,
      menu: new cdb.admin.RightMenu({})
    });
    // view.baseLayerChooser = {
    //   render: function() {
    //     return {
    //       "el": "dummy"
    //     }
    //   }
    // }
    // view._bindDataLayer(map.get('dataLayer').cid);

  });

  afterEach(function() {
    localStorage.clear();
  })

  it("should render", function() {
    view.render();
    expect(view.$('#map').length).toEqual(1);
    expect(view.$('.base_maps').length).toEqual(1);
    expect(view.$('.share').length).toEqual(1);
  });


  it("should trigger the georef warning when there's no geom in the table", function() {
    localStorage.clear();
    view.bindGeoRefCheck();
    view.render();
    view.options.table.trigger("dataLoaded");
    expect(view.noGeoRefDialog).toBeTruthy()
  })


  it("should trigger the georef warning when there's no data in the table", function() {
    view.options.table = TestUtil.createTable('test', [['the_geom', 'geometry']]);
    view.bindGeoRefCheck();
    view.render();<commit_msg>dropdown html leftovers removed from tests<commit_after>
describe("mapview", function() {

  var view;
  beforeEach(function() {
    var table = TestUtil.createTable('test');
    var infowindow = new cdb.geo.ui.InfowindowModel({ });
    var map = new cdb.admin.Map();
    map.layers.add(new cdb.geo.MapLayer());
    map.layers.add(new cdb.geo.MapLayer());
    var element = $('<div class="pato"></div>');
    element.appendTo($('body'))
    view = new cdb.admin.MapTab({
      model: map,
      table: table,
      infowindow: infowindow,
      menu: new cdb.admin.RightMenu({}),
      el: element
    });
    window.aaa= view;
    // view.baseLayerChooser = {
    //   render: function() {
    //     return {
    //       "el": "dummy"
    //     }
    //   }
    // }
    // view._bindDataLayer(map.get('dataLayer').cid);

  });

  afterEach(function() {
    localStorage.clear();
    view.$el.html('').remove();
    $('.dropdown').remove();
  })

  it("should render", function() {
    view.render();
    expect(view.$('#map').length).toEqual(1);
    expect(view.$('.base_maps').length).toEqual(1);
    expect(view.$('.share').length).toEqual(1);
  });


  it("should trigger the georef warning when there's no geom in the table", function() {
    localStorage.clear();
    view.bindGeoRefCheck();
    view.render();
    view.options.table.trigger("dataLoaded");
    expect(view.noGeoRefDialog).toBeTruthy()
  })


  it("should trigger the georef warning when there's no data in the table", function() {
    view.options.table = TestUtil.createTable('test', [['the_geom', 'geometry']]);
    view.bindGeoRefCheck();
    view.render();
{'fraction_non_alphanumeric': 0.18445968005223637, 'fraction_numerical': 0.0019588638589618022, 'mean_word_length': 2.933247753530167, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '6882657', 'n_tokens_mistral': 1021, 'n_tokens_neox': 998, 'n_words': 187}