Commit 47a4af2b by yangjian

编辑记录-查看会员卡详情

parent b8c3f9bb
......@@ -7,6 +7,7 @@ import com.xiaomai.enums.RequestType;
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;
......@@ -30,7 +31,9 @@ public class TestFindHistoryDetailById extends XMBaseTest {
String memberCardId = XMJSONPath.readPath(dataApi.getApi_response(), "$.result.records[0].id");//拿售卖记录第一张会员卡的ID
Cardtools.fetchPageOfHistory(memberCardId);
String id = XMJSONPath.readPath(dataApi.getApi_response(), "$.result.records[0].snapshotId");//第一条编辑记录
Assert.assertEquals(XMJSONPath.readPath(dataApi.getApi_response(), "$.result.records[0].operateType"), "NEW", "第一条非新建的编辑记录");//断言第一条编辑记录-新建的编辑记录
String id = XMJSONPath.readPath(dataApi.getApi_response(), "$.result.records[0].snapshotId");//
JSONObject jsonObject = new JSONObject();
......@@ -42,6 +45,12 @@ public class TestFindHistoryDetailById extends XMBaseTest {
xmAppApi.doRequest(RequestType.JSON, params, jsonObject.toJSONString(), headers).assetsSuccess(true);
Cardtools.findHistoryDetailById(id);
//Assert.assertEquals(XMJSONPath.readPath(dataApi.getApi_response(), "$.result.sharePeopleLimit"), 0, "详情的id不是查看的id");//断言第一条编辑记录-新建的编辑记录
Assert.assertTrue(XMJSONPath.readPath(xmAppApi.getApi_response(),"$.result.id").equals(id),"编辑记录的会员卡详情id对不上");
}
}
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