diff --git a/tests/integration/callbacks/test_layout_paths_with_callbacks.py b/tests/integration/callbacks/test_layout_paths_with_callbacks.py index 5f6d396f8b..3f4f5219fa 100644 --- a/tests/integration/callbacks/test_layout_paths_with_callbacks.py +++ b/tests/integration/callbacks/test_layout_paths_with_callbacks.py @@ -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 diff --git a/tests/integration/test_render.py b/tests/integration/test_render.py index 04e4bbc3c2..a230edf903 100644 --- a/tests/integration/test_render.py +++ b/tests/integration/test_render.py @@ -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)) diff --git a/tests/integration/test_scripts.py b/tests/integration/test_scripts.py index 6f86afc1d4..3900ea6979 100644 --- a/tests/integration/test_scripts.py +++ b/tests/integration/test_scripts.py @@ -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