Commit 6dc8b3d9 authored by 张艳玲's avatar 张艳玲

Merge branch 'feature/20210730-xmc' into 'master'

Feature/20210730 xmc

See merge request test-group/kejiji!86
parents c7c5f249 b2643e61
package com.kjj.bean.whoSawMe;
import lombok.Data;
@Data
public class ArticlePage {
private String contentType;
private String contentId;
}
package com.kjj.bean.whoSawMe;
import lombok.Data;
@Data
public class ChatList {
private int chatContentType;
private String content;
private long id;
private boolean mine;
private int readFlag;
private Long receiverId;
private Long senderId;
}
package com.kjj.bean.whoSawMe;
import lombok.Data;
@Data
public class CustFavorite {
private String contentId;
private String userActionTypeEnum;
}
package com.kjj.bean.whoSawMe;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class LinkList {
private Map<String, Object> session;
}
package com.kjj.bean.whoSawMe;
import lombok.Data;
@Data
public class RankingList {
private String sellerId;
}
package com.kjj.bean.whoSawMe;
import lombok.Data;
@Data
public class RemindInfo {
private String id;
private String remindContent;
private int remindStatus;
private Long remindTime;
}
......@@ -30,6 +30,14 @@ public interface Authorization {
}
//代理人
default void visitor2Tku() {
network.agentCookies.put("tku", VISITOR2_TKU);
System.out.println("代理人tku:" + VISITOR2_TKU);
}
// 获取访客tku:Su Yi
default void userTku() {
network.agentCookies.put("tku", VISITOR_UserTku);
......
......@@ -298,7 +298,7 @@ public class GameLottery implements Authorization {
@Test(description="访客_打开抽奖链接",priority = 13)
public void 访客_打开抽奖链接(){
//切换为访客-请勿打扰
userTku1();
// userTku1();
//添加访问记录
Map<String, Object> params = new HashMap<String, Object>();
......@@ -541,7 +541,7 @@ public class GameLottery implements Authorization {
@Test(description="访客_第二个客户未中奖",priority = 21)
public void 访客_第二个客户未中奖(){
//切换为请勿打扰
userTku1();
// userTku1();
//添加访问记录
Map<String, Object> params = new HashMap<String, Object>();
......
......@@ -658,7 +658,7 @@ public class GreetingCrad implements Authorization{
@Test(description="访客_礼物被领取完领取失败",priority = 35)
public void 访客_礼物被领取完领取失败(){
//切换为访客
userTku1();
// userTku1();
//查看阅读记录
Map<String, Object> params = new HashMap<String, Object>();
......
......@@ -7,8 +7,7 @@ import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
import static com.kjj.config.BasicConfig.BOSS_EDITCONFIG;
......@@ -21,10 +20,11 @@ public class ForwardAndRead implements Authorization {
private Long sellerId;
private String visitId;
private String insuranceId;
private String forwardTime;
@BeforeClass
public void setUp() throws IOException{
agentTku();
visitor2Tku();
BaseUtils.ssoLogin();
}
......@@ -39,6 +39,8 @@ public class ForwardAndRead implements Authorization {
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(param, BasicConfig.FORWARD, "接口请求失败", response.body().asString()));
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(param, BasicConfig.FORWARD, "转发素材失败", response.body().asString()));
forwardTime = response.jsonPath().getString("timestamp");
}
@Test(description = "代理人转发名片", priority = 2)
......@@ -58,8 +60,8 @@ public class ForwardAndRead implements Authorization {
// 访客访问素材及产生线索
@Test(description = "访客阅读文章", priority = 3)
public void 访客阅读文章() throws IOException{
sellerId = (Long) getUserInfo(BasicConfig.AGENT_TKU).get("sellerId");
network.agentCookies.put("tku", BasicConfig.VISITOR_TKU);
sellerId = decodeTku(BasicConfig.VISITOR2_TKU).get("sellerId");
network.agentCookies.put("tku", BasicConfig.AGENT_TKU);
param = new HashMap<>();
param.put("scid", articleScId);
param.put("fromUserId", sellerId);
......@@ -108,7 +110,7 @@ public class ForwardAndRead implements Authorization {
@Test(description = "二度访客阅读文章", priority = 6)
public void 二度访客阅读文章() throws IOException{
Long fromUserId = decodeTku(BasicConfig.VISITOR_TKU).get("sellerId");
Long fromUserId = decodeTku(BasicConfig.AGENT_TKU).get("sellerId");
network.agentCookies.put("tku", BasicConfig.VISITOR1_TKU); // 切换二度访客
param = new HashMap<>();
param.put("scid", articleScId);
......@@ -147,18 +149,16 @@ public class ForwardAndRead implements Authorization {
}
// 获取用户信息
public Map<String, Object> getUserInfo(String userTku){
public Map<String, String> 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 avatar = response.jsonPath().getString("data.avatar");
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<>();
Map<String, String> infos = new HashMap<>();
infos.put("avatar", avatar);
infos.put("wxName", wxName);
infos.put("sellerId", sellerId);
infos.put("userId", userId);
network.agentCookies.put("tku", BasicConfig.AGENT_TKU);
network.agentCookies.put("tku", BasicConfig.VISITOR2_TKU);
return infos;
}
......
This diff is collapsed.
......@@ -4,7 +4,6 @@ import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.utils.BaseUtils;
import io.restassured.response.Response;
import org.apache.groovy.json.internal.IO;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
......@@ -27,8 +26,7 @@ public class MyForward implements Authorization {
public void setUp() throws IOException {
// 登陆管理后台
BaseUtils.ssoLogin();
// 代理人授权
agentTku();
visitor2Tku();
far = new ForwardAndRead();
// 关闭数据看板演示数据
......@@ -237,10 +235,9 @@ public class MyForward implements Authorization {
param.put("pageSize", 20);
param.put("type", 4);
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()));
String encodeUserId = response.jsonPath().getString("data.list[0].userId");
Assert.assertEquals(encodeUserId, far.encodeId((Long) far.getUserInfo(VISITOR1_TKU).get("userId")), network.message(param, FORWARD_VISITRECORD, "筛选结果首条记录userId与预期不符", response.body().asString()));
Assert.assertEquals(encodeUserId, visitorEncodeUserId, network.message(param, FORWARD_VISITRECORD, "筛选结果首条记录userId与预期不符", response.body().asString()));
}
// 获取素材转发关系链
......
......@@ -74,6 +74,8 @@ public class BasicConfig {
public static String VISITOR_TKU = "T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfC4HKmj5NJfCUkxusAyFb5SpkWS31srDTYr6KtV";
// 基础线访客(小雪人) TKU
public static String VISITOR1_TKU = "T3gM31f18jCFXzk692pKjJCqJZdDv8Nb3htkzNk983cPMspUQD6pVEn2FNMefM2nieKPicXG9c1tDg8qtN";
// 基础线访客
public static String VISITOR2_TKU = "T3gM31f18jCeKCBVHf5MANgyXeBZGCm8vTJQTuWYXHFqx97PATsWyUYamGaNdNip8bEs9shoE9tTsAmp8x"; // 二度访客用
// 访客的sids
public static final String sids = "Kj21MjMwNTU";
// 访客(SuYi) userID:4425
......@@ -230,6 +232,9 @@ public class BasicConfig {
public static final String MOBILE_result = MOBILE_HOST + "/clue/guess/number/red/result";
public static final String MANAGER_encode = MANAGER_HOST + "/kjy/manager/testUser/encode";
// *************** 宝箱裂变 ***************
public static final String MANAGER_getList4Admin = MANAGER_HOST + "/kjy/manager/welfare/pre/conf/getList4Admin";
public static final String MANAGER_saveTreasureConf = MANAGER_HOST + "/kjy/manager/live/treasure/saveTreasureConf";
......@@ -613,6 +618,7 @@ public class BasicConfig {
public static final String VISITHEADER = HOST + "/kjy/mp/visit/header/v2";
public static final String SELLERWEEKLY = HOST + "/kjy/mp/whoSawMe/sellerWeekly";
public static final String WEEKLY_LIST = HOST + "/kjy/mp/seller/weekly/list";
public static final String NEWFUNC_FIRSTVISIT = HOST + "/kjy/mp/newFunction/sellerFirstVisit";
// *************** 支付 ***************
......@@ -697,6 +703,7 @@ public class BasicConfig {
// *************** 新手任务 ***************
public static final String NOVICE_LIST = HOST + "/kjy/mp/seller/novice/list";
public static final String NOVICE_MONGOLIANLAYERISPLAY = HOST + "/kjy/mp/seller/novice/mongolianLayerDisplay";
public static final String COMPLETEGUIDE = HOST + "/kjy/mp/rookieGuide/completeGuide";
// *************** 谁看过我 ***************
......@@ -706,10 +713,54 @@ public class BasicConfig {
public static final String FORWARD_LIST = HOST + "/kjy/mp/whoSawMe/forward/list/v2";
public static final String FORWARD_CONTENTHEADER = HOST + "/kjy/mp/whoSawMe/forward/contentHeader";
public static final String FORWARD_VISITRECORD = HOST + "/kjy/mp/whoSawMe/forward/visitRecordList/v2";
public static final String SELLERUNREADMESSAGE = HOST + "/kjy/mp/custmarketing/sellerUnreadMsg";
public static final String CUSTOMERSEARCH = HOST + "/kjy/mp/whoSawMe/customerSearch";
public static final String SEARCHCUSTOMERBYCONTENT = HOST + "/kjy/mp/custmarketing/searchCustomer";
public static final String DYNAMIC_ADDVISIT = HOST + "/kjy/mp/seller/dynamic/addVisit";
public static final String CLUEINFO = HOST + "/kjy/mp/whoSawMe/clue/info";
public static final String CLUEADVISE = HOST + "/kjy/mp/whoSawMe/clue/info/advise";
// *************** 客户信息 ***************
public static final String CUSTINFOHEADER = HOST + "/kjy/mp/whoSawMe/custInfoHeader";
public static final String CUSTINFO = HOST + "/kjy/mp/seller/v2/custInfo";
public static final String CLUESTATISTICS = HOST + "/kjy/mp/whoSawMe/clue/statistics";
public static final String CUSTRELATION = HOST + "/kjy/mp/seller/customer/relation";
public static final String CUSTOMERSTATISTICS = HOST + "/kjy/mp/whoSawMe/customerStatistics";
public static final String CUSTREADPERFERENCE = HOST + "/kjy/mp/seller/customer/getReadPerference";
public static final String CUSTSTATISTIC = HOST + "/kjy/mp/whoSawMe/customerInfo/statistic";
public static final String CUSTVISITLIST = HOST + "/kjy/mp/whoSawMe/customerInfo/list";
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 UPDATESPECIAL = HOST + "/kjy/mp/whoSawMe/updateSpecial";
public static final String totalSpecial = HOST + "/kjy/mp/whoSawMe/customerTotalStatistics";
public static final String UPDATEREMARKNAME = HOST + "/kjy/mp/seller/customer/updateRemarkName";
public static final String GETCUSTAGANDMEMO = HOST + "/kjy/mp/seller/getCustomerTagAndMemoInfo";
public static final String UPDATETAGANDMEMO = HOST + "/kjy/mp/seller/updateTagAndMemoInfo";
public static final String CUSTMATERIALS = HOST + "/kjy/mp/whoSawMe/materials";
public static final String CUSTLOTTERIES = HOST + "/kjy/mp/whoSawMe/lotteries";
public static final String CUSTFAVORITE = HOST + "/kjy/mp/whoSawMe/custFavorite";
public static final String GETTAGANDREMIND = HOST + "/kjy/mp/seller/getTagAndRemindInfo";
public static final String UPDATECUSTREMIND = HOST + "/kjy/mp/seller/saveOrUpdateCustomRemind";
public static final String GETREMINDINFOS = HOST + "/kjy/mp/seller/getRemindInfos";
public static final String DELETEREMIND = HOST + "/kjy/mp/seller/deleteCustomRemind";
public static final String UPDATEBIRTHREMIND = HOST + "/kjy/mp/seller/updateBirthdayRemindInfo";
public static final String UPDATEHOLIDAYREMIND = HOST + "/kjy/mp/seller/updateHolidayRemindInfo";
public static final String GETCUSTREMINDINFO = HOST + "/kjy/mp/seller/getCustomerRemindInfo";
public static final String CUSTOMERDETAIL = HOST + "/kjy/mp/seller/v2/customer/detail";
public static final String RELATIONINFO_HEADER = HOST + "/kjy/mp/seller/customer/getRelationInfoHeader";
public static final String RELATIONINFO_LIST = HOST + "/kjy/mp/seller/customer/getRelationInfoList";
public static final String RELATIONINFO_RANKING = HOST + "/kjy/mp/seller/customer/relation/ranking";
public static final String UPDATECUSTMATERIAL = HOST + "/kjy/mp/seller/v2/customer/material/saveOrUpdate";
// *************** 标签管理 ***************
public static final String TAG_ADDORUPDATE = HOST + "/kjy/mp/sellerTag/addOrUpdateTag";
public static final String TAG_GETLIST = HOST + "/kjy/mp/sellerTag/getTagList";
public static final String TAG_DELETE = HOST + "/kjy/mp/sellerTag/deleteTag";
// *************** 留言 ***************
public static final String CHAT_SEND = HOST + "/kjy/mp/chat/send";
public static final String CHAT_LIST = HOST + "/kjy/mp/chat/list";
public static final String CHAT_GETSUBSCRIBESTATUS = HOST + "/kjy/mp/chat/getSubscribeStatus";
public static final String CHAT_LINKMANLIST = HOST + "/kjy/mp/chat/sellerLinkmanList";
// *************** 文章 ***************
......@@ -779,12 +830,27 @@ public class BasicConfig {
public static final String BOSS_CODE = HOST + "/kjy/mp/seller/team/invite/code";
public static final String BOSS_BOSS = HOST + "/kjy/mp/seller/team/boss";
public static final String BOSS_EDITCONFIG = HOST + "/kjy/mp/sellerConfig/editConfig";
public static final String BOSS_ISDEMO = HOST + "/kjy/mp/seller/team/isDemo";
public static final String BOSS_TEAMTASKLIST = HOST + "/kjy/mp/seller/team/task/teamTaskList";
public static final String BOSS_CREATE = HOST + "/kjy/mp/seller/team/task/create";
public static final String BOSS_DETAIL = HOST + "/kjy/mp/seller/team/task/detail";
public static final String BOSS_PUBLISH = HOST + "/kjy/mp/seller/team/task/publish";
public static final String BOSS_RECEIVERLIST = HOST + "/kjy/mp/seller/team/task/receiverList";
public static final String BOSS_BOUND = HOST + "/kjy/mp/seller/team/bound";
public static final String MATERIALLIST = HOST + "/kjy/mp/seller/dynamic/getMaterialList";
public static final String FORWARDCARDLIST = HOST + "/kjy/mp/seller/dynamic/getForwardCardList";
public static final String MARKETINGTOOLLIST = HOST + "/kjy/mp/seller/dynamic/getMarketingToolList";
public static final String SALECLUELIST = HOST + "/kjy/mp/seller/dynamic/getSaleClueList";
public static final String GETVISITLIST = HOST + "/kjy/mp/seller/dynamic/getVisitList";
public static final String TEAMDATA = HOST + "/kjy/mp/seller/team/data";
public static final String TEAMMEMBERNUM = HOST + "/kjy/mp/seller/team/memberNumber";
public static final String TEAMRANKINGLIST = HOST + "/kjy/mp/seller/team/rankingList";
// 团队管理
public static final String FINDPAGEBYCONTENTTYPE = HOST + "/kjy/mp/exclusiveItem/findPageByContentType";
public static final String TEAMMEMBER = HOST + "/kjy/mp/seller/team/member";
public static final String TEAMSTRUCTURE_IDENTITY = HOST + "/kjy/mp/seller/team/member/identity";
public static final String MEMBERREMOVE = HOST + "/kjy/mp/seller/team/member/remove";
public static final String MEMBERSEARCH = HOST + "/kjy/mp/seller/team/member/search";
......@@ -855,7 +921,7 @@ public class BasicConfig {
public static final String MANAGER_findId = MANAGER_HOST + "/kjy/manager/dailyPosters/findById";
public static final String MANAGER_addOrUpdate = MANAGER_HOST + "/kjy/manager/dailyPosters/addOrUpdate";
public static final String MANAGER_dailyPostersDelete = MANAGER_HOST + "/kjy/manager/dailyPosters/delete";
public static final String MANAGER_removeMember = MANAGER_HOST + "/kjy/manager/sellerTeam/removeMember";
public static final String MANAGER_SELLERTEAM_REMOVEMEMBER = MANAGER_HOST + "/kjy/manager/sellerTeam/removeMember";
public static final String MANAGER_ID_ENCODE = MANAGER_HOST + "/kjy/manager/testUser/encode";
public static final String MANAGER_TKU_DECODE = MANAGER_HOST + "/kjy/manager/testUser/decryptTku";
public static final String MANAGER_getPushContent = MANAGER_HOST + "/kjy/manager/pushManager/getPushContent";
......
......@@ -57,6 +57,11 @@
<class name="com.kjj.cases.assistant.whoSawMe.MyForward"/>
</classes>
</test>
<test preserve-order="true" name = "我的客户">
<classes>
<class name="com.kjj.cases.assistant.whoSawMe.MyCustomer"/>
</classes>
</test>
<test preserve-order="true" name = "贺卡">
<classes>
<class name="com.kjj.cases.assistant.markettools.GreetingCrad"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment