Skip to content

Fix test regressions related to dcc.Graph changes #1066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 6, 2020
Merged
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
@@ -148,6 +148,10 @@ def update_label(value):
dash_duo.start_server(app)

def check_chapter(chapter):
dash_duo.wait_for_element(
'#{}-graph:not(.dash-graph--pending)'.format(chapter)
)

for key in dash_duo.redux_state_paths:
assert dash_duo.find_elements(
"#{}".format(key)
@@ -158,13 +162,17 @@ def check_chapter(chapter):
if chapter == "chapter3"
else chapters[chapter]["{}-controls".format(chapter)].value
)

# check the actual values
dash_duo.wait_for_text_to_equal("#{}-label".format(chapter), value)

wait.until(
lambda: (
dash_duo.driver.execute_script(
"return document."
'getElementById("{}-graph").'.format(chapter)
'querySelector("#{}-graph:not(.dash-graph--pending) .js-plotly-plot").'.format(
chapter
)
+ "layout.title.text"
)
== value
8 changes: 4 additions & 4 deletions tests/integration/test_render.py
Original file line number Diff line number Diff line change
@@ -965,10 +965,10 @@ def render_content(tab):

self.startServer(app)

self.wait_for_element_by_css_selector('#graph1')
self.wait_for_element_by_css_selector('#graph1:not(.dash-graph--pending)')

self.driver.find_elements_by_css_selector(
'#graph1'
'#graph1:not(.dash-graph--pending)'
)[0].click()

graph_1_expected_clickdata = {
@@ -985,10 +985,10 @@ def render_content(tab):
'#tab2'
)[0].click()

self.wait_for_element_by_css_selector('#graph2')
self.wait_for_element_by_css_selector('#graph2:not(.dash-graph--pending)')

self.driver.find_elements_by_css_selector(
'#graph2'
'#graph2:not(.dash-graph--pending)'
)[0].click()

self.wait_for_text_to_equal('#graph2_info', json.dumps(graph_2_expected_clickdata))
2 changes: 1 addition & 1 deletion tests/integration/test_scripts.py
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@

def findSyncPlotlyJs(scripts):
for script in scripts:
if "dash_core_components/plotly-" in script.get_attribute('src'):
if "dash_core_components/plotly" in script.get_attribute('src'):
return script