*** Settings ***
Documentation    WF17: Project-level execution environment priority
...    Verifies that project context set --execution-env-priority
...    persists the setting and that project context show displays it.
Resource    ${CURDIR}/common_e2e.resource
Suite Setup    E2E Suite Setup
Suite Teardown    E2E Suite Teardown

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

*** Test Cases ***
Project Context Set Accepts Execution Env Priority
  [Documentation]    WF17 AC1: project context set accepts --execution-env-priority
  ${result}=    Run Process    ${PYTHON}    ${HELPER}    set-priority
  ...    cwd=${WORKSPACE}    timeout=30s    on_timeout=kill
  Log    ${result.stdout}
  Log    ${result.stderr}
  Should Be Equal As Integers    ${result.rc}    0
  Should Contain    ${result.stdout}    set-priority-ok

Project Context Show Displays Execution Env Priority
  [Documentation]    WF17 AC2: project context show displays the priority
    [Tags]    tdd_issue    tdd_issue_4307

  ${result}=    Run Process    ${PYTHON}    ${HELPER}    show-priority
  ...    cwd=${WORKSPACE}    timeout=30s    on_timeout=kill
  Log    ${result.stdout}
  Log    ${result.stderr}
  Should Be Equal As Integers    ${result.rc}    0
  Should Contain    ${result.stdout}    show-priority-ok
