[WiP] rename project from Caravel to Superset (#1576)

* Change in files

* Renamin files and folders

* cleaning up a single piece of lint

* Removing boat picture from docs

* add superset word mark

* Update rename note in docs

* Fixing images

* Pinning datatables

* Fixing issues with mapbox-gl

* Forgot to rename one file

* Linting

* v0.13.0

* adding pyyaml to dev-reqs
This commit is contained in:
Maxime Beauchemin
2016-11-09 23:08:22 -08:00
committed by GitHub
parent 973537fd9a
commit 15b67b2c6c
408 changed files with 2795 additions and 2787 deletions

View File

@@ -0,0 +1,33 @@
/* eslint-disable no-unused-expressions */
import React from 'react';
import { FormControl } from 'react-bootstrap';
import sinon from 'sinon';
import { expect } from 'chai';
import { describe, it, beforeEach } from 'mocha';
import { shallow } from 'enzyme';
import SelectField from '../../../../javascripts/explorev2/components/SelectField';
const defaultProps = {
choices: [[10, 10], [20, 20]],
name: 'row_limit',
label: 'Row Limit',
onChange: sinon.spy(),
};
describe('SelectField', () => {
let wrapper;
beforeEach(() => {
wrapper = shallow(<SelectField {...defaultProps} />);
});
it('renders a FormControl', () => {
expect(wrapper.find(FormControl)).to.have.lengthOf(1);
});
it('calls onChange when toggled', () => {
const select = wrapper.find(FormControl);
select.simulate('change', { target: { value: 50 } });
expect(defaultProps.onChange.calledWith('row_limit', 50)).to.be.true;
});
});