Commit 579191b8 authored by 赵然's avatar 赵然

zr

parent 6a1cd26b
......@@ -257,11 +257,17 @@ public class CustomActivity_DuibaTest extends DuibaTestBase {
Thread.sleep(1000);
response = newActivityService.getOrderStatus2(7496,orderId, device);
String result = String.valueOf(response.jsonPath().getString("result"));
int i = 8;
while (i > 0 && (result.equals("0"))) {
int i = 3;
// while (i > 0 && (result.equals("0"))) {
// Thread.sleep(1000);
// response = newActivityService.getOrderStatus2(7496,orderId, device);
// result = String.valueOf(response.jsonPath().getString("result"));
// i--;
// response.prettyPrint();
// }
while (i > 0 ) {
Thread.sleep(1000);
response = newActivityService.getOrderStatus2(7496,orderId, device);
result = String.valueOf(response.jsonPath().getString("result"));
i--;
response.prettyPrint();
}
......
......@@ -252,6 +252,7 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
result = response.jsonPath().getString("result");
i--;
}
response.prettyPrint();
String id = response.jsonPath().getString("lottery.id");
String imgurl = response.jsonPath().getString("lottery.imgurl");
......@@ -261,7 +262,7 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
String coupon_code = response.jsonPath().getString("lottery.coupon_code");
String coupon_key = response.jsonPath().getString("lottery.coupon_key");
Assert.assertEquals(id,"15810","id不正确");
Assert.assertEquals(id,"36248","id不正确");
Assert.assertTrue(link.contains("//activity.m.duibatest.com.cn/crecord/recordDetailNew?orderId="),"link不正确");
Assert.assertEquals(title,"【自动化】优惠券-普通","title不正确");
Assert.assertEquals(type,"coupon","type不正确");
......
......@@ -49,6 +49,7 @@ public class 页面元素测试_DuibaTest extends AbstractTestNGSpringContextTes
@Test(description = "校验接口返回的奖品")
public void 奖品显示测试() throws Exception {
Response response = newActivityService.ajaxElement("duiba","3347","19204","false");
response.prettyPrint();
Assert.assertEquals(response.jsonPath().getString("options[0].prizeType"), "thanks", "校验显示谢谢参与失败");
Assert.assertEquals(response.jsonPath().getString("options[1].prizeType"), "coupon", "校验显示优惠券失败");
Assert.assertEquals(response.jsonPath().getString("options[2].prizeType"), "object", "校验显示实物失败");
......
......@@ -543,7 +543,7 @@ public class NewActivityService {
public void submit(int uid,String orderId) throws Exception {
Map<String,String> map = new HashMap<>();
map.put("orderId",orderId);
map.put("answerData","[{\"id\":465,\"option\":3}]");
map.put("answerData","[{\"id\":463,\"option\":1}]");
logger.info("请求/hdtool/submit接口,orderId="+orderId);
Response response = given().cookies(authorization.dafuwengLogin(uid)).params(map).post(url+"/hdtool/submit");
try{
......
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