File tree 3 files changed +14
-6
lines changed
3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ def update_label(value):
148
148
dash_duo .start_server (app )
149
149
150
150
def check_chapter (chapter ):
151
+ dash_duo .wait_for_element (
152
+ '#{}-graph:not(.dash-graph--pending)' .format (chapter )
153
+ )
154
+
151
155
for key in dash_duo .redux_state_paths :
152
156
assert dash_duo .find_elements (
153
157
"#{}" .format (key )
@@ -158,13 +162,17 @@ def check_chapter(chapter):
158
162
if chapter == "chapter3"
159
163
else chapters [chapter ]["{}-controls" .format (chapter )].value
160
164
)
165
+
161
166
# check the actual values
162
167
dash_duo .wait_for_text_to_equal ("#{}-label" .format (chapter ), value )
168
+
163
169
wait .until (
164
170
lambda : (
165
171
dash_duo .driver .execute_script (
166
172
"return document."
167
- 'getElementById("{}-graph").' .format (chapter )
173
+ 'querySelector("#{}-graph:not(.dash-graph--pending) .js-plotly-plot").' .format (
174
+ chapter
175
+ )
168
176
+ "layout.title.text"
169
177
)
170
178
== value
Original file line number Diff line number Diff line change @@ -965,10 +965,10 @@ def render_content(tab):
965
965
966
966
self .startServer (app )
967
967
968
- self .wait_for_element_by_css_selector ('#graph1' )
968
+ self .wait_for_element_by_css_selector ('#graph1:not(.dash-graph--pending) ' )
969
969
970
970
self .driver .find_elements_by_css_selector (
971
- '#graph1'
971
+ '#graph1:not(.dash-graph--pending) '
972
972
)[0 ].click ()
973
973
974
974
graph_1_expected_clickdata = {
@@ -985,10 +985,10 @@ def render_content(tab):
985
985
'#tab2'
986
986
)[0 ].click ()
987
987
988
- self .wait_for_element_by_css_selector ('#graph2' )
988
+ self .wait_for_element_by_css_selector ('#graph2:not(.dash-graph--pending) ' )
989
989
990
990
self .driver .find_elements_by_css_selector (
991
- '#graph2'
991
+ '#graph2:not(.dash-graph--pending) '
992
992
)[0 ].click ()
993
993
994
994
self .wait_for_text_to_equal ('#graph2_info' , json .dumps (graph_2_expected_clickdata ))
Original file line number Diff line number Diff line change 30
30
31
31
def findSyncPlotlyJs (scripts ):
32
32
for script in scripts :
33
- if "dash_core_components/plotly- " in script .get_attribute ('src' ):
33
+ if "dash_core_components/plotly" in script .get_attribute ('src' ):
34
34
return script
35
35
36
36
You can’t perform that action at this time.
0 commit comments