Files
cartodb/lib/assets/test/spec/dashboard/views/public-dataset/table-tab/table-tab.spec.js
T
2020-06-15 10:58:47 +08:00

36 lines
1.1 KiB
JavaScript

const CartoTableMetadata = require('dashboard/views/public-dataset/carto-table-metadata');
const TableTab = require('dashboard/views/public-dataset/table-tab/table-tab');
const VisualizationModel = require('dashboard/data/visualization-model');
const configModel = require('fixtures/dashboard/config-model.fixture');
// This test is not passable, because Geocoding feature is not migrated
xdescribe('TableTab', function () {
let tview, model;
beforeEach(function () {
model = new CartoTableMetadata({
name: 'test',
configModel
});
tview = new TableTab({
model: model,
// geocoder: new cdb.admin.Geocoding(),
vis: new VisualizationModel({}, { configModel })
});
});
it('should render a div', function () {
tview.render();
expect(tview.$el.hasClass('table')).toBeTruthy();
});
it('should have a geocoding binding from the begining', function () {
tview.render();
spyOn(tview.model.data(), 'refresh');
tview.geocoder.trigger('geocodingComplete');
expect(tview.model.data().refresh).toHaveBeenCalled();
});
});