Commit d4f81d9b authored by 龚小红's avatar 龚小红

Merge branch 'Feature/20211210-gxh' into 'master'

删除邀请关系绑定接口取消,并修改获取代理人二维码的轮询规则

See merge request test-group/kejiji!188
parents 4a4b0014 d23e0c3d
...@@ -293,13 +293,4 @@ public class Cashback implements Authorization { ...@@ -293,13 +293,4 @@ public class Cashback implements Authorization {
Assert.assertTrue(changeMoney1 ==35.0, network.message(PAY_accDetail, "一级付费普通代理人返现金额不为35", response.body().asString())); Assert.assertTrue(changeMoney1 ==35.0, network.message(PAY_accDetail, "一级付费普通代理人返现金额不为35", response.body().asString()));
} }
@Test(description = "删除邀请关系",priority = 15)
public void 删除邀请关系() {
Map<String, Object> Params = new HashMap<>();
Params.put("sellerId", 186);
Response response = network.postResponse(Params, PAY_delete);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data, network.message(PAY_delete, "删除失败", response.body().asString()));
}
} }
...@@ -6,6 +6,7 @@ import com.kjj.cases.live.anchor.LiveVisitors; ...@@ -6,6 +6,7 @@ import com.kjj.cases.live.anchor.LiveVisitors;
import com.kjj.cases.live.lottery.Lottery; import com.kjj.cases.live.lottery.Lottery;
import com.kjj.config.BasicConfig; import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants; import com.kjj.constants.LiveConstants;
import com.kjj.utils.IdMakeUtil;
import io.restassured.response.Response; import io.restassured.response.Response;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
...@@ -14,19 +15,22 @@ import org.testng.collections.Lists; ...@@ -14,19 +15,22 @@ import org.testng.collections.Lists;
import java.util.*; import java.util.*;
import static com.kjj.utils.ThreadSleepUtils.sleep;
public class AfterLive implements Authorization { public class AfterLive implements Authorization {
private Map<String, Object> params; private Map<String, Object> params;
private String encodeLiveId; private String encodeLiveId;
@BeforeClass @BeforeClass
public void SetUp(){ visitorAuth1(); } public void SetUp(){
visitorAuth1();
params = new HashMap<>();}
// 获取访客直播结束页样式 // 获取访客直播结束页样式
@Test(description = "获取访客直播结束页样式", priority = 1) @Test(description = "获取访客直播结束页样式", priority = 1)
public void 获取访客直播结束页样式(){ public void 获取访客直播结束页样式(){
encodeLiveId = LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()); // 获取直播ID encodeLiveId = LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()); // 获取直播ID
params = new HashMap<>();
params.put("liveId", encodeLiveId); params.put("liveId", encodeLiveId);
Response response = network.getResponse(params, BasicConfig.USER_liveEnd); Response response = network.getResponse(params, BasicConfig.USER_liveEnd);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(params, BasicConfig.USER_liveEnd, "接口调用失败", response.body().asString())); Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(params, BasicConfig.USER_liveEnd, "接口调用失败", response.body().asString()));
...@@ -55,7 +59,10 @@ public class AfterLive implements Authorization { ...@@ -55,7 +59,10 @@ public class AfterLive implements Authorization {
Response response = network.getResponse(params, BasicConfig.USER_getAgentQrCode); Response response = network.getResponse(params, BasicConfig.USER_getAgentQrCode);
Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(params, BasicConfig.USER_getAgentQrCode, "接口请求失败", response.body().asString())); Assert.assertTrue(response.jsonPath().getBoolean("success"), network.message(params, BasicConfig.USER_getAgentQrCode, "接口请求失败", response.body().asString()));
int pollingResult = response.jsonPath().getInt("data.pollingResult"); int pollingResult = response.jsonPath().getInt("data.pollingResult");
while (pollingResult == 2){ int i = 0;
while (pollingResult == 2&& i != 10){
i++;
sleep(1000);
response = network.getResponse(params, BasicConfig.USER_getAgentQrCode); response = network.getResponse(params, BasicConfig.USER_getAgentQrCode);
pollingResult = response.jsonPath().getInt("data.pollingResult"); pollingResult = response.jsonPath().getInt("data.pollingResult");
} }
......
...@@ -803,7 +803,6 @@ public class BasicConfig { ...@@ -803,7 +803,6 @@ public class BasicConfig {
public static final String PAY_popup = HOST + "/kjj/vip/order/other/popup"; public static final String PAY_popup = HOST + "/kjj/vip/order/other/popup";
public static final String PAY_distribute = HOST + "/kjj/auto/test/proCode/distribute"; public static final String PAY_distribute = HOST + "/kjj/auto/test/proCode/distribute";
public static final String PAY_bind = HOST + "/kjj/auto/test/invitation/bind"; public static final String PAY_bind = HOST + "/kjj/auto/test/invitation/bind";
public static final String PAY_delete = HOST + "/kjj/auto/test/invitation/delete";
// *************** 名片 *************** // *************** 名片 ***************
public static final String SELLERCARD_topOfDetail = HOST + "/kjy/mp/sellerCardV5/topOfDetail"; public static final String SELLERCARD_topOfDetail = HOST + "/kjy/mp/sellerCardV5/topOfDetail";
......
...@@ -23,17 +23,19 @@ public class DingTalkUtils { ...@@ -23,17 +23,19 @@ public class DingTalkUtils {
//测试结果 //测试结果
context = "【接口自动化测试结果反馈】\n" context = "【接口自动化测试结果反馈】\n"
+ context + context
+ "报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n" + "报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n";
+ "@龚小红";
System.out.println(context); System.out.println(context);
Map<String, Object> contentParams = new HashMap<String, Object>(); Map<String, Object> contentParams = new HashMap<String, Object>();
contentParams.put("content",context); contentParams.put("content",context);
Map<String, Object> atParams = new HashMap<String, Object>();
atParams.put("atMobiles","17830855590");
//钉钉机器人消息体 //钉钉机器人消息体
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("msgtype","text"); params.put("msgtype","text");
params.put("text",contentParams); params.put("text",contentParams);
params.put("at", atParams);
//发起dingding机器人通知 //发起dingding机器人通知
if (isPushReport){ if (isPushReport){
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<class name="com.kjj.cases.assistant.enterpriseAgent.EnterpriseAgent"/> <class name="com.kjj.cases.assistant.enterpriseAgent.EnterpriseAgent"/>
</classes> </classes>
</test> </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