mirror of
https://github.com/apache/superset.git
synced 2026-04-09 11:25:23 +00:00
* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues * [lint] fix undefined var in TimeTable.jsx
21 lines
616 B
JavaScript
21 lines
616 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import { expect } from 'chai';
|
|
|
|
import RefreshIntervalModal from '../../../../src/dashboard/components/RefreshIntervalModal';
|
|
|
|
describe('RefreshIntervalModal', () => {
|
|
const mockedProps = {
|
|
triggerNode: <i className="fa fa-edit" />,
|
|
};
|
|
it('is valid', () => {
|
|
expect(
|
|
React.isValidElement(<RefreshIntervalModal {...mockedProps} />),
|
|
).to.equal(true);
|
|
});
|
|
it('renders the trigger node', () => {
|
|
const wrapper = mount(<RefreshIntervalModal {...mockedProps} />);
|
|
expect(wrapper.find('.fa-edit')).to.have.length(1);
|
|
});
|
|
});
|