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

*** Variables ***
${path}           /api/ability/page

*** Test Cases ***
正例-获取分页
    [Tags]    F
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"pageIndex":1,"pageSize":10}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    成功
    Should Be Equal As Strings    ${content["data"][0]["name"]}    outhagent

反例-不传入token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"pageIndex":1,"pageSize":10}    401    {}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401
    Should Be Equal As Strings    ${content["message"]}    无效的access token

反例-传入错误参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"workerId":"a68ad587830d41aebf418a919006353e"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    成功

反例-传入空参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    成功
