mirror of
https://github.com/apache/superset.git
synced 2026-04-09 03:16:07 +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
24 lines
621 B
JavaScript
24 lines
621 B
JavaScript
import React from 'react';
|
|
import { Label } from 'react-bootstrap';
|
|
import { shallow } from 'enzyme';
|
|
import { expect } from 'chai';
|
|
|
|
import QueryStateLabel from '../../../src/SqlLab/components/QueryStateLabel';
|
|
|
|
describe('SavedQuery', () => {
|
|
const mockedProps = {
|
|
query: {
|
|
state: 'running',
|
|
},
|
|
};
|
|
it('is valid', () => {
|
|
expect(
|
|
React.isValidElement(<QueryStateLabel {...mockedProps} />),
|
|
).to.equal(true);
|
|
});
|
|
it('has an Overlay and a Popover', () => {
|
|
const wrapper = shallow(<QueryStateLabel {...mockedProps} />);
|
|
expect(wrapper.find(Label)).to.have.length(1);
|
|
});
|
|
});
|