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
284ed0e5
Commit
284ed0e5
authored
Oct 19, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/20211015-xmc' into 'master'
Feat/20211015 xmc-集客助手文章赠险下线 See merge request test-group/kejiji!140
parents
4c9e2eaa
ad5f13e8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
60 deletions
+2
-60
ForwardAndRead.java
...java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
+0
-56
MyCustomer.java
...est/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
+1
-3
WhoSawMe.java
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
+1
-1
No files found.
src/test/java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
View file @
284ed0e5
...
...
@@ -22,7 +22,6 @@ public class ForwardAndRead implements Authorization {
private
String
articleScId
;
private
Long
sellerId
;
private
String
jjvisitId
;
private
String
insuranceId
;
private
long
forwardTime
;
private
String
questionId
;
public
static
Map
<
String
,
Integer
>
custClueStatistics
;
...
...
@@ -42,11 +41,9 @@ public class ForwardAndRead implements Authorization {
param
.
put
(
"userId"
,
userId
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
CLUESTATISTICS
);
int
drawMaterial
=
response
.
jsonPath
().
getInt
(
"data.drawMaterial"
);
int
drawPresentInsuranceCount
=
response
.
jsonPath
().
getInt
(
"data.drawPresentInsuranceCount"
);
int
grassCount
=
response
.
jsonPath
().
getInt
(
"data.grassCount"
);
int
visitCount
=
response
.
jsonPath
().
getInt
(
"data.visitCount"
);
custClueStatistics
.
put
(
"drawMaterial"
,
drawMaterial
);
custClueStatistics
.
put
(
"drawPresentInsuranceCount"
,
drawPresentInsuranceCount
);
custClueStatistics
.
put
(
"grassCount"
,
grassCount
);
custClueStatistics
.
put
(
"visitCount"
,
visitCount
);
}
...
...
@@ -99,28 +96,6 @@ public class ForwardAndRead implements Authorization {
Assert
.
assertNotNull
(
jjvisitId
,
network
.
message
(
param
,
BasicConfig
.
CONTENT_READ
,
"visitId为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客领取赠险"
,
priority
=
5
)
public
void
领取赠险
()
throws
IOException
{
// 获取赠险insuranceId
param
=
new
HashMap
<>();
param
.
put
(
"scid"
,
articleScId
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
SELLERCARD_RECOMMENDLISTV3
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_RECOMMENDLISTV3
,
"接口调用失败"
,
response
.
body
().
asString
()));
insuranceId
=
response
.
jsonPath
().
getString
(
"data.insuranceVos[0].id"
);
// 领取赠险
param
=
new
HashMap
<>();
param
.
put
(
"clueTypeName"
,
"WELFARE_INSURANCE"
);
param
.
put
(
"insuranceId"
,
insuranceId
);
param
.
put
(
"locationSource"
,
1
);
param
.
put
(
"scId"
,
articleScId
);
param
.
put
(
"sourceId"
,
articleScId
);
param
.
put
(
"sourceType"
,
1
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
,
"接口调用失败"
,
response
.
body
().
asString
()));
String
data
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertEquals
(
data
,
"success"
,
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
,
"领取赠险失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客转发文章"
,
priority
=
6
)
public
void
访客转发文章
()
throws
IOException
{
...
...
@@ -151,22 +126,6 @@ public class ForwardAndRead implements Authorization {
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CONTENT_READ
,
"接口调用失败"
,
response
.
body
().
asString
()));
}
// 新用户领取赠险
@Test
(
description
=
"新用户领取赠险"
,
priority
=
8
)
public
void
新用户领取赠险
()
throws
IOException
{
param
.
clear
();
param
.
put
(
"clueTypeName"
,
"WELFARE_INSURANCE"
);
param
.
put
(
"insuranceId"
,
insuranceId
);
param
.
put
(
"locationSource"
,
1
);
param
.
put
(
"scId"
,
articleScId
);
param
.
put
(
"sourceId"
,
articleScId
);
param
.
put
(
"sourceType"
,
1
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
);
System
.
out
.
println
(
response
.
body
().
asString
());
String
data
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertEquals
(
data
,
"success"
,
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
,
"领取赠险失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"二度访客阅读文章"
,
priority
=
9
)
public
void
二度访客阅读文章
()
throws
IOException
{
ThreadSleepUtils
.
sleep
(
5000
);
...
...
@@ -190,21 +149,6 @@ public class ForwardAndRead implements Authorization {
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"data"
),
network
.
message
(
param
,
BasicConfig
.
DYNAMIC_ADDVISIT
,
"添加访问记录失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"二度访客领取赠险"
,
priority
=
11
)
public
void
二度访客领取赠险
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"clueTypeName"
,
"WELFARE_INSURANCE"
);
param
.
put
(
"insuranceId"
,
insuranceId
);
param
.
put
(
"locationSource"
,
1
);
param
.
put
(
"scId"
,
articleScId
);
param
.
put
(
"sourceId"
,
articleScId
);
param
.
put
(
"sourceType"
,
1
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
,
"接口调用失败"
,
response
.
body
().
asString
()));
String
data
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertEquals
(
data
,
"success"
,
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
,
"领取赠险失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取文章FAQs"
,
priority
=
12
)
public
void
获取文章
FAQs
()
throws
IOException
{
param
.
clear
();
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
View file @
284ed0e5
...
...
@@ -355,11 +355,9 @@ public class MyCustomer implements Authorization {
response
=
network
.
getResponse
(
param
,
BasicConfig
.
CLUESTATISTICS
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CLUESTATISTICS
,
"接口请求失败"
,
response
.
body
().
asString
()));
ClueStatistics
clueStatistics
=
JsonUtil
.
parseResponseToBean
(
response
,
ClueStatistics
.
class
);
int
drawPresentInsuranceCount
=
clueStatistics
.
getDrawPresentInsuranceCount
();
int
grassCount
=
clueStatistics
.
getGrassCount
();
int
visitCount
=
clueStatistics
.
getVisitCount
();
int
drawMaterial
=
clueStatistics
.
getDrawMaterial
();
Assert
.
assertEquals
(
drawPresentInsuranceCount
,
ForwardAndRead
.
custClueStatistics
.
get
(
"drawPresentInsuranceCount"
)
+
1
,
network
.
message
(
param
,
BasicConfig
.
CLUESTATISTICS
,
"访客领取赠险记录次数未正确增加"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
grassCount
,
ForwardAndRead
.
custClueStatistics
.
get
(
"grassCount"
)
+
1
,
network
.
message
(
param
,
BasicConfig
.
CLUESTATISTICS
,
"访客阅读种草文章记录次数未正确增加"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
visitCount
,
ForwardAndRead
.
custClueStatistics
.
get
(
"visitCount"
)
+
1
,
network
.
message
(
param
,
BasicConfig
.
CLUESTATISTICS
,
"访客来访记录次数未正确增加"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
drawMaterial
,
ForwardAndRead
.
custClueStatistics
.
get
(
"drawMaterial"
)
+
1
,
network
.
message
(
param
,
BasicConfig
.
CLUESTATISTICS
,
"访客领取资料次数未正确增加"
,
response
.
body
().
asString
()));
...
...
@@ -405,7 +403,7 @@ public class MyCustomer implements Authorization {
String
contentId
=
recordsOfContent
.
getContentId
();
int
clueType
=
recordsOfClue
.
getClueType
();
Assert
.
assertEquals
(
contentId
,
BasicConfig
.
ARTICLE_CONTENTID
,
network
.
message
(
param
,
BasicConfig
.
CUSTVISITLIST
,
"访问记录详情有误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
clueType
,
31
,
network
.
message
(
param
,
BasicConfig
.
CUSTVISITLIST
,
"访问记录详情有误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
clueType
,
29
,
network
.
message
(
param
,
BasicConfig
.
CUSTVISITLIST
,
"访问记录详情有误"
,
response
.
body
().
asString
()));
}
// 客户线索跟进
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
View file @
284ed0e5
...
...
@@ -842,7 +842,7 @@ public class WhoSawMe implements Authorization {
int
visitClueType
=
response
.
jsonPath
().
getInt
(
"data.visitClueType"
);
Long
custUserId
=
response
.
jsonPath
().
getLong
(
"data.custUserId"
);
String
contentScid
=
response
.
jsonPath
().
getString
(
"data.fromContent.scid"
);
Assert
.
assertEquals
(
visitClueType
,
31
,
network
.
message
(
param
,
BasicConfig
.
CLUEINFO
,
"线索类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
visitClueType
,
29
,
network
.
message
(
param
,
BasicConfig
.
CLUEINFO
,
"线索类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custUserId
,
ForwardAndRead
.
decodeTku
(
VISITOR1_TKU
).
get
(
"userId"
),
network
.
message
(
param
,
BasicConfig
.
CLUEINFO
,
"线索来源访客userId错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
contentScid
,
ForwardAndRead
.
getContentScId
(
BasicConfig
.
ARTICLE_CONTENTID
),
network
.
message
(
param
,
BasicConfig
.
CLUEINFO
,
"线索来源素材id错误"
,
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