Commit 8a961a2f by yangjian

积分相关业务

parent fb3285c5
......@@ -330,9 +330,10 @@ public class PointsTools extends XMBaseTest {
jsonObject.put("enableMemberPoint", "YES");//积分功能是否打开
jsonObject.put("memberPointName", "自动化积分");//积分名称
jsonObject.put("ruleItemList", ruleItemList);//积分规则
jsonObject.put("validPeriod", "1");
jsonObject.put("validPeriod", "-1");
jsonObject.put("description", description);
System.out.println("jsonObject----"+jsonObject);
dataApi.doRequest(RequestType.JSON, dataparams, jsonObject.toJSONString(), dataheadrs).assetsSuccess(true);
JSONObject response = dataApi.getBodyInJSON();
......
package com.xiaomai.cases.polar.points;
import com.xiaomai.enums.ApiModule;
import com.xiaomai.enums.LoginAccount;
import com.xiaomai.enums.Terminal;
import com.xiaomai.utils.XMBaseTest;
import com.xiaomai.utils.XMJSONPath;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import javax.annotation.Resource;
public class TestPointsRule extends XMBaseTest {
@BeforeMethod
public void beforeTest(){
xmAppApi.setApiModule(ApiModule.Polar_Points)
.setApiName("API_memberPoint_saveRule")
.setLoginUser(LoginAccount.YJ_PROD)
.setTerminal(Terminal.B);
dal.setCase_owner("yangjian")
.setCase_name(Thread.currentThread().getStackTrace()[1].getFileName().split("\\.")[0]);
super.beforeTest();
}
@Resource(name = "pointsTools")
PointsTools pointsTools;
@Test(description = "积分规则编辑/保存")//新开场馆和品牌
public void testMemberPoint_saveRule(){
//pointsTools.memberPoint_saveRule("");
pointsTools.memberPoint_saveRule(xmAppApi.getLoginInfo().getStudioId());
pointsTools.memberPoint_findRule(xmAppApi.getLoginInfo().getStudioId());
Assert.assertEquals(XMJSONPath.readPath(dataApi.getApi_response(), "$.result.enableMemberPoint"), "YES", "积分规则未开启");
}
}
......@@ -25,5 +25,7 @@ public class LoginAccount {
public static String YFF_RC="yff_rc";
public static String YFF_GRAY="yff_gray";//芳芳场馆
public static String YJ_PROD="yj_prod";//杨剑场馆
public static String YJ_PROD_ALL="yj_prod_all";//杨剑场馆
}
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