@@ -683,7 +683,7 @@ def test_on_cells_removed(graph_cases) -> None:
683683 graph = graph_cases ('2v_1e' )
684684
685685 graph .selenium .execute_script ('callback = function(cellIds) {window.cellIds = cellIds;}' )
686- graph .eval_js_function ('api.registerCellsRemovedHandler' , js .Variable ('callback' ))
686+ graph .eval_js_function ('api.registerCellsRemovedHandler' , js .Variable ('window. callback' ))
687687
688688 cell_ids = [
689689 graph .get_id (graph .get_vertices ()[0 ]),
@@ -899,7 +899,7 @@ def test_insert_with_tags(graph_cases, cell_type) -> None:
899899 ' );'
900900 '}'
901901 )
902- graph .eval_js_function ('api.registerCellsAddedHandler' , js .Variable ('callback' ))
902+ graph .eval_js_function ('api.registerCellsAddedHandler' , js .Variable ('window. callback' ))
903903 tags = {'tagTest' : '1' }
904904
905905 cell_id = insert_by_parametrized_type (graph , cell_type , tags = tags )
@@ -1194,7 +1194,9 @@ def test_set_double_click_handler(graph_cases) -> None:
11941194 ' window.__dblClick__.push(cellId);'
11951195 '}'
11961196 )
1197- graph .eval_js_function ('api.registerDoubleClickHandler' , qmxgraph .js .Variable ('callback' ))
1197+ graph .eval_js_function (
1198+ 'api.registerDoubleClickHandler' , qmxgraph .js .Variable ('window.callback' )
1199+ )
11981200
11991201 actions = ActionChains (graph .selenium )
12001202 actions .double_click (graph .get_vertex ())
@@ -1220,7 +1222,9 @@ def test_add_selection_change_handler(graph_cases) -> None:
12201222 ' window.__selectionChange__.push(cellIds);'
12211223 '}'
12221224 )
1223- graph .eval_js_function ('api.registerSelectionChangedHandler' , qmxgraph .js .Variable ('callback' ))
1225+ graph .eval_js_function (
1226+ 'api.registerSelectionChangedHandler' , qmxgraph .js .Variable ('window.callback' )
1227+ )
12241228
12251229 # Select all cells.
12261230 actions = ActionChains (graph .selenium )
@@ -1271,7 +1275,7 @@ def test_set_popup_menu_handler(graph_cases) -> None:
12711275 ' window.__popupMenu__.push([cellId, x, y]);'
12721276 '}'
12731277 )
1274- graph .eval_js_function ('api.registerPopupMenuHandler' , qmxgraph .js .Variable ('callback' ))
1278+ graph .eval_js_function ('api.registerPopupMenuHandler' , qmxgraph .js .Variable ('window. callback' ))
12751279
12761280 vertex_label_el = graph .get_label_element (graph .get_vertex ())
12771281 actions = ActionChains (graph .selenium )
0 commit comments