Skip to content

Commit 63f14af

Browse files
author
Marc-André Rivet
committed
redux_state_rqs legacy support
1 parent 2dc22dc commit 63f14af

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: dash/testing/dash_page.py

+14
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ def redux_state_paths(self):
3636
def redux_state_rqs(self):
3737
return self.driver.execute_script(
3838
"""
39+
40+
// Check for legacy `pendingCallbacks` store prop (compatibility for Dash matrix testing)
41+
var pendingCallbacks = window.store.getState().pendingCallbacks;
42+
if (pendingCallbacks) {
43+
return pendingCallbacks.map(function(cb) {
44+
var out = {};
45+
for (var key in cb) {
46+
if (typeof cb[key] !== 'function') { out[key] = cb[key]; }
47+
}
48+
return out;
49+
});
50+
}
51+
52+
// Otherwise, use the new `callbacks` store prop
3953
var callbacksState = Object.assign({}, window.store.getState().callbacks);
4054
delete callbacksState.stored;
4155
delete callbacksState.completed;

0 commit comments

Comments
 (0)