mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
More Dashboard UX unit tests (#1603)
This commit is contained in:
committed by
GitHub
parent
4f7f437527
commit
c362f2869e
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import CssEditor from '../../../javascripts/dashboard/components/CssEditor';
|
||||
import { mount } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
|
||||
describe('CssEditor', () => {
|
||||
const mockedProps = {
|
||||
triggerNode: <i className="fa fa-edit" />,
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<CssEditor {...mockedProps} />)
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders the trigger node', () => {
|
||||
const wrapper = mount(<CssEditor {...mockedProps} />);
|
||||
expect(wrapper.find('.fa-edit')).to.have.length(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user