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
42643df2
Commit
42643df2
authored
Apr 21, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加创建用户和分配团队的测试用例
parent
16084acd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+36
-2
No files found.
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
42643df2
...
@@ -149,6 +149,12 @@ public class Activity implements Authorization {
...
@@ -149,6 +149,12 @@ public class Activity implements Authorization {
sleep
(
2000
);
sleep
(
2000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
+
2
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
+
2
);
abandonCust
(
cust_id
+
3
);
//自动化客户4
sleep
(
2000
);
assignSeller
(
cust_id
+
3
,
INVITE_ID
,
true
,
1
,
"crm"
);
sleep
(
2000
);
updateInvite
(
1
,
now
+
3600000
,
cust_id
+
2
);
otoAssistAuth
();
otoAssistAuth
();
getCalendarlist
(
today
,
0
,
"自动化测试用户2"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
0
,
"自动化测试用户2"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
2
,
"自动化测试用户0"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
2
,
"自动化测试用户0"
,
"勿动-自动化测试邀约"
);
...
@@ -181,6 +187,13 @@ public class Activity implements Authorization {
...
@@ -181,6 +187,13 @@ public class Activity implements Authorization {
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
,
"立即分配失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
,
"立即分配失败"
,
response
.
body
().
asString
()));
//立即分配客户4
getCalendarlist
(
today
,
2
,
"自动化测试用户4"
,
"勿动-自动化测试邀约"
);
params
.
put
(
"recordId"
,
recordItem
.
recordId
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
,
"立即分配失败"
,
response
.
body
().
asString
()));
}
}
...
@@ -222,7 +235,7 @@ public class Activity implements Authorization {
...
@@ -222,7 +235,7 @@ public class Activity implements Authorization {
int
size
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.size"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.size"
);
int
configId
=
response
.
jsonPath
().
getInt
(
"data.list[0].configId"
);
int
configId
=
response
.
jsonPath
().
getInt
(
"data.list[0].configId"
);
Assert
.
assertEquals
(
configId
,
440
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configId
,
440
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动量数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动量数错误"
,
response
.
body
().
asString
()));
int
signStatus0
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"
);
int
signStatus0
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
...
@@ -257,6 +270,25 @@ public class Activity implements Authorization {
...
@@ -257,6 +270,25 @@ public class Activity implements Authorization {
sellerSubmitRecord
(
0
,
2
);
sellerSubmitRecord
(
0
,
2
);
}
}
@Test
(
description
=
"专家确认客户未到场"
,
priority
=
13
)
public
void
专家确认客户未到场
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"date"
,
today
);
params
.
put
(
"custId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
3
));
params
.
put
(
"configId"
,
440
);
params
.
put
(
"status"
,
1
);
params
.
put
(
"timeInterval"
,
"am"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_checkSign
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_checkSign
,
"确认客户未到场失败"
,
response
.
body
().
asString
()));
sellerSubmitRecord
(
0
,
2
);
//查询今日到场状态变为未到场
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_submitRecordDetail
);
int
signStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus"
);
Assert
.
assertEquals
(
signStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【未到场】"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家查看提报可选择的其他见面场景"
,
priority
=
14
)
@Test
(
description
=
"专家查看提报可选择的其他见面场景"
,
priority
=
14
)
public
void
专家查看提报可选择的其他见面场景
(){
public
void
专家查看提报可选择的其他见面场景
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -350,13 +382,15 @@ public class Activity implements Authorization {
...
@@ -350,13 +382,15 @@ public class Activity implements Authorization {
int
size
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.size"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.size"
);
int
configId
=
response
.
jsonPath
().
getInt
(
"data.list[0].configId"
);
int
configId
=
response
.
jsonPath
().
getInt
(
"data.list[0].configId"
);
Assert
.
assertEquals
(
configId
,
440
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configId
,
440
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动的见面场景错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动量数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"签到活动量数错误"
,
response
.
body
().
asString
()));
int
signStatus0
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"
);
int
signStatus0
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户0\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
int
signStatus3
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus"
);
Assert
.
assertEquals
(
signStatus0
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已到场的签到状态非【已到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus0
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已到场的签到状态非【已到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus1
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已鸽的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus1
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已鸽的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus2
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【已签到】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus2
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【已签到】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus3
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【未到场】"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"总监查看专家今日非签到活动场景"
,
priority
=
22
)
@Test
(
description
=
"总监查看专家今日非签到活动场景"
,
priority
=
22
)
...
...
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