Files
superset2/superset/assets/spec/javascripts/explorev2/components/FieldSetRow_spec.js
Maxime Beauchemin 222671675c [exploreV2] mapStateToProps for fields (#1882)
* Controls support for mapStateToProps

* Binding methods in the constructor

* Adressing comments

* Fixing tests
2017-01-06 12:38:44 -08:00

19 lines
741 B
JavaScript

import React from 'react';
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { shallow } from 'enzyme';
import FieldSetRow from '../../../../javascripts/explorev2/components/FieldSetRow';
describe('FieldSetRow', () => {
it('renders a single row with one element', () => {
const wrapper = shallow(<FieldSetRow fields={[<a />]} />);
expect(wrapper.find('.row')).to.have.lengthOf(1);
expect(wrapper.find('.row').find('a')).to.have.lengthOf(1);
});
it('renders a single row with two elements', () => {
const wrapper = shallow(<FieldSetRow fields={[<a />, <a />]} />);
expect(wrapper.find('.row')).to.have.lengthOf(1);
expect(wrapper.find('.row').find('a')).to.have.lengthOf(2);
});
});