*** Settings ***
Resource          flow_zmx.resource
Resource          res_zmx.resource

*** Variables ***
${path}           /api/v1/ability/steps

*** Test Cases ***
正例-获取步骤列表
    [Tags]    F
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"session_id":"${EXPsessionId}","client_id":"${clientId}"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200

反例-不传入token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"session_id":"${EXPsessionId}","client_id":"${clientId}"}    401    {}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-传入错误参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"workerId1":"a68ad587830d41aebf418a919006353e"}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["type"]}    missing

反例-传入空参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["type"]}    missing

反例-会话过期
    [Tags]    F
    Comment    当前版本会话保持持久化，不会过期，此用例废弃
    Comment    create session    URI    ${URL}
    Comment    ${content}    GET请求结果    ${path}    {"exploreSessionId":1,"chatbotSessionId":10}    200    ${token}
    Comment    log    ${content}
    Comment    Should Be Equal As Strings    ${content["code"]}    BAE0001
    Comment    Should Be Equal As Strings    ${content["message"]}    会话已过期，请开启新对话
