|
|
@ -347,7 +347,6 @@ def test_flow_response_filtering(flow_instance):
|
|
|
|
def test_flow_undo_last(flow_instance):
|
|
|
|
def test_flow_undo_last(flow_instance):
|
|
|
|
# Test the undo functionality
|
|
|
|
# Test the undo functionality
|
|
|
|
response1 = flow_instance.run("Task 1")
|
|
|
|
response1 = flow_instance.run("Task 1")
|
|
|
|
response2 = flow_instance.run("Task 2")
|
|
|
|
|
|
|
|
previous_state, message = flow_instance.undo_last()
|
|
|
|
previous_state, message = flow_instance.undo_last()
|
|
|
|
assert response1 == previous_state
|
|
|
|
assert response1 == previous_state
|
|
|
|
assert "Restored to" in message
|
|
|
|
assert "Restored to" in message
|
|
|
@ -577,7 +576,6 @@ def test_flow_rollback(flow_instance):
|
|
|
|
# Test rolling back to a previous state
|
|
|
|
# Test rolling back to a previous state
|
|
|
|
state1 = flow_instance.get_state()
|
|
|
|
state1 = flow_instance.get_state()
|
|
|
|
flow_instance.change_prompt("New prompt")
|
|
|
|
flow_instance.change_prompt("New prompt")
|
|
|
|
state2 = flow_instance.get_state()
|
|
|
|
|
|
|
|
flow_instance.rollback_to_state(state1)
|
|
|
|
flow_instance.rollback_to_state(state1)
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
flow_instance.get_current_prompt() == state1["current_prompt"]
|
|
|
|
flow_instance.get_current_prompt() == state1["current_prompt"]
|
|
|
|