mirror of
https://github.com/apache/superset.git
synced 2026-04-11 20:37:16 +00:00
25 lines
659 B
JavaScript
25 lines
659 B
JavaScript
import React from 'react';
|
|
import { Label } from 'react-bootstrap';
|
|
import { shallow } from 'enzyme';
|
|
import { describe, it } from 'mocha';
|
|
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);
|
|
});
|
|
});
|