*** Settings ***
Documentation    Smoke tests for the --skill flag on the actor-run run command
Resource         ${CURDIR}/common.resource
Suite Setup      Setup Test Environment
Suite Teardown   Cleanup Test Environment

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

*** Test Cases ***
Actor Run With Unknown Skill Exits With Error
    [Documentation]    Verify that ``actor-run run --skill local/nonexistent`` exits
    ...                with code 2 and an error message containing "not found in registry".
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    unknown-skill    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    skill-actor-run-unknown-skill-ok

Actor Run Skill Flag Accepted
    [Documentation]    Verify that ``actor-run run --skill local/smoke-skill`` is
    ...                accepted by the CLI when the skill exists in the registry.
    ${result}=    Run Process    ${PYTHON}    ${HELPER}    skill-flag-accepted    cwd=${WORKSPACE}
    Log    ${result.stdout}
    Log    ${result.stderr}
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    skill-actor-run-flag-accepted-ok
