*** Settings ***
Documentation    Integration tests for actor show CLI output fields
Resource         ${CURDIR}/common.resource
Suite Setup      Setup Test Environment
Suite Teardown   Cleanup Test Environment

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

*** Test Cases ***
Actor Show JSON Contains Required Fields
    [Documentation]    Verify that ``actor show --format json`` returns all required fields
    [Tags]    tdd_issue    tdd_issue_4201
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    show-json-fields    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    actor-cli-show-json-fields-ok

Actor Show YAML Produces Valid Output
    [Documentation]    Verify that ``actor show --format yaml`` produces YAML output
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    show-yaml-output    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    actor-cli-show-yaml-output-ok

Actor List JSON Returns Array
    [Documentation]    Verify that ``actor list --format json`` returns a JSON array
    [Tags]    tdd_issue    tdd_issue_4201
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    list-json-format    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    actor-cli-list-json-format-ok
