fix: Drill to detail blocked by tooltip (#22082)

Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
This commit is contained in:
Michael S. Molina
2022-11-23 14:50:06 -05:00
committed by GitHub
parent 1809d2b957
commit 3bc0865d90
45 changed files with 572 additions and 255 deletions

View File

@@ -16,13 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ChartProps, supersetTheme } from '@superset-ui/core';
import { ChartProps, SqlaFormData, supersetTheme } from '@superset-ui/core';
import transformProps from '../../src/Graph/transformProps';
import { DEFAULT_GRAPH_SERIES_OPTION } from '../../src/Graph/constants';
import { EchartsGraphChartProps } from '../../src/Graph/types';
describe('EchartsGraph transformProps', () => {
it('should transform chart props for viz without category', () => {
const formData = {
const formData: SqlaFormData = {
colorScheme: 'bnbColors',
datasource: '3__table',
granularity_sqla: 'ds',
@@ -30,6 +31,7 @@ describe('EchartsGraph transformProps', () => {
source: 'source_column',
target: 'target_column',
category: null,
viz_type: 'graph',
};
const queriesData = [
{
@@ -57,7 +59,7 @@ describe('EchartsGraph transformProps', () => {
};
const chartProps = new ChartProps(chartPropsConfig);
expect(transformProps(chartProps)).toEqual(
expect(transformProps(chartProps as EchartsGraphChartProps)).toEqual(
expect.objectContaining({
width: 800,
height: 600,
@@ -151,7 +153,7 @@ describe('EchartsGraph transformProps', () => {
});
it('should transform chart props for viz with category and falsey normalization', () => {
const formData = {
const formData: SqlaFormData = {
colorScheme: 'bnbColors',
datasource: '3__table',
granularity_sqla: 'ds',
@@ -160,6 +162,7 @@ describe('EchartsGraph transformProps', () => {
target: 'target_column',
sourceCategory: 'source_category_column',
targetCategory: 'target_category_column',
viz_type: 'graph',
};
const queriesData = [
{
@@ -197,7 +200,7 @@ describe('EchartsGraph transformProps', () => {
};
const chartProps = new ChartProps(chartPropsConfig);
expect(transformProps(chartProps)).toEqual(
expect(transformProps(chartProps as EchartsGraphChartProps)).toEqual(
expect.objectContaining({
width: 800,
height: 600,