WIP: fixing regressions in tests
This commit is contained in:
@@ -36,11 +36,21 @@ def app_instance():
|
||||
|
||||
def test_render_synthesis_panel(app_instance):
|
||||
"""Verify that _render_synthesis_panel renders checkboxes for takes and input for prompt."""
|
||||
with patch('src.gui_2.imgui') as mock_imgui:
|
||||
with patch('src.gui_2.imgui') as mock_imgui, \
|
||||
patch('src.gui_2.imscope') as mock_imscope:
|
||||
mock_imgui.checkbox.return_value = (False, False)
|
||||
mock_imgui.input_text_multiline.return_value = (False, app_instance.ui_synthesis_prompt)
|
||||
mock_imgui.button.return_value = False
|
||||
|
||||
# Setup imscope mocks
|
||||
mock_imscope.window.return_value.__enter__.return_value = (True, True)
|
||||
mock_imscope.child.return_value.__enter__.return_value = True
|
||||
mock_imscope.table.return_value.__enter__.return_value = True
|
||||
mock_imscope.tree_node_ex.return_value.__enter__.return_value = True
|
||||
mock_imscope.tab_item.return_value.__enter__.return_value = (True, True)
|
||||
mock_imscope.style_color.return_value.__enter__.return_value = None
|
||||
mock_imscope.style_var.return_value.__enter__.return_value = None
|
||||
|
||||
# Call the method we are testing
|
||||
app_instance._render_synthesis_panel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user