test_case_id: edit_image_happy_path
description: "Tests the happy path for the edit_image_with_gemini tool."
tags: ["all","agent","tools","image_tools"]
skip_intermediate_events: true

setup_artifacts:
  - filename: "test_image.png"
    content_base64: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
    mime_type: "image/png"

gateway_input:
  user_identity: "test_user@example.com"
  target_agent_name: "TestAgent"
  prompt: "Edit the image test_image.png to place a blue dot in the center. Save it as edited_image.jpg"
  tool_names: ["edit_image_with_gemini"]
  external_context:
    a2a_session_id: "session_edit_image_happy_path"

llm_interactions:
  - static_response:
      choices:
        - message:
            role: "assistant"
            tool_calls:
              - id: "call_123"
                type: "function"
                function:
                  name: "edit_image_with_gemini"
                  arguments: '{"image_filename": "test_image.png", "edit_prompt": "place a blue dot in the center", "output_filename": "edited_image.jpg"}'
  - expected_request:
      messages:
        - role: "tool"
          content_contains: "Image edited and saved successfully"
          tool_call_id: "call_123"
    static_response:
      choices:
        - message:
            role: "assistant"
            content: "I have successfully edited the image and saved it as edited_image.jpg."

expected_gateway_output:
  - type: "final_response"
    task_state: "completed"
    content_parts:
      - type: "text"
        text_contains: "I have successfully edited the image and saved it as edited_image.jpg."

expected_artifacts:
  - filename: "edited_image.jpg"
    mime_type: "image/jpeg"
    metadata_contains:
      original_image: "test_image.png"
      edit_prompt: "place a blue dot in the center"
      editing_tool: "gemini"
