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

Merge branch 'feafture/20220509-gxh' into 'master'

增加OTO销售工作台移动端1.1的测试用例

See merge request test-group/kejiji!254
parents e9f9ce7e 4c1c2638
......@@ -8,7 +8,6 @@ import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
......@@ -23,7 +22,6 @@ public class Work implements Authorization {
private static final NetworkUtils network = NetworkUtils.getInstance();
public int tagId; //标签ID
public int custId; //客户ID
public int collectCustId = 2801; //客户ID
public String phone; //客户手机号
public int followTimes; //跟进次数
public static Map<String,Integer> header;
......@@ -512,7 +510,7 @@ public class Work implements Authorization {
@Test(description = "放弃客户进入回收池",priority = 48)
public void 放弃客户进入回收池(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", collectCustId);
params.put("custId", custId);
params.put("abandonReasonType", 3);
params.put("abandonRemark", "放弃原因"+new Date());
Response response = network.postResponse(params,BasicConfig.WORK_abandonCust);
......@@ -545,7 +543,7 @@ public class Work implements Authorization {
Response response = network.getResponse(params,BasicConfig.WORK_recycleList);
int size = response.jsonPath().getInt("data.list.size()");
Assert.assertTrue(size>0,network.message(params,BasicConfig.WORK_recycleList,"查看回收池客户列表为空",response.body().asString()));
int result = response.jsonPath().getInt("data.list.findAll{it.custId == "+collectCustId+"}.size()");
int result = response.jsonPath().getInt("data.list.findAll{it.custId == "+custId+"}.size()");
Assert.assertEquals(result,1,network.message(params,BasicConfig.WORK_recycleList,"回收池客户列表不包含刚刚的回收客户",response.body().asString()));
}
......@@ -553,7 +551,7 @@ public class Work implements Authorization {
public void 认领回收池客户(){
sleep(2000);
HashMap<String,Object> params = new HashMap<>();
params.put("custId", collectCustId);
params.put("custId", custId);
Response response = network.postResponse(params,BasicConfig.WORK_claim);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_claim,"删除客户失败",response.body().asString()));
......@@ -571,7 +569,7 @@ public class Work implements Authorization {
@Test(description = "查询认领客户评价清空",priority = 54)
public void 查询认领客户评价清空(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", collectCustId);
params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.WORK_header);
Object custValue = response.jsonPath().getJsonObject("data.custValue");
Object followWeight = response.jsonPath().getJsonObject("data.followWeight");
......
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