mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
add another wait for chart element (#15108)
This commit is contained in:
parent
7b87eb15bd
commit
7dc0cee5be
@ -21,20 +21,22 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { styled } from '@superset-ui/core';
|
import { styled } from '@superset-ui/core';
|
||||||
|
|
||||||
import { exploreChart, exportChart } from '../../../explore/exploreUtils';
|
import { exploreChart, exportChart } from 'src/explore/exploreUtils';
|
||||||
import SliceHeader from '../SliceHeader';
|
import ChartContainer from 'src/chart/ChartContainer';
|
||||||
import ChartContainer from '../../../chart/ChartContainer';
|
|
||||||
import MissingChart from '../MissingChart';
|
|
||||||
import { slicePropShape, chartPropShape } from '../../util/propShapes';
|
|
||||||
import {
|
import {
|
||||||
LOG_ACTIONS_CHANGE_DASHBOARD_FILTER,
|
LOG_ACTIONS_CHANGE_DASHBOARD_FILTER,
|
||||||
LOG_ACTIONS_EXPLORE_DASHBOARD_CHART,
|
LOG_ACTIONS_EXPLORE_DASHBOARD_CHART,
|
||||||
LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART,
|
LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART,
|
||||||
LOG_ACTIONS_FORCE_REFRESH_CHART,
|
LOG_ACTIONS_FORCE_REFRESH_CHART,
|
||||||
} from '../../../logger/LogUtils';
|
} from 'src/logger/LogUtils';
|
||||||
|
import { areObjectsEqual } from 'src/reduxUtils';
|
||||||
|
|
||||||
|
import SliceHeader from '../SliceHeader';
|
||||||
|
import MissingChart from '../MissingChart';
|
||||||
|
import { slicePropShape, chartPropShape } from '../../util/propShapes';
|
||||||
|
|
||||||
import { isFilterBox } from '../../util/activeDashboardFilters';
|
import { isFilterBox } from '../../util/activeDashboardFilters';
|
||||||
import getFilterValuesByFilterId from '../../util/getFilterValuesByFilterId';
|
import getFilterValuesByFilterId from '../../util/getFilterValuesByFilterId';
|
||||||
import { areObjectsEqual } from '../../../reduxUtils';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
|
@ -114,6 +114,12 @@ class WebDriverProxy:
|
|||||||
WebDriverWait(driver, self._screenshot_load_wait).until_not(
|
WebDriverWait(driver, self._screenshot_load_wait).until_not(
|
||||||
EC.presence_of_all_elements_located((By.CLASS_NAME, "loading"))
|
EC.presence_of_all_elements_located((By.CLASS_NAME, "loading"))
|
||||||
)
|
)
|
||||||
|
logger.debug("Wait for chart to have content")
|
||||||
|
WebDriverWait(driver, self._screenshot_locate_wait).until(
|
||||||
|
EC.visibility_of_all_elements_located(
|
||||||
|
(By.CLASS_NAME, "slice_container")
|
||||||
|
)
|
||||||
|
)
|
||||||
logger.info("Taking a PNG screenshot or url %s", url)
|
logger.info("Taking a PNG screenshot or url %s", url)
|
||||||
img = element.screenshot_as_png
|
img = element.screenshot_as_png
|
||||||
except TimeoutException:
|
except TimeoutException:
|
||||||
|
Loading…
Reference in New Issue
Block a user