File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed
dash-renderer/src/reducers
tests/integration/devtools Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ const defaultProfile = {
21
21
const defaultState = {
22
22
updated : [ ] ,
23
23
resources : { } ,
24
- callbacks : { }
24
+ callbacks : { } ,
25
+ graphLayout : null
25
26
} ;
26
27
27
28
const profile = ( state = defaultState , action ) => {
@@ -36,7 +37,8 @@ const profile = (state = defaultState, action) => {
36
37
const newState = {
37
38
updated : [ id ] ,
38
39
resources : state . resources ,
39
- callbacks : state . callbacks
40
+ callbacks : state . callbacks ,
41
+ graphLayout : state . graphLayout
40
42
} ;
41
43
42
44
newState . callbacks [ id ] =
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def test_dvui003_callback_graph(dash_duo):
89
89
cbProfiles[k].network.time = 33;
90
90
cbProfiles[k].total = 77;
91
91
});
92
- """
92
+ """
93
93
)
94
94
95
95
dash_duo .find_element (".dash-debug-menu" ).click ()
@@ -99,3 +99,28 @@ def test_dvui003_callback_graph(dash_duo):
99
99
dash_duo .find_element ('canvas[data-id="layer2-node"]' )
100
100
101
101
dash_duo .percy_snapshot ("devtools - callback graph" , convert_canvases = True )
102
+
103
+ pos = dash_duo .driver .execute_script (
104
+ """
105
+ const pos = store.getState().profile.graphLayout.positions['new-item.value'];
106
+ pos.y -= 100;
107
+ return pos.y;
108
+ """
109
+ )
110
+
111
+ # hide and redraw the callback graph so we get the new position
112
+ dash_duo .find_element (".dash-debug-menu__button--callbacks" ).click ()
113
+ dash_duo .find_element (".dash-debug-menu__button--callbacks" ).click ()
114
+ sleep (2 )
115
+
116
+ # fire callbacks so the callback graph redraws again
117
+ dash_duo .find_element ("#add" ).click ()
118
+ dash_duo .wait_for_text_to_equal ("#totals" , "0 of 1 items completed - 0%" )
119
+ sleep (1 )
120
+ # the manually moved node is still in its new position
121
+ assert pos == dash_duo .driver .execute_script (
122
+ """
123
+ const pos = store.getState().profile.graphLayout.positions['new-item.value'];
124
+ return pos.y;
125
+ """
126
+ )
You can’t perform that action at this time.
0 commit comments