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

*** Variables ***
${path}           /api/v1/web_instruction/delete

*** Test Cases ***
反例-使用普通权限删除网页说明
    [Tags]    E
    ${secs1}    Get Time    epoch
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}/${WI_id_normal}    {}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    WebInstruction deleted successfully

反例-不传入token
    [Tags]    E
    ${secs1}    Get Time    epoch
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}/${WI_id}    {}    401    ${EMPTY}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-传入空白token
    [Tags]    E
    ${secs1}    Get Time    epoch
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}/${WI_id}    {}    401    {}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

正例-正常删除网页说明
    [Tags]    F
    ${secs1}    Get Time    epoch
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}/${WI_id}    {}    200    ${zh_token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    WebInstruction deleted successfully
