DIVI005_dividends_Details_testcases.yml 3.0 KB
config:
    name: DIVI005-累计至今-明细-统计值正确
    base_url: ${ENV(base_manager_url)}

teststeps:

-   name: 登录天联共创管理后台系统
    variables:
        phone: ${ENV(adminphone)}
    testcase: testcases/common/m_login_testcases.yml

-   name: 登录天联共创管理后台系统-查看事业分红列表
    variables:
      partnerCategoryId: 1
      orderType: 1
      createTime: []
    api: api/m_api/dividends/m_dividends_list_api.yml
    extract:
      #事业合伙
      career_lists: content.data.gridResult.lists
      career_totalRow: content.data.gridResult.totalRow
    output:
      - career_lists
      - career_totalRow

-   name: 登录天联共创管理后台系统-查看业务分红列表
    variables:
      partnerCategoryId: 2
      orderType: null
      createTime: []
    api: api/m_api/dividends/m_dividends_list_api.yml
    extract:
      #业务合伙
      business_lists: content.data.gridResult.lists
    output:
      - business_lists
#
-   name: 登录天联共创管理后台系统-查看研发分红列表
    variables:
      partnerCategoryId: 3
      orderType: null
      createTime: []
    api: api/m_api/dividends/m_dividends_list_api.yml
    extract:
      #研发合伙
      develop_lists: content.data.gridResult.lists
    output:
      - develop_lists
#
-   name: 登录天联共创管理后台系统-查看业务-产品应用分红列表
    variables:
      partnerCategoryId: 4
      orderType: null
      createTime: []
    api: api/m_api/dividends/m_dividends_list_api.yml
    extract:
      #业务-产品应用合伙
      applicationOrders_lists: content.data.gridResult.lists
    output:
      - applicationOrders_lists


-   name: 登录天联共创app端系统
    ####身份类型 1:合伙人  2:高管
    variables:
      idType: ${convert_to_int(1)}
    testcase: testcases/app/common/app_login_testcases.yml
    output:
      - accessToken
#
-   name: 查看分红统计与订单分红详情统计一致
    api: api/app_api/dividend/statistics_api.yml
    extract:
      received: content.data.statistics.received
      outstanding: content.data.statistics.outstanding
      receivable: content.data.statistics.receivable
    validate:
         ####已收分红总额
        - eq:
            - $received
            - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}

         ####未收分红总额
        - eq:
            - $outstanding
            - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
#
#        ####分红支出
        - eq:
            - ${statistics_func(dividendSpending,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
            - ${statistics_func(dividendSpending,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}

#
#         ####应收分红总额
        - eq:
            - $receivable
            - ${str_to_int($received,$outstanding,-75)}