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
23dfc2d3
Commit
23dfc2d3
authored
Jul 25, 2021
by
xiamengchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增我的转发页面+我的客户页面cases
修改谁看过我页面cases
parent
6e40e65c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
210 additions
and
60 deletions
+210
-60
CustOrigins.java
src/test/java/com/kjj/bean/agent/CustOrigins.java
+10
-0
ForwardAndRead.java
...java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
+18
-10
CustomerInfo.java
...kjj/cases/assistant/whoSawMe/MyCustomer/CustomerInfo.java
+1
-1
HomePage.java
...com/kjj/cases/assistant/whoSawMe/MyCustomer/HomePage.java
+163
-18
MyForward.java
...test/java/com/kjj/cases/assistant/whoSawMe/MyForward.java
+5
-14
WhoSawMe.java
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
+10
-17
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+3
-0
No files found.
src/test/java/com/kjj/bean/agent/CustOrigins.java
0 → 100644
View file @
23dfc2d3
package
com
.
kjj
.
bean
.
agent
;
import
lombok.Data
;
@Data
public
class
CustOrigins
{
private
String
avatar
;
private
String
name
;
private
long
UserId
;
}
src/test/java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
View file @
23dfc2d3
...
...
@@ -15,6 +15,8 @@ import java.io.IOException;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.
BOSS_EDITCONFIG
;
// 谁看过我模块测试前执行一次代理人转发素材及访客访问和产生线索
public
class
ForwardAndRead
implements
Authorization
{
...
...
@@ -61,7 +63,7 @@ public class ForwardAndRead implements Authorization {
// 访客访问素材及产生线索
@Test
(
description
=
"访客阅读文章"
,
priority
=
3
)
public
void
访客阅读文章
()
throws
IOException
{
sellerId
=
getSellerId
(
);
sellerId
=
(
Long
)
getUserInfo
(
BasicConfig
.
AGENT_TKU
).
get
(
"sellerId"
);
network
.
agentCookies
.
put
(
"tku"
,
BasicConfig
.
VISITOR_TKU
);
param
=
new
HashMap
<>();
param
.
put
(
"scid"
,
articleScId
);
...
...
@@ -149,23 +151,18 @@ public class ForwardAndRead implements Authorization {
return
contentScid
;
}
// 获取代理人sellerId
public
Long
getSellerId
(){
network
.
agentCookies
.
put
(
"tku"
,
BasicConfig
.
AGENT_TKU
);
response
=
network
.
getResponse
(
BasicConfig
.
USER_INFO
);
Long
sellerId
=
response
.
jsonPath
().
getLong
(
"data.sellerId"
);
Assert
.
assertNotNull
(
sellerId
,
network
.
message
(
BasicConfig
.
USER_INFO
,
"获取代理人sellerId失败"
,
response
.
body
().
asString
()));
return
sellerId
;
}
// 获取用户信息
public
Map
<
String
,
Object
>
getUserInfo
(
String
userTku
){
network
.
agentCookies
.
put
(
"tku"
,
userTku
);
response
=
network
.
getResponse
(
BasicConfig
.
USER_INFO
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
BasicConfig
.
USER_INFO
,
"接口调用失败"
,
response
.
body
().
asString
()));
String
wxName
=
response
.
jsonPath
().
getString
(
"data.wxName"
);
Long
sellerId
=
response
.
jsonPath
().
getLong
(
"data.sellerId"
);
Long
userId
=
response
.
jsonPath
().
getLong
(
"data.userId"
);
Map
<
String
,
Object
>
infos
=
new
HashMap
<>();
infos
.
put
(
"wxName"
,
wxName
);
infos
.
put
(
"sellerId"
,
sellerId
);
infos
.
put
(
"userId"
,
userId
);
network
.
agentCookies
.
put
(
"tku"
,
BasicConfig
.
AGENT_TKU
);
return
infos
;
}
...
...
@@ -197,4 +194,15 @@ public class ForwardAndRead implements Authorization {
Assert
.
assertNotNull
(
idEncode
,
network
.
message
(
param
,
BasicConfig
.
MANAGER_ID_ENCODE
,
"加密sellerId失败"
,
response
.
body
().
asString
()));
return
idEncode
;
}
// 关闭数据看板演示数据
public
void
closeDemoData
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"configKey"
,
"boss_board_demon_switch"
);
param
.
put
(
"configValue"
,
false
);
response
=
network
.
postResponse
(
param
,
BOSS_EDITCONFIG
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BOSS_EDITCONFIG
,
"接口请求失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
param
,
BOSS_EDITCONFIG
,
"关闭演示数据开关失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/assistant/whoSawMe/MyCustomer/CustomerInfo.java
View file @
23dfc2d3
...
...
@@ -84,7 +84,7 @@ public class CustomerInfo implements Authorization {
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CUSTINFO
,
"接口请求失败"
,
response
.
body
().
asString
()));
Long
sellerId
=
response
.
jsonPath
().
getLong
(
"data.sellerId"
);
String
custWxName
=
response
.
jsonPath
().
getString
(
"data.custWxName"
);
Assert
.
assertEquals
(
sellerId
,
far
.
getSellerId
(
),
network
.
message
(
param
,
BasicConfig
.
CUSTINFO
,
"客户代理人的sellerId不符合预期"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sellerId
,
far
.
decodeTku
(
BasicConfig
.
AGENT_TKU
).
get
(
"sellerId"
),
network
.
message
(
param
,
BasicConfig
.
CUSTINFO
,
"客户代理人的sellerId不符合预期"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custWxName
,
visitorWxName
,
network
.
message
(
param
,
BasicConfig
.
CUSTINFO
,
"客户微信昵称与预期不符"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/MyCustomer/HomePage.java
View file @
23dfc2d3
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/assistant/whoSawMe/MyForward.java
View file @
23dfc2d3
...
...
@@ -31,15 +31,8 @@ public class MyForward implements Authorization {
agentTku
();
far
=
new
ForwardAndRead
();
// 关闭数据看板演示数据
param
=
new
HashMap
<>();
param
.
put
(
"configKey"
,
"boss_board_demon_switch"
);
param
.
put
(
"configValue"
,
false
);
response
=
network
.
postResponse
(
param
,
BOSS_EDITCONFIG
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BOSS_EDITCONFIG
,
"接口请求失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
param
,
BOSS_EDITCONFIG
,
"关闭演示数据开关失败"
,
response
.
body
().
asString
()));
far
.
closeDemoData
();
}
// 进入我的转发页面获取转发统计头部信息
...
...
@@ -138,8 +131,8 @@ public class MyForward implements Authorization {
param
.
put
(
"visitType"
,
2
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
FORWARD_LIST
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
FORWARD_LIST
,
"接口调用失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data
"
);
Assert
.
assert
NotNull
(
data
,
network
.
message
(
param
,
BasicConfig
.
FORWARD_LIST
,
"返回响应为空
"
,
response
.
body
().
asString
()));
String
contentId
=
response
.
jsonPath
().
getString
(
"data.list[0].contentVo.contentId
"
);
Assert
.
assert
Equals
(
contentId
,
ARTICLE_CONTENTID
,
network
.
message
(
param
,
FORWARD_LIST
,
"筛选结果contentId与预期不符
"
,
response
.
body
().
asString
()));
}
// 获取访问次数最多的素材列表
...
...
@@ -246,8 +239,8 @@ public class MyForward implements Authorization {
response
=
network
.
getResponse
(
param
,
BasicConfig
.
FORWARD_VISITRECORD
);
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
FORWARD_VISITRECORD
,
"接口请求失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data
"
);
Assert
.
assert
NotNull
(
data
,
network
.
message
(
param
,
BasicConfig
.
FORWARD_VISITRECORD
,
"接口返回响应为空
"
,
response
.
body
().
asString
()));
String
encodeUserId
=
response
.
jsonPath
().
getString
(
"data.list[0].userId
"
);
Assert
.
assert
Equals
(
encodeUserId
,
far
.
encodeId
((
Long
)
far
.
getUserInfo
(
VISITOR1_TKU
).
get
(
"userId"
)),
network
.
message
(
param
,
FORWARD_VISITRECORD
,
"筛选结果首条记录userId与预期不符
"
,
response
.
body
().
asString
()));
}
// 获取素材转发关系链
...
...
@@ -259,7 +252,5 @@ public class MyForward implements Authorization {
param
.
put
(
"pageSize"
,
20
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
INVITATIONCHAIN
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
INVITATIONCHAIN
,
"接口请求失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
param
,
BasicConfig
.
INVITATIONCHAIN
,
"接口返回响应为空"
,
response
.
body
().
asString
()));
}
}
\ No newline at end of file
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
View file @
23dfc2d3
...
...
@@ -31,15 +31,8 @@ public class WhoSawMe implements Authorization {
BaseUtils
.
ssoLogin
();
far
=
new
ForwardAndRead
();
// 关闭数据看板演示数据
param
=
new
HashMap
<>();
param
.
put
(
"configKey"
,
"boss_board_demon_switch"
);
param
.
put
(
"configValue"
,
false
);
response
=
network
.
postResponse
(
param
,
BOSS_EDITCONFIG
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BOSS_EDITCONFIG
,
"接口请求失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
param
,
BOSS_EDITCONFIG
,
"关闭演示数据开关失败"
,
response
.
body
().
asString
()));
far
.
closeDemoData
();
}
// 进入谁看过我主页
...
...
@@ -87,7 +80,7 @@ public class WhoSawMe implements Authorization {
@Test
(
description
=
"首页_查询使用版本"
,
priority
=
4
)
public
void
查询代理人当前使用版本
()
throws
IOException
{
param
=
new
HashMap
<>();
String
sellerIdEncode
=
far
.
encodeId
(
far
.
getSellerId
(
));
String
sellerIdEncode
=
far
.
encodeId
(
(
Long
)
far
.
getUserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"sellerId"
,
sellerIdEncode
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
USING_VERSION
);
String
userVersion
=
response
.
jsonPath
().
getString
(
"data.userVersion"
);
...
...
@@ -183,7 +176,7 @@ public class WhoSawMe implements Authorization {
// 获取我的上级名称
param
.
clear
();
param
.
put
(
"sellerId"
,
far
.
get
SellerId
(
));
param
.
put
(
"sellerId"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
response
=
network
.
getResponse
(
param
,
BasicConfig
.
BOSS_BOSS
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
BasicConfig
.
BOSS_BOSS
,
"获取上级名称失败"
,
response
.
body
().
asString
()));
...
...
@@ -203,7 +196,7 @@ public class WhoSawMe implements Authorization {
@Test
(
description
=
"其他代理人加入该代理人团队"
,
priority
=
15
)
public
void
邀请加入团队
()
throws
IOException
{
// 切换代理人加入团队
Long
sellerId
=
far
.
getSellerId
(
);
Long
sellerId
=
(
Long
)
far
.
getUserInfo
(
AGENT_TKU
).
get
(
"sellerId"
);
network
.
agentCookies
.
put
(
"tku"
,
BasicConfig
.
VISITOR1_TKU
);
// 确定被邀请代理人没有上级
...
...
@@ -239,7 +232,7 @@ public class WhoSawMe implements Authorization {
public
void
删除团队成员
()
throws
IOException
{
// 登陆管理后台调用管理后台接口删除成员
param
=
new
HashMap
<>();
param
.
put
(
"superiorSid"
,
far
.
get
SellerId
(
));
param
.
put
(
"superiorSid"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"childSid"
,
childSellerId
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
MANAGER_SELLERTEAM_REMOVEMEMBER
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"data"
),
network
.
message
(
param
,
BasicConfig
.
MANAGER_SELLERTEAM_REMOVEMEMBER
,
"删除成员失败"
,
response
.
body
().
asString
()));
...
...
@@ -257,7 +250,7 @@ public class WhoSawMe implements Authorization {
@Test
(
description
=
"查看今日转发素材列表"
,
priority
=
19
)
public
void
查看转发素材列表
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"sellerId"
,
far
.
get
SellerId
(
));
param
.
put
(
"sellerId"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"sortType"
,
4
);
...
...
@@ -271,7 +264,7 @@ public class WhoSawMe implements Authorization {
@Test
(
description
=
"查看转发名片记录列表"
,
priority
=
21
)
public
void
查看转发名片记录列表
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"sellerId"
,
far
.
get
SellerId
(
));
param
.
put
(
"sellerId"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"sortType"
,
4
);
...
...
@@ -299,7 +292,7 @@ public class WhoSawMe implements Authorization {
@Test
(
description
=
"查看使用工具记录列表"
,
priority
=
23
)
public
void
查看使用工具记录列表
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"sellerId"
,
far
.
get
SellerId
(
));
param
.
put
(
"sellerId"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"sortType"
,
4
);
...
...
@@ -313,7 +306,7 @@ public class WhoSawMe implements Authorization {
@Test
(
description
=
"查看获得线索记录列表"
,
priority
=
24
)
public
void
查看获得线索记录列表
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"sellerId"
,
far
.
get
SellerId
(
));
param
.
put
(
"sellerId"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"sortType"
,
4
);
...
...
@@ -328,7 +321,7 @@ public class WhoSawMe implements Authorization {
public
void
查看转发动态访问列表
()
throws
IOException
{
// 获取首条素材列表中首条动态id
param
=
new
HashMap
<>();
param
.
put
(
"sellerId"
,
far
.
get
SellerId
(
));
param
.
put
(
"sellerId"
,
far
.
get
UserInfo
(
AGENT_TKU
).
get
(
"sellerId"
));
param
.
put
(
"pageSize"
,
20
);
param
.
put
(
"pageIndex"
,
1
);
param
.
put
(
"sortType"
,
4
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
23dfc2d3
...
...
@@ -724,6 +724,9 @@ public class BasicConfig {
public
static
final
String
ISDISPLAYSPECIAL
=
HOST
+
"/kjy/mp/whoSawMe/isDisplaySpecialCustomerLayer"
;
public
static
final
String
CONTENTVISITRECORD
=
HOST
+
"/kjy/mp/whoSawMe/contentVisitRecord"
;
public
static
final
String
INVITATIONCHAIN
=
HOST
+
"/kjy/mp/whoSawMe/forward/forwardList"
;
// *************** 标签管理 ***************
public
static
final
String
TAG_ADDORUPDATE
=
HOST
+
"/kjy/mp/sellerTag/addOrUpdateTag"
;
public
static
final
String
TAG_GETLIST
=
HOST
+
"kjy/mp/sellerTag/getTagList"
;
// *************** 文章 ***************
...
...
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