Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
龚小红
oto
Commits
a8666b27
Commit
a8666b27
authored
Jul 20, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加客户系数及来源的测试用例
2.增加产品组的测试用例
parent
051c3a6b
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
37 deletions
+192
-37
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+58
-23
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+14
-7
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+114
-7
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+6
-0
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
a8666b27
package
com
.
oto
.
cases
.
otoseller
;
package
com
.
oto
.
cases
.
otoseller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.oto.cases.admin.Authorization
;
import
com.oto.cases.admin.Authorization
;
import
com.oto.config.BasicConfig
;
import
com.oto.config.BasicConfig
;
import
com.oto.utils.IdMakeUtil
;
import
com.oto.utils.IdMakeUtil
;
...
@@ -39,7 +40,7 @@ public class Manager implements Authorization {
...
@@ -39,7 +40,7 @@ public class Manager implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
int
size
=
0
;
int
size
=
0
;
int
i
=
1
;
int
i
=
1
;
while
(
size
<
1
){
while
(
size
<
1
&&
i
<
10
){
params
.
put
(
"pageIndex"
,
i
);
params
.
put
(
"pageIndex"
,
i
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_sellerList
);
...
@@ -77,11 +78,12 @@ public class Manager implements Authorization {
...
@@ -77,11 +78,12 @@ public class Manager implements Authorization {
params
.
put
(
"roleType"
,
1
);
params
.
put
(
"roleType"
,
1
);
params
.
put
(
"callPermission"
,
0
);
params
.
put
(
"callPermission"
,
0
);
params
.
put
(
"sellerStatus"
,
0
);
params
.
put
(
"sellerStatus"
,
0
);
params
.
put
(
"companyId
"
,
1
);
params
.
put
(
"companyId
s"
,
new
int
[]{
5
}
);
params
.
put
(
"companyName
"
,
"勿动-自动化测试公司"
);
params
.
put
(
"companyName
s"
,
new
String
[]{
"勿动-自动化测试公司"
}
);
params
.
put
(
"sellerLevel"
,
2
);
params
.
put
(
"sellerLevel"
,
2
);
params
.
put
(
"workStatus"
,
1
);
params
.
put
(
"workStatus"
,
1
);
params
.
put
(
"parentId"
,
28
);
params
.
put
(
"parentId"
,
28
);
System
.
out
.
println
(
JSONObject
.
toJSONString
(
params
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateSeller
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateSeller
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateSeller
,
"修改客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateSeller
,
"修改客户失败"
,
response
.
body
().
asString
()));
...
@@ -99,7 +101,8 @@ public class Manager implements Authorization {
...
@@ -99,7 +101,8 @@ public class Manager implements Authorization {
//还原
//还原
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"sellerStatus"
,
1
);
params
.
put
(
"sellerStatus"
,
1
);
params
.
put
(
"companyId"
,
5
);
params
.
put
(
"companyIds"
,
new
int
[]{
5
});
params
.
put
(
"companyNames"
,
new
String
[]{
"勿动-自动化测试公司"
});
params
.
put
(
"sellerLevel"
,
1
);
params
.
put
(
"sellerLevel"
,
1
);
params
.
put
(
"parentId"
,
LEADER_ID
);
params
.
put
(
"parentId"
,
LEADER_ID
);
params
.
put
(
"sellerName"
,
"勿动-自动化测试销售"
);
params
.
put
(
"sellerName"
,
"勿动-自动化测试销售"
);
...
@@ -123,7 +126,7 @@ public class Manager implements Authorization {
...
@@ -123,7 +126,7 @@ public class Manager implements Authorization {
params
.
put
(
"roleType"
,
1
);
params
.
put
(
"roleType"
,
1
);
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"callPermission"
,
1
);
params
.
put
(
"sellerStatus"
,
1
);
params
.
put
(
"sellerStatus"
,
1
);
params
.
put
(
"companyId"
,
1
);
params
.
put
(
"companyId"
,
new
int
[]{
5
}
);
params
.
put
(
"sellerLevel"
,
1
);
params
.
put
(
"sellerLevel"
,
1
);
params
.
put
(
"workStatus"
,
1
);
params
.
put
(
"workStatus"
,
1
);
params
.
put
(
"assignNewCustPermission"
,
1
);
params
.
put
(
"assignNewCustPermission"
,
1
);
...
@@ -137,40 +140,56 @@ public class Manager implements Authorization {
...
@@ -137,40 +140,56 @@ public class Manager implements Authorization {
public
void
不可新增同名公司
(){
public
void
不可新增同名公司
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyName"
,
"勿动-自动化测试公司"
);
params
.
put
(
"companyName"
,
"勿动-自动化测试公司"
);
params
.
put
(
"areaCodes"
,
new
String
[]{
"330000"
,
"330100"
});
params
.
put
(
"productIds"
,
new
int
[]{
60
,
59
,
64
});
params
.
put
(
"sellerArea"
,
"浙江省-杭州市"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_saveCompany
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_saveCompany
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveCompany
,
"新增同名公司成功"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveCompany
,
"新增同名公司成功"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改
公司名称
"
,
priority
=
8
)
@Test
(
description
=
"修改
产品组信息
"
,
priority
=
8
)
public
void
修改
公司名称
(){
public
void
修改
产品组信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
5
);
params
.
put
(
"id"
,
5
);
params
.
put
(
"areaCodes"
,
new
String
[]{
"330000"
,
"330100"
});
params
.
put
(
"productIds"
,
new
int
[]{
60
,
59
,
64
});
params
.
put
(
"companyName"
,
"勿动-自动化测试公司更新"
);
params
.
put
(
"companyName"
,
"勿动-自动化测试公司更新"
);
params
.
put
(
"sellerArea"
,
"浙江省-杭州市"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
,
"修改客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
,
"修改客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"分页查看
公司
列表"
,
priority
=
9
)
@Test
(
description
=
"分页查看
产品组
列表"
,
priority
=
9
)
public
void
分页查看
公司
列表
(){
public
void
分页查看
产品组
列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
int
size
=
0
;
params
.
put
(
"pageSize"
,
20
);
int
i
=
1
;
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_listCompany
);
Response
response
=
null
;
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.companyName == \""
+
"勿动-自动化测试公司更新"
+
"\"}.size()"
);
while
(
size
<
1
&&
i
<
10
){
params
.
put
(
"pageIndex"
,
i
);
params
.
put
(
"pageSize"
,
"20"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_listCompany
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.companyId == 5}.size()"
);
i
++;
}
size
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.companyName == \""
+
"勿动-自动化测试公司更新"
+
"\"}.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_listCompany
,
"查询更新的公司名称失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_listCompany
,
"查询更新的公司名称失败"
,
response
.
body
().
asString
()));
//还原
//还原
params
.
clear
();
params
.
clear
();
params
.
put
(
"id"
,
5
);
params
.
put
(
"id"
,
5
);
params
.
put
(
"companyName"
,
"勿动-自动化测试公司"
);
params
.
put
(
"companyName"
,
"勿动-自动化测试公司"
);
params
.
put
(
"areaCodes"
,
new
String
[]{
"330000"
,
"330100"
});
params
.
put
(
"productIds"
,
new
int
[]{
60
,
59
,
19
});
params
.
put
(
"sellerArea"
,
"浙江省-杭州市"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
,
"修改客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
,
"修改客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看所有
公司
列表"
,
priority
=
10
)
@Test
(
description
=
"查看所有
产品组
列表"
,
priority
=
10
)
public
void
查看所有公司列表
(){
public
void
查看所有公司列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_oto_listAllCompany
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_oto_listAllCompany
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
...
@@ -230,14 +249,19 @@ public class Manager implements Authorization {
...
@@ -230,14 +249,19 @@ public class Manager implements Authorization {
@Test
(
description
=
"查看产品列表"
,
priority
=
15
)
@Test
(
description
=
"查看产品列表"
,
priority
=
15
)
public
void
查看产品列表
(){
public
void
查看产品列表
(){
Response
response
=
null
;
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
int
size
=
0
;
int
i
=
1
;
while
(
size
<
1
&&
i
<
10
){
params
.
put
(
"pageIndex"
,
i
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"companyIds"
,
5
);
params
.
put
(
"prodStatus"
,
1
);
params
.
put
(
"prodStatus"
,
1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_productList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_productList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
size
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.id == 19}.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productList
,
"查询公司产品为空"
,
response
.
body
().
asString
()));
i
++;
}
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productList
,
"未找到相应产品"
,
response
.
body
().
asString
()));
int
costOptionsSize
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == 19}.costOptions.size()"
);
int
costOptionsSize
=
response
.
jsonPath
().
getInt
(
"data.list.find{it.id == 19}.costOptions.size()"
);
String
prodName
=
response
.
jsonPath
().
getString
(
"data.list.find{it.id == 19}.prodName"
);
String
prodName
=
response
.
jsonPath
().
getString
(
"data.list.find{it.id == 19}.prodName"
);
Assert
.
assertEquals
(
costOptionsSize
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productList
,
"产品的缴费期未更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
costOptionsSize
,
3
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productList
,
"产品的缴费期未更新"
,
response
.
body
().
asString
()));
...
@@ -502,7 +526,7 @@ public class Manager implements Authorization {
...
@@ -502,7 +526,7 @@ public class Manager implements Authorization {
params
.
put
(
"id"
,
20
);
params
.
put
(
"id"
,
20
);
params
.
put
(
"accountId"
,
"20220107CESHI_1"
);
params
.
put
(
"accountId"
,
"20220107CESHI_1"
);
params
.
put
(
"accountName"
,
"勿动_自动化测试专用账号"
);
params
.
put
(
"accountName"
,
"勿动_自动化测试专用账号"
);
params
.
put
(
"companyId
"
,
5
);
params
.
put
(
"companyId
s"
,
new
int
[]{
5
}
);
params
.
put
(
"pubChannel"
,
6
);
params
.
put
(
"pubChannel"
,
6
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_account_saveOrUpdate
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_account_saveOrUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -528,7 +552,7 @@ public class Manager implements Authorization {
...
@@ -528,7 +552,7 @@ public class Manager implements Authorization {
params
.
put
(
"id"
,
20
);
params
.
put
(
"id"
,
20
);
params
.
put
(
"accountId"
,
"20220107CESHI_01"
);
params
.
put
(
"accountId"
,
"20220107CESHI_01"
);
params
.
put
(
"accountName"
,
"勿动_自动化测试账号"
);
params
.
put
(
"accountName"
,
"勿动_自动化测试账号"
);
params
.
put
(
"companyId
"
,
5
);
params
.
put
(
"companyId
s"
,
new
int
[]{
5
}
);
params
.
put
(
"pubChannel"
,
5
);
params
.
put
(
"pubChannel"
,
5
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_account_saveOrUpdate
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_account_saveOrUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -639,4 +663,15 @@ public class Manager implements Authorization {
...
@@ -639,4 +663,15 @@ public class Manager implements Authorization {
Assert
.
assertEquals
(
accessSource
,
linkId
,
network
.
message
(
params
,
BasicConfig
.
live_mapping_getTrueLinkInfo
,
"查询的投放账户列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
accessSource
,
linkId
,
network
.
message
(
params
,
BasicConfig
.
live_mapping_getTrueLinkInfo
,
"查询的投放账户列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
liveId
,
IdMakeUtil
.
encodingId
(
8203L
),
network
.
message
(
params
,
BasicConfig
.
live_mapping_getTrueLinkInfo
,
"模糊查询结果错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
liveId
,
IdMakeUtil
.
encodingId
(
8203L
),
network
.
message
(
params
,
BasicConfig
.
live_mapping_getTrueLinkInfo
,
"模糊查询结果错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取客户来源对应关系列表"
,
priority
=
44
)
public
void
获取客户来源对应关系列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_custFromSourceList
);
String
custFromSource
=
response
.
jsonPath
().
getString
(
"data[0].custFromSource"
);
String
desc
=
response
.
jsonPath
().
getString
(
"data[0].desc"
);
Assert
.
assertEquals
(
custFromSource
,
"01_01-01"
,
network
.
message
(
BasicConfig
.
MANAGER_custFromSourceList
,
"修改投放账户失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
desc
,
"投放客户-自建落地页-表单"
,
network
.
message
(
BasicConfig
.
MANAGER_custFromSourceList
,
"修改投放账户失败"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
a8666b27
...
@@ -54,7 +54,7 @@ public class Phone implements Authorization {
...
@@ -54,7 +54,7 @@ public class Phone implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化缘故客户"
);
params
.
put
(
"custName"
,
"自动化缘故客户"
);
params
.
put
(
"custPhoneNum"
,
"13410000001"
);
params
.
put
(
"custPhoneNum"
,
"13410000001"
);
params
.
put
(
"cust
Source"
,
1
);
params
.
put
(
"cust
ActionType"
,
"04"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_customerSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_customerSave
);
myselfCustomer_id
=
response
.
jsonPath
().
getString
(
"data"
);
myselfCustomer_id
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertNotNull
(
myselfCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建缘故客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
myselfCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建缘故客户失败"
,
response
.
body
().
asString
()));
...
@@ -66,7 +66,7 @@ public class Phone implements Authorization {
...
@@ -66,7 +66,7 @@ public class Phone implements Authorization {
params
.
put
(
"custName"
,
"自动化转介绍客户"
);
params
.
put
(
"custName"
,
"自动化转介绍客户"
);
params
.
put
(
"custPhoneNum"
,
"13410000002"
);
params
.
put
(
"custPhoneNum"
,
"13410000002"
);
params
.
put
(
"introducerId"
,
myselfCustomer_id
);
params
.
put
(
"introducerId"
,
myselfCustomer_id
);
params
.
put
(
"cust
Source"
,
2
);
params
.
put
(
"cust
ActionType"
,
"05"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_customerSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_customerSave
);
introduceCustomer_id
=
response
.
jsonPath
().
getString
(
"data"
);
introduceCustomer_id
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertNotNull
(
introduceCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
introduceCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
...
@@ -520,7 +520,9 @@ public class Phone implements Authorization {
...
@@ -520,7 +520,9 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看公司产品列表"
,
priority
=
38
)
@Test
(
description
=
"查看公司产品列表"
,
priority
=
38
)
public
void
查看公司产品列表
()
{
public
void
查看公司产品列表
()
{
Response
response
=
network
.
getResponse
(
BasicConfig
.
PHONE_listBysellComp
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listBysellComp
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
PHONE_listBysellComp
,
"产品列表未包含已上架产品"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
PHONE_listBysellComp
,
"产品列表未包含已上架产品"
,
response
.
body
().
asString
()));
}
}
...
@@ -539,14 +541,18 @@ public class Phone implements Authorization {
...
@@ -539,14 +541,18 @@ public class Phone implements Authorization {
public
void
产品下架后公司产品列表不显示
()
{
public
void
产品下架后公司产品列表不显示
()
{
otoSellerTku
();
otoSellerTku
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
PHONE_listBysellComp
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listBysellComp
);
int
size
=
response
.
jsonPath
().
getJsonObject
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getJsonObject
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
PHONE_listBysellComp
,
"产品列表未包含已上架产品"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
PHONE_listBysellComp
,
"产品列表未包含已上架产品"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>
();
params
.
clear
();
params
.
put
(
"id"
,
productId
);
params
.
put
(
"id"
,
productId
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productUpdateStatus
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productUpdateStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productUpdateStatus
,
"上架公司产品失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"上传2进4面访并提示满足流转4阶段"
,
priority
=
41
)
@Test
(
description
=
"上传2进4面访并提示满足流转4阶段"
,
priority
=
41
)
...
@@ -678,8 +684,8 @@ public class Phone implements Authorization {
...
@@ -678,8 +684,8 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除见面场景失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除见面场景失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的
预
日报为未提交"
,
priority
=
48
)
@Test
(
description
=
"查看我的日报为未提交"
,
priority
=
48
)
public
void
查看我的
预
日报为未提交
(){
public
void
查看我的日报为未提交
(){
otoSellerTku
();
otoSellerTku
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
PHONE_paper_getReportFlag
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
PHONE_paper_getReportFlag
);
int
reportFlag
=
response
.
jsonPath
().
getInt
(
"data.reportFlag"
);
int
reportFlag
=
response
.
jsonPath
().
getInt
(
"data.reportFlag"
);
...
@@ -745,6 +751,7 @@ public class Phone implements Authorization {
...
@@ -745,6 +751,7 @@ public class Phone implements Authorization {
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_delCust
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_delCust
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"删除客户填写的表单记录"
,
priority
=
80
)
@Test
(
description
=
"删除客户填写的表单记录"
,
priority
=
80
)
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
a8666b27
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/config/BasicConfig.java
View file @
a8666b27
...
@@ -110,6 +110,9 @@ public class BasicConfig {
...
@@ -110,6 +110,9 @@ public class BasicConfig {
public
static
final
String
MANAGER_link_fakeUpdate
=
MANAGER_HOST
+
"/kjy/manager/oto/link/mapping/fakeUpdate"
;
public
static
final
String
MANAGER_link_fakeUpdate
=
MANAGER_HOST
+
"/kjy/manager/oto/link/mapping/fakeUpdate"
;
public
static
final
String
MANAGER_account_fuzzyByAccountName
=
MANAGER_HOST
+
"/kjy/manager/oto/account/fuzzyByAccountName"
;
public
static
final
String
MANAGER_account_fuzzyByAccountName
=
MANAGER_HOST
+
"/kjy/manager/oto/account/fuzzyByAccountName"
;
public
static
final
String
live_mapping_getTrueLinkInfo
=
MOBILE_HOST
+
"/kjy/live/oto/link/mapping/getTrueLinkInfo"
;
public
static
final
String
live_mapping_getTrueLinkInfo
=
MOBILE_HOST
+
"/kjy/live/oto/link/mapping/getTrueLinkInfo"
;
public
static
final
String
MANAGER_custFromSourceList
=
MANAGER_HOST
+
"/kjy/manager/oto/common/custFromSourceList"
;
public
static
final
String
MANAGER_customer_update
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/update"
;
public
static
final
String
MANAGER_product_listAll
=
MANAGER_HOST
+
"/kjy/manager/oto/product/listAll"
;
//*************** OTO销售工作台 ***************
//*************** OTO销售工作台 ***************
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
...
@@ -157,6 +160,9 @@ public class BasicConfig {
...
@@ -157,6 +160,9 @@ public class BasicConfig {
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
WORK_coefficient_detail
=
WORK_HOST
+
"/kjy/oto/manager/customer/coefficient/detail"
;
public
static
final
String
WORK_customer_detail
=
WORK_HOST
+
"/kjy/oto/manager/customer/claimDetail"
;
public
static
final
String
WORK_customer_claim
=
WORK_HOST
+
"/kjy/oto/manager/customer/claim"
;
//***********************销售工作台手机端**********************
//***********************销售工作台手机端**********************
public
static
final
String
PHONE_custConfSave
=
WORK_HOST
+
"/kjy/oto/manager/custconf/save"
;
public
static
final
String
PHONE_custConfSave
=
WORK_HOST
+
"/kjy/oto/manager/custconf/save"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment