DIVI001_career_dividendslist_testcases.yml 4.5 KB
config:
    name: DIVI001-事业-初始状态-统计值正确
    base_url: ${ENV(base_manager_url)}
#    variables:
#      partnerCategoryId: 1
#      orderType: 1


teststeps:
-   name: 登录天联共创管理后台系统-分红列表-数据源来自于实发订单(业务合伙)
    testcase: testcases/dividends/DIV001_app_dividendslist_testcases.yml

-   name: 登录天联共创管理后台系统-分红管理-初始状态-各个值计算正确
    testcase: testcases/dividends/DIV003_1_app_dividends_cal_testcases.yml
#
-   name: 查看实际订单列表
    api: api/m_api/actual/m_order_actual_list_api.yml
    extract:
    #事业合伙
      career_actual_list: content.data.gridResult.lists
      career_partnerCategory: content.data.gridResult.lists.0.partnerCategory
    output:
      - career_actual_list
      - career_partnerCategory
#
-   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:
      quarters: content.data.statistics.quarters
    output:
      - quarters
    validate:
      #####累计所有年份应收分红
      - eq:
            - content.data.statistics.receivable
            - ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
      ####累计所有年份已收分红
      - eq:
            - content.data.statistics.received
            - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
      ####累计所有年份未收分红
      - eq:
            - content.data.statistics.outstanding
            - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
      ####季度已收分红
      - eq:
            - ${get_quarters(received,$quarters)}
            - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
      ####季度应收分红
      - eq:
            - ${get_quarters(receivable,$quarters)}
            - ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
     ####季度未收分红
      - eq:
            - ${get_quarters(outstanding,$quarters)}
            - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}

-   name: 查看订单统计
    api: api/app_api/order/statistics_api.yml
    validate:
#      ###今日新增实发订单
      - eq:
            - content.data.career.todayRealQuantity
            - $career_totalRow
#      ####今日新增实发订单金额
      - eq:
            - content.data.career.todayRealMoney
            - ${statistics_actual_func($career_partnerCategory,$career_actual_list)}
#      ###累计实发订单
      - eq:
            - content.data.career.cumulativeQuantity
            - $career_totalRow
      ###累计实发订单金额
      - eq:
            - content.data.career.cumulativeMoney
            - ${statistics_actual_func($career_partnerCategory,$career_actual_list)}