mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
[js-testing] more tests for SelectControl (#2877)
* rename spec folder * remove special handling for viz_type control since it now uses VizTypeControl * add test for getOptions * linting * add test for cwp * linting
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/* eslint-disable no-unused-expressions */
|
||||
import React from 'react';
|
||||
import { Checkbox } from 'react-bootstrap';
|
||||
import sinon from 'sinon';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it, beforeEach } from 'mocha';
|
||||
import { mount } from 'enzyme';
|
||||
|
||||
import CheckboxControl from '../../../../javascripts/explore/components/controls/CheckboxControl';
|
||||
|
||||
const defaultProps = {
|
||||
name: 'show_legend',
|
||||
onChange: sinon.spy(),
|
||||
value: false,
|
||||
};
|
||||
|
||||
describe('CheckboxControl', () => {
|
||||
let wrapper;
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(<CheckboxControl {...defaultProps} />);
|
||||
});
|
||||
|
||||
it('renders a Checkbox', () => {
|
||||
expect(wrapper.find(Checkbox)).to.have.lengthOf(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user