Skip to content

Commit b7a59af

Browse files
Merge pull request #111 from ESSS/fb-ASIM-4389-detail-tables-blink-on-load
Add a default filter to test helper functions
2 parents e9f2d26 + 1738eff commit b7a59af

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/qmxgraph/common_testing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
from qmxgraph.widget import QmxGraph
88

99

10-
def get_cell_count(widget: QmxGraph, filter_function: str) -> int:
10+
RETURN_ALL_CELLS_FILTER = 'function(cell) { return true }'
11+
12+
13+
def get_cell_count(widget: QmxGraph, filter_function: str = RETURN_ALL_CELLS_FILTER) -> int:
1114
"""
1215
:param widget: The widget used to display the graph.
1316
:param filter_function: A javascript function used to filter the cells.
@@ -18,7 +21,7 @@ def get_cell_count(widget: QmxGraph, filter_function: str) -> int:
1821
return len(get_cell_ids(widget, filter_function))
1922

2023

21-
def get_cell_ids(widget: QmxGraph, filter_function: str) -> List[str]:
24+
def get_cell_ids(widget: QmxGraph, filter_function: str = RETURN_ALL_CELLS_FILTER) -> List[str]:
2225
"""
2326
:param widget: The widget used to display the graph.
2427
:param filter_function: A javascript function used to filter the cells.

0 commit comments

Comments
 (0)