mirror of
https://github.com/apache/superset.git
synced 2026-04-09 19:35:21 +00:00
* upgrade celery to 4.0.2 * using Redis for unit tests (sqla broker not supported in Celery 4) * Setting Celery's soft_time_limit based on `SQLLAB_ASYNC_TIME_LIMIT_SEC` config * Better error handling in async tasks * Better statsd logging in async tasks * show [pending/running] query status in Results tab * systematically using sqla NullPool on worker (async) to limit number of database connections
30 lines
792 B
JavaScript
30 lines
792 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 '../../../javascripts/SqlLab/components/QueryStateLabel';
|
|
|
|
describe('SavedQuery', () => {
|
|
const mockedProps = {
|
|
query: {
|
|
state: 'running',
|
|
},
|
|
};
|
|
it('is valid', () => {
|
|
expect(
|
|
React.isValidElement(<QueryStateLabel />),
|
|
).to.equal(true);
|
|
});
|
|
it('is valid with props', () => {
|
|
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);
|
|
});
|
|
});
|