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
8ae87b06
Commit
8ae87b06
authored
Apr 19, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改活动行事历的测试用例
parent
2ab3561c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+5
-6
CheckTask.java
src/test/java/com/oto/cases/otoseller/CheckTask.java
+1
-1
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+1
-1
No files found.
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
8ae87b06
...
@@ -49,13 +49,13 @@ public class Activity implements Authorization {
...
@@ -49,13 +49,13 @@ public class Activity implements Authorization {
params
.
put
(
"paramList"
,
depts
);
params
.
put
(
"paramList"
,
depts
);
params
.
put
(
"isNeedInvite"
,
1
);
params
.
put
(
"isNeedInvite"
,
1
);
params
.
put
(
"maTime"
,
activity_day
+
"11:30"
);
params
.
put
(
"maTime"
,
activity_day
+
"11:30"
);
params
.
put
(
"sceneConfId"
,
17
);
params
.
put
(
"sceneConfId"
,
440
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_saveActivity
,
"新建营销活动失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_saveActivity
,
"新建营销活动失败"
,
response
.
body
().
asString
()));
otoManagerAuth
();
otoManagerAuth
();
params
.
put
(
"sceneConfId"
,
440
);
params
.
put
(
"sceneConfId"
,
17
);
params
.
put
(
"totalCost"
,
99999999.99
);
params
.
put
(
"totalCost"
,
99999999.99
);
params
.
put
(
"maTime"
,
activity_day
+
"12:00"
);
params
.
put
(
"maTime"
,
activity_day
+
"12:00"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
...
@@ -64,7 +64,7 @@ public class Activity implements Authorization {
...
@@ -64,7 +64,7 @@ public class Activity implements Authorization {
params
.
clear
();
params
.
clear
();
params
.
put
(
"totalCost"
,
0.01
);
params
.
put
(
"totalCost"
,
0.01
);
params
.
put
(
"sceneConfId"
,
440
);
params
.
put
(
"sceneConfId"
,
17
);
params
.
put
(
"isNeedInvite"
,
0
);
params
.
put
(
"isNeedInvite"
,
0
);
params
.
put
(
"maTime"
,
activity_day
+
"11:20"
);
params
.
put
(
"maTime"
,
activity_day
+
"11:20"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_saveActivity
);
...
@@ -80,7 +80,7 @@ public class Activity implements Authorization {
...
@@ -80,7 +80,7 @@ public class Activity implements Authorization {
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动数量错误"
,
response
.
body
().
asString
()));
acitityId
=
response
.
jsonPath
().
getInt
(
"data[0].voList[2].id"
);
acitityId
=
response
.
jsonPath
().
getInt
(
"data[0].voList[2].id"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].sceneName"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].sceneName"
);
Assert
.
assertEquals
(
sceneName
,
"勿动
_自动化邀约
场景"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sceneName
,
"勿动
-自动化一面
场景"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
String
timeInterval1
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].timeInterval"
);
String
timeInterval1
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].timeInterval"
);
Assert
.
assertEquals
(
timeInterval1
,
"am"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
timeInterval1
,
"am"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
String
timeInterval2
=
response
.
jsonPath
().
getString
(
"data[0].voList[2].timeInterval"
);
String
timeInterval2
=
response
.
jsonPath
().
getString
(
"data[0].voList[2].timeInterval"
);
...
@@ -99,11 +99,10 @@ public class Activity implements Authorization {
...
@@ -99,11 +99,10 @@ public class Activity implements Authorization {
depts
.
add
(
deptItem1
);
depts
.
add
(
deptItem1
);
params
.
put
(
"paramList"
,
depts
);
params
.
put
(
"paramList"
,
depts
);
params
.
put
(
"id"
,
acitityId
-
1
);
params
.
put
(
"id"
,
acitityId
-
1
);
params
.
put
(
"id"
,
acitityId
);
params
.
put
(
"isNeedInvite"
,
1
);
params
.
put
(
"isNeedInvite"
,
1
);
params
.
put
(
"sceneConfId"
,
440
);
params
.
put
(
"sceneConfId"
,
440
);
params
.
put
(
"totalCost"
,
0
);
params
.
put
(
"totalCost"
,
0
);
params
.
put
(
"maTime"
,
activity_day
+
"
20:0
0"
);
params
.
put
(
"maTime"
,
activity_day
+
"
11:3
0"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_modifyActivity
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_modifyActivity
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_modifyActivity
,
"修改营销活动失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_modifyActivity
,
"修改营销活动失败"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/oto/cases/otoseller/CheckTask.java
View file @
8ae87b06
...
@@ -712,7 +712,7 @@ public class CheckTask implements Authorization {
...
@@ -712,7 +712,7 @@ public class CheckTask implements Authorization {
params
.
put
(
"name"
,
"自动化"
);
params
.
put
(
"name"
,
"自动化"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_custName
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_OA_custName
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_custName
,
"客户姓名为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_OA_custName
,
"客户姓名为空"
,
response
.
body
().
asString
()));
}
}
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
8ae87b06
...
@@ -118,7 +118,7 @@ public class Work implements Authorization {
...
@@ -118,7 +118,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"通知栏不为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"通知栏不为空"
,
response
.
body
().
asString
()));
int
notifyType
=
response
.
jsonPath
().
getInt
(
"data[0].notifyType"
);
int
notifyType
=
response
.
jsonPath
().
getInt
(
"data[0].notifyType"
);
int
custCount
=
response
.
jsonPath
().
getInt
(
"data[0].custCount"
);
int
custCount
=
response
.
jsonPath
().
getInt
(
"data[0].custCount"
);
Assert
.
assertEquals
(
custCount
,
6
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"客户数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custCount
,
5
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"客户数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
notifyType
,
2
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"通知栏类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
notifyType
,
2
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"通知栏类型错误"
,
response
.
body
().
asString
()));
}
}
...
...
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