ACT001_actual_detail_testcases.yml 1.7 KB
config:
    name: ACT001-实际订单-各个值计算正确
    base_url: ${ENV(base_manager_url)}
    variables:
        partnerID: ${ENV(partnerId)}
        commissionProportion: 5
        orderNum1: 100
        univalence: 15
        partnerRatio: 10
        orderNum2: 200
#        univalence2: 15
#        partnerRatio2: 20

teststeps:
-   name: $phone 登录系统
    variables:
      phone: ${ENV(adminphone)}
    testcase: testcases/common/m_login_testcases.yml

-   name: 新增实发订单
    variables:
        saleDate: ${get_today()}
    api: api/m_api/actual/m_add_order_actual_api.yml
    extract:
        - orderid: content.data.id
    validate:
        - eq:
          - content.msg
          - ok

-   name: 查看实际订单列表
    api: api/m_api/actual/m_order_actual_list_api.yml
    extract:
      - actual_id: content.data.gridResult.lists.0.id
    validate:
        - eq:
          - content.data.gridResult.lists.0.id
          - ${convert_to_string($orderid)}
        - eq:
              - content.msg
              - ok
        - eq:
            - content.data.gridResult.lists.0.orderNum
            - ${add($orderNum1,$orderNum2)}
        - eq:
            - content.data.gridResult.lists.0.orderPrice
            - 4500


-   name: 查看实际订单详情
    variables:
      id: ${convert_to_string($orderid)}
    api: api/m_api/actual/m_order_actual_detail_api.yml
    validate:
        - eq:
            - content.data.orderNumCount
            - ${add($orderNum1,$orderNum2)}
        - eq:
            - content.data.orderAmountAdjustmentCount
            - 4500
        - eq:
            - content.data.product.0.orderPrice
            - 1500
        - eq:
            - content.data.product.1.orderPrice
            - 3000