DIV003_1_dividends_cal_testcases.yml 2.9 KB
config:
    name: DIV003_1-分红管理-初始状态-各个值计算正确
    base_url: ${ENV(base_manager_url)}
    variables:
      partnerID: 1047
      commissionProportion: 5
      orderNum1: 100
      univalence: 15
      partnerRatio: 10
      orderNum2: 200
#      partnerRatio2: 20

teststeps:
-   name: 新增实际订单
    testcase: testcases/common/COM001_actual_add_testcases.yml
    output:
      - actual_id

-   name: 查看该订单的分红详情
    variables:
      id: ${convert_to_string($actual_id)}
    api: api/m_api/dividends/m_dividends_detail_api.yml
    validate:
        - eq:
          - content.data.order.orderId
          - $actual_id
        #####合伙人应收分红总额
        - eq:
              - content.data.order.partnerDividends
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
        #####合伙人已收分红总额
        - eq:
            - content.data.order.receivedDividends
            - ${convert_to_string(0)}
        #####合伙人未收分红总额
        - eq:
            - content.data.order.notReceivedDividend
            - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
        #####合伙人分红支出总额
        - eq:
            - content.data.order.dividendSpending
            - ${convert_to_string(0)}
        #####订单类型
        - eq:
            - content.data.order.orderType
            - 1
        #####产品1总金额
        - eq:
            - content.data.product.detail.0.commodityPrice
            - 1500
      #####产品1总数量
        - eq:
            - content.data.product.detail.0.orderNum
            - $orderNum1
        #####产品1应收分红
        - eq:
              - content.data.product.detail.0.partnerDividends
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum1)}
        #####产品1分红状态
        - eq:
            - content.data.product.detail.0.paymentStatus
            - 1
        #####产品2总金额
        - eq:
            - content.data.product.detail.1.commodityPrice
            - 3000
            #####产品2总数量
        - eq:
            - content.data.product.detail.1.orderNum
            - $orderNum2
        #####产品2应收分红
        - eq:
              - content.data.product.detail.1.partnerDividends
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum2)}
        #####产品2分红状态
        - eq:
            - content.data.product.detail.1.paymentStatus
            - 1
        #####订单总数量
        - eq:
            - content.data.product.orderNumCount
            - ${add($orderNum1,$orderNum2)}
        #####总金额
        - eq:
            - content.data.product.orderAmountAdjustmentCount
            - ${cal_orderPrice($univalence, $orderNum1, $orderNum2)}
        ####合伙人应收分红合计
        - eq:
            - content.data.product.partnerDividendsCount
            - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}