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 @@ -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)
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/test_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand Up @@ -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


Expand Down