*** Settings ***
Documentation    Smoke tests for A2A local facade and server stubs
Resource         ${CURDIR}/common.resource
Suite Setup      Setup Test Environment
Suite Teardown   Cleanup Test Environment

*** Variables ***
${HELPER}    ${CURDIR}/helper_a2a_facade.py

*** Test Cases ***
A2A Local Facade Dispatch Session Create
    [Documentation]    Verify local facade dispatches session.create successfully
    [Tags]    tdd_issue    tdd_issue_4190
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    facade-dispatch    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    a2a-facade-dispatch-ok

A2A HTTP Transport Stub Error
    [Documentation]    Verify HTTP transport raises A2aNotAvailableError
    [Tags]    tdd_issue    tdd_issue_4190
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    transport-stub    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    a2a-transport-stub-ok

A2A Event Queue Local Mode
    [Documentation]    Verify event queue publish and subscribe work locally
    [Tags]    tdd_issue    tdd_issue_4190
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    event-queue    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    a2a-event-queue-ok

A2A Version Negotiation
    [Documentation]    Verify version negotiation succeeds for 1.0 and fails for 2.0
    [Tags]    tdd_issue    tdd_issue_4199    tdd_expected_fail
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    version-negotiate    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    a2a-version-negotiate-ok

A2A Operation Listing
    [Documentation]    Verify list_operations returns all expected operations
    [Tags]    tdd_issue    tdd_issue_4190
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    list-operations    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    a2a-list-operations-ok
