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

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

*** Test Cases ***
正例-创建能力草稿
    [Tags]    F
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}    {"session_id":"${EXPsessionId}","filtered_step_indices":[0],"client_id":"${clientId}"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200

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

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

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