@@ -189,9 +189,9 @@ def test_agent_workflow_with_retry(self):
189189 from sentience .models import ActionResult
190190
191191 mock_snapshot .return_value = create_mock_snapshot ()
192- # First call fails , second succeeds
192+ # First call raises exception (triggers retry) , second succeeds
193193 mock_click .side_effect = [
194- ActionResult ( success = False , duration_ms = 100 , outcome = "error " ),
194+ RuntimeError ( "Element not found " ),
195195 ActionResult (success = True , duration_ms = 150 , outcome = "dom_updated" ),
196196 ]
197197
@@ -232,7 +232,7 @@ def test_agent_workflow_finish_action(self):
232232 llm = MockLLMProvider (responses = ["FINISH()" ])
233233 agent = SentienceAgent (browser , llm , verbose = False )
234234
235- with patch ("sentience.snapshot .snapshot" ) as mock_snapshot :
235+ with patch ("sentience.agent .snapshot" ) as mock_snapshot :
236236 mock_snapshot .return_value = create_mock_snapshot ()
237237
238238 result = agent .act ("Task is complete" , max_retries = 0 )
@@ -421,4 +421,3 @@ def test_agent_step_count_increments(self):
421421
422422 agent .act ("Second action" , max_retries = 0 )
423423 assert agent ._step_count == initial_count + 2
424-
0 commit comments