DIV003_dividends_cal_testcases.yml 2.8 KB
config:
    name: DIV003-事业分红详情-初始状态-各个值计算正确
    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.id
          - $actual_id
        #####总数量
        - eq:
            - content.data.dividendCount.orderNum
            - ${add($orderNum1,$orderNum2)}
        #####总金额
        - eq:
            - content.data.dividendCount.orderAmountAdjustment
            - ${cal_orderPrice($univalence, $orderNum1, $orderNum2)}
        ####业务员抽成
        - eq:
            - content.data.dividendCount.expectedCommission
            - ${cal_Ratio($commissionProportion, $univalence, $orderNum1, $orderNum2)}
        #####合伙人应收分红总额
        - eq:
              - content.data.dividendCount.partnerDividends
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
        #####合伙人未收分红总额
        - eq:
            - content.data.dividendCount.notReceivedDividend
            - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
        #####产品1总金额
        - eq:
            - content.data.product.0.detail.orderPrice
            - ${cal_orderPrice($univalence, $orderNum1)}
        #####产品1应收分红
        - eq:
              - content.data.product.0.detail.partnerDividendsReceivable
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum1)}
        #####产品1未收分红
        - eq:
              - content.data.product.0.notReceivedDividend
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum1)}
        #####产品1分红状态
        - eq:
            - content.data.product.0.stateOfPayment
            - 1
        #####产品2总金额
        - eq:
            - content.data.product.1.detail.orderPrice
            - ${cal_orderPrice($univalence, $orderNum2)}
        #####产品2应收分红
        - eq:
              - content.data.product.1.detail.partnerDividendsReceivable
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum2)}
        #####产品2未收分红
        - eq:
              - content.data.product.1.notReceivedDividend
              - ${cal_Ratio($partnerRatio, $univalence, $orderNum2)}
        #####产品2分红状态
        - eq:
            - content.data.product.1.stateOfPayment
            - 1