Commit 1da6b736 authored by 张艳玲's avatar 张艳玲

Merge branch '2021072002-gxh02' into 'master'

2021072002 gxh02

See merge request test-group/kejiji!75
parents 390d6a1a 8a3e1196
package com.kjj.cases.assistant; package com.kjj.cases.assistant;
import static com.kjj.config.BasicConfig.*; import static com.kjj.config.BasicConfig.*;
import com.kjj.cases.admin.Authorization; import com.kjj.cases.admin.Authorization;
import com.kjj.utils.BaseUtils; import com.kjj.utils.BaseUtils;
import com.kjj.utils.ThreadSleepUtils; import com.kjj.utils.ThreadSleepUtils;
......
...@@ -101,7 +101,7 @@ public class ArticalPersonCard implements Authorization { ...@@ -101,7 +101,7 @@ public class ArticalPersonCard implements Authorization {
@Test(description="代理人_头部名片详情",priority = 7) @Test(description="代理人_头部名片详情",priority = 7)
public void 代理人_头部名片详情(){ public void 代理人_头部名片详情(){
//获取加密的销售ID //获取加密的销售ID
sleep(1000); sleep(5000);
Response response = network.getResponse(USER_INFO); Response response = network.getResponse(USER_INFO);
sid = response.jsonPath().getString("data.encodeSellerId"); sid = response.jsonPath().getString("data.encodeSellerId");
String sellerName = response.jsonPath().getString("data.sellerName"); String sellerName = response.jsonPath().getString("data.sellerName");
...@@ -201,7 +201,7 @@ public class ArticalPersonCard implements Authorization { ...@@ -201,7 +201,7 @@ public class ArticalPersonCard implements Authorization {
//切换为访客 //切换为访客
userTku(); userTku();
sleep(1000); sleep(2000);
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("scid",scid);//代理人的scid params.put("scid",scid);//代理人的scid
params.put("cancelPush",false); params.put("cancelPush",false);
......
...@@ -129,13 +129,6 @@ public class Article { ...@@ -129,13 +129,6 @@ public class Article {
String scId = response.jsonPath().getString("data.scid"); String scId = response.jsonPath().getString("data.scid");
String name = response.jsonPath().getString("data.sellerName"); String name = response.jsonPath().getString("data.sellerName");
Assert.assertEquals(name,sellerName,"头部名片信息显示有误"); Assert.assertEquals(name,sellerName,"头部名片信息显示有误");
//获取名片的点赞
Map<String, Object> likeParams = new HashMap<String, Object>();
likeParams.put("scId",scId);
response = network.getResponse(likeParams,HASALREADYLIKE);
boolean favourResult = response.jsonPath().getBoolean("data.favourResult");
Assert.assertTrue(favourResult,"头部名片点赞数量显示有误");
} }
// 底部名片 // 底部名片
......
package com.kjj.cases.basics; package com.kjj.cases.basics;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.NetworkUtils; import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response; import io.restassured.response.Response;
import org.testng.Assert; import org.testng.Assert;
...@@ -32,17 +31,17 @@ public class GreetingCard { ...@@ -32,17 +31,17 @@ public class GreetingCard {
// BANNER // BANNER
@Test(description="BANNER",priority = 1) @Test(description="BANNER",priority = 1)
public void BANNER() throws IOException { public void BANNER() throws IOException {
Response response = network.getResponse(GREETING_BANNER); Response response = network.getResponse(GREETING_banner);
boolean hasList = response.jsonPath().getInt("data.size()") > 0; boolean hasList = response.jsonPath().getInt("data.size()") > 0;
Assert.assertTrue(hasList,network.message(GREETING_BANNER,"获取Banner列表失败",response.body().asString())); Assert.assertTrue(hasList,network.message(GREETING_banner,"获取Banner列表失败",response.body().asString()));
} }
// 转发最多 // 转发最多
@Test(description="大家都在发",priority = 2) @Test(description="大家都在发",priority = 2)
public void 大家都在发() throws IOException { public void 大家都在发() throws IOException {
Response response = network.getResponse(GREETING_ALLFORWARD); Response response = network.getResponse(GREETING_allForward);
boolean hasList = response.jsonPath().getInt("data.size()") > 0; boolean hasList = response.jsonPath().getInt("data.size()") > 0;
Assert.assertTrue(hasList,network.message(GREETING_ALLFORWARD,"获取大家都在发列表失败",response.body().asString())); Assert.assertTrue(hasList,network.message(GREETING_allForward,"获取大家都在发列表失败",response.body().asString()));
} }
// 贺卡tab // 贺卡tab
...@@ -51,10 +50,10 @@ public class GreetingCard { ...@@ -51,10 +50,10 @@ public class GreetingCard {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("tagType","greeting_card"); params.put("tagType","greeting_card");
params.put("exclusiveArea",0); params.put("exclusiveArea",0);
Response response = network.getResponse(params,GREETING_FINDBYTYPE); Response response = network.getResponse(params, GREETING_findByType);
int totalCount = response.jsonPath().getInt("data.list.size()"); int totalCount = response.jsonPath().getInt("data.list.size()");
tagId = response.jsonPath().getInt("data.list[-1].id"); tagId = response.jsonPath().getInt("data.list[-1].id");
Assert.assertEquals(totalCount,3,network.message(params,GREETING_FINDBYTYPE,"获取贺卡tab失败",response.body().asString())); Assert.assertEquals(totalCount,3,network.message(params, GREETING_findByType,"获取贺卡tab失败",response.body().asString()));
} }
// 获取539的贺卡列表 // 获取539的贺卡列表
...@@ -65,11 +64,11 @@ public class GreetingCard { ...@@ -65,11 +64,11 @@ public class GreetingCard {
params.put("pageSize", 10); params.put("pageSize", 10);
params.put("type",6); params.put("type",6);
params.put("tag1Id",tagId); params.put("tag1Id",tagId);
Response response = network.getResponse(params,GREETING_PAGELIST); Response response = network.getResponse(params, GREETING_pageList);
boolean hasList = response.jsonPath().getInt("data.list.size()") > 0; boolean hasList = response.jsonPath().getInt("data.list.size()") > 0;
contentId = response.jsonPath().getString("data.list[0].id"); contentId = response.jsonPath().getString("data.list[0].id");
greetingName = response.jsonPath().getString("data.list[0].title"); greetingName = response.jsonPath().getString("data.list[0].title");
Assert.assertTrue(hasList,network.message(params,GREETING_PAGELIST,"获取贺卡tab失败",response.body().asString())); Assert.assertTrue(hasList,network.message(params, GREETING_pageList,"获取贺卡tab失败",response.body().asString()));
} }
// 贺卡详情页 // 贺卡详情页
......
...@@ -631,16 +631,16 @@ public class BasicConfig { ...@@ -631,16 +631,16 @@ public class BasicConfig {
// *************** 名片 *************** // *************** 名片 ***************
public static final String SELLERCARD_TOPOFDETAIL = HOST + "/kjy/mp/sellerCardV5/topOfDetail"; public static final String SELLERCARD_topOfDetail = HOST + "/kjy/mp/sellerCardV5/topOfDetail";
public static final String SELLERCARD_EDITBASEINFO = HOST + "/kjy/mp/sellerCard/editBaseInfo"; public static final String SELLERCARD_editBaseInfo = HOST + "/kjy/mp/sellerCard/editBaseInfo";
public static final String SELLERCARD_PERSONALPROFILE = HOST + "/kjy/mp/sellerCardV5/personalProfile"; public static final String SELLERCARD_personalProfile = HOST + "/kjy/mp/sellerCardV5/personalProfile";
public static final String SELLERCARD_EDITMAJORGOODAUTH = HOST + "/kjy/mp/sellerCard/editMajorGoodAuth"; public static final String SELLERCARD_editMajorGoodAuth = HOST + "/kjy/mp/sellerCard/editMajorGoodAuth";
public static final String SELLERCARD_APPRAISELISTNEW = HOST + "/kjy/mp/sellerCardV5/appraiseListNew"; public static final String SELLERCARD_appraiseListNew = HOST + "/kjy/mp/sellerCardV5/appraiseListNew";
public static final String SELLERCARD_GETQUESTIONS = HOST + "/kjy/mp/sellerCardV5/getQuestions"; public static final String SELLERCARD_getQuestions = HOST + "/kjy/mp/sellerCardV5/getQuestions";
public static final String SELLERCARD_ISDISPLAYACTIVITY = HOST + "/kjy/mp/clue/activity/isDisplayActivity"; public static final String SELLERCARD_isDisplayActivity = HOST + "/kjy/mp/clue/activity/isDisplayActivity";
public static final String SELLERCARD_COMPANYLIST = HOST + "/kjy/mp/company/list"; public static final String SELLERCARD_companyList = HOST + "/kjy/mp/company/list";
public static final String SELLERCARD_SELLERCARDCASENEW = HOST + "/kjy/mp/sellerCardV5/sellerCardCasesList"; public static final String SELLERCARD_sellerCardCasesList = HOST + "/kjy/mp/sellerCardV5/sellerCardCasesList";
public static final String SELLERCARD_PRODUCTLIST = HOST + "/kjy/mp/sellerCardV5/productList"; public static final String SELLERCARD_productList = HOST + "/kjy/mp/sellerCardV5/productList";
public static final String SELLERCARD_GETSELLERCARDCONFIG = HOST + "/kjy/mp/sellerConfig/getSellerCardConfig"; public static final String SELLERCARD_GETSELLERCARDCONFIG = HOST + "/kjy/mp/sellerConfig/getSellerCardConfig";
public static final String SELLERCARD_GETSELLERCARDSTYLE = HOST + "/kjy/mp/sellerConfig/getSellerCardStyle"; public static final String SELLERCARD_GETSELLERCARDSTYLE = HOST + "/kjy/mp/sellerConfig/getSellerCardStyle";
public static final String SELLERCARD_TOPOFCONTENT = HOST + "/kjy/mp/sellerCardV5/topOfContent"; public static final String SELLERCARD_TOPOFCONTENT = HOST + "/kjy/mp/sellerCardV5/topOfContent";
...@@ -788,15 +788,27 @@ public class BasicConfig { ...@@ -788,15 +788,27 @@ public class BasicConfig {
// *************** 贺卡 *************** // *************** 贺卡 ***************
public static final String GREETING_BANNER = HOST + "/kjy/mp/greeting/banner"; public static final String GREETING_banner = HOST + "/kjy/mp/greeting/banner";
public static final String GREETING_ALLFORWARD = HOST + "/kjy/mp/greeting/allForward"; public static final String GREETING_allForward = HOST + "/kjy/mp/greeting/allForward";
public static final String GREETING_FINDBYTYPE = HOST + "/kjy/mp/tag/findByType"; public static final String GREETING_findByType = HOST + "/kjy/mp/tag/findByType";
public static final String GREETING_PAGELIST = HOST + "/kjy/mp/greeting/pageList"; public static final String GREETING_pageList = HOST + "/kjy/mp/greeting/pageList";
public static final String GREETING_CONFLIST = HOST + "/kjy/mp/greeting/conf/list"; public static final String GREETING_CONFLIST = HOST + "/kjy/mp/greeting/conf/list";
public static final String GREETING_H5SHARE = ACTIVITY_HOST + "/kjy/mp/greeting/conf/h5share"; public static final String GREETING_H5SHARE = ACTIVITY_HOST + "/kjy/mp/greeting/conf/h5share";
public static final String GREETING_H5INFO = ACTIVITY_HOST + "/kjy/mp/content/h5info"; public static final String GREETING_H5INFO = ACTIVITY_HOST + "/kjy/mp/content/h5info";
public static final String GREETING_SAVEDEFAULT = ACTIVITY_HOST + "/kjy/mp/greeting/conf/saveDefault"; public static final String GREETING_SAVEDEFAULT = ACTIVITY_HOST + "/kjy/mp/greeting/conf/saveDefault";
public static final String GREETING_getTipsByPage = HOST + "/kjy/mp/tips/getTipsByPage";
public static final String GREETING_getMarketingToolArea = HOST + "/kjy/mp/home/getMarketingToolArea";
public static final String GREETING_answerPageList = HOST + "/kjy/mp/game/answerPageList";
public static final String GREETING_getSellerVipInfo = HOST + "/kjy/mp/seller/getSellerVipInfo";
public static final String GREETING_checkVisitor = HOST + "/kjy/mp/greeting/checkVisitor";
public static final String GREETING_oaSubscribeType = HOST + "/kjy/mp/user/oaSubscribeType";
public static final String GREETING_check = ACTIVITY_HOST + "/kjy/mp/greeting/conf/check";
public static final String GREETING_preView = ACTIVITY_HOST + "/kjy/mp/greeting/preView";
public static final String GREETING_isRedpackEnable = ACTIVITY_HOST + "/kjy/mp/greeting/packet/isRedpackEnable";
public static final String GREETING_self = ACTIVITY_HOST + "/kjy/mp/seller/self";
public static final String GREETING_getInfoByScid = ACTIVITY_HOST + "/kjy/mp/seller/getInfoByScid";
public static final String GREETING_checkLimit = ACTIVITY_HOST + "/kjy/mp/greeting/conf/checkLimit";
public static final String GREETING_more = ACTIVITY_HOST + "/kjy/mp/greeting/more";
// *************** 管理后台 *************** // *************** 管理后台 ***************
......
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
<class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/> <class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>
</classes> </classes>
</test> </test>
<test preserve-order="true" name = "贺卡">
<classes>
<class name="com.kjj.cases.assistant.markettools.greetingCrad"/>
</classes>
</test>
</suite> </suite>
<!-- Suite --> <!-- Suite -->
......
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