DIV003_dividends_cal_testcases.yml
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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