Commit 32fa9d8c authored by 吕雯燕's avatar 吕雯燕

Merge branch 'duiba_wenyan'

parents 991a0cc6 a75b1dcf
...@@ -589,6 +589,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -589,6 +589,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
@Test @Test
public void 优惠券限时兑换测试() throws Exception{ public void 优惠券限时兑换测试() throws Exception{
int uid = 7113;
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
map.put("appItemId","172079"); map.put("appItemId","172079");
map.put("itemId","29667"); map.put("itemId","29667");
...@@ -600,7 +601,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -600,7 +601,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
//获取按钮状态 //获取按钮状态
Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"29667"); Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"29667");
detailResponse.prettyPrint(); // detailResponse.prettyPrint();
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
......
...@@ -63,7 +63,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -63,7 +63,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//获取按钮状态 //获取按钮状态
Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"1"); Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"1");
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"10\":\\{\"btnText\":\"(.*?)\",\"credits\":\"1000\",\"limitCount\":\"1\",\"limitScope\":\"everyday\",\"tipText\":\"此选项每日只能兑换1次\",\"status\":false}}", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"10\":\\{\"btnText\":\"(.*?)\",\"credits\":\"1\",\"limitCount\":\"1\",\"limitScope\":\"everyday\",\"tipText\":\"此选项每日只能兑换1次\",\"status\":false}}", 1);
logger.info("兑换按钮:"+ exchangeText); logger.info("兑换按钮:"+ exchangeText);
Assert.assertTrue(message.contains("已兑完"),"校验message失败"); Assert.assertTrue(message.contains("已兑完"),"校验message失败");
...@@ -107,7 +107,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -107,7 +107,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//获取按钮状态 //获取按钮状态
Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"1"); Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"1");
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"20\":\\{\"btnText\":\"(.*?)\",\"credits\":\"2000\",\"limitCount\":\"1\",\"limitScope\":\"month\",\"tipText\":\"此选项每月只能兑换1次\",\"status\":false}", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"20\":\\{\"btnText\":\"(.*?)\",\"credits\":\"2\",\"limitCount\":\"1\",\"limitScope\":\"month\",\"tipText\":\"此选项每月只能兑换1次\",\"status\":false}", 1);
logger.info("兑换按钮:"+ exchangeText); logger.info("兑换按钮:"+ exchangeText);
Assert.assertTrue(message.contains("已兑完"),"校验message失败"); Assert.assertTrue(message.contains("已兑完"),"校验message失败");
...@@ -150,7 +150,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple ...@@ -150,7 +150,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//获取按钮状态 //获取按钮状态
Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"1"); Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"1");
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"50\":\\{\"btnText\":\"(.*?)\",\"credits\":\"5000\",\"limitCount\":\"1\",\"limitScope\":\"forever\",\"tipText\":\"此选项只能兑换1次\",\"status\":false}", 1); String exchangeText = MatcherString.getString(detailResponse.asString(), "\"50\":\\{\"btnText\":\"(.*?)\",\"credits\":\"3\",\"limitCount\":\"1\",\"limitScope\":\"forever\",\"tipText\":\"此选项只能兑换1次\",\"status\":false}", 1);
logger.info("兑换按钮:"+ exchangeText); logger.info("兑换按钮:"+ exchangeText);
Assert.assertTrue(message.contains("已兑完"),"校验message失败"); Assert.assertTrue(message.contains("已兑完"),"校验message失败");
......
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