Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ PlotlyGraph.propTypes = {
* plot rather than registering them globally.
*/
locales: PropTypes.object,

/**
* Determines whether or not notifier is displayed
*/
displayNotifier: PropTypes.bool,
}),

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from dash import Dash, Input, Output, dcc, html
from dash.exceptions import PreventUpdate
import json
import os
import pytest
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
Expand Down Expand Up @@ -185,43 +183,4 @@ def on_click_update_graph(n_clicks):
time.sleep(1)
dash_dcc.percy_snapshot(f"Tabs-2 rendered ({is_eager})")

# do some extra tests while we're here
# and have access to Graph and plotly.js
check_graph_config_shape(dash_dcc)

assert dash_dcc.get_logs() == []


def check_graph_config_shape(dash_dcc):
config_schema = dash_dcc.driver.execute_script(
"return Plotly.PlotSchema.get().config;"
)
with open(os.path.join(dcc.__path__[0], "metadata.json")) as meta:
graph_meta = json.load(meta)["src/components/Graph.react.js"]
config_prop_shape = graph_meta["props"]["config"]["type"]["value"]

ignored_config = [
"setBackground",
"showSources",
"logging",
"globalTransforms",
"notifyOnLogging",
"role",
"typesetMath",
]

def crawl(schema, props):
for prop_name in props:
assert prop_name in schema

for item_name, item in schema.items():
if item_name in ignored_config:
continue

assert item_name in props
if "valType" not in item:
crawl(item, props[item_name]["value"])

crawl(config_schema, config_prop_shape)

assert dash_dcc.get_logs() == []
Loading