Commit 5df002eb by yangfangfang

物品

parent 695e0af7
......@@ -51,10 +51,11 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
for(int i=0;i<result.size();i++){
if( ! result.getJSONObject(1).getString("id").equals(id)){
success=true;
break;
}
Assert.assertEquals(success,true,"分组里没有一个物品,这个分组不应该在小程序物品组列表展示");
}
Assert.assertEquals(success,true,"分组里没有一个物品,这个分组不应该在小程序物品组列表展示");
......@@ -85,14 +86,20 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
}
JSONArray result1=listXcxGoodsGroup1.getJSONArray("result");
JSONObject result0= result1.getJSONObject(0);
System.out.println("result1"+result1);
System.out.println("result11"+result0);
boolean success1=false;
for(int i=0;i < result1.size();i++){
if(result1.getJSONObject(1).getString("id").equals(id)){
if(result1.getJSONObject(i).getString("id").equals(id)){
success1=true;
break;
}
Assert.assertEquals(success1,true,"分组的物品是启用且开启小程序售卖的,这个分组应该在小程序物品组列表展示");
}
Assert.assertEquals(success1,true,"分组的物品是启用且开启小程序售卖的,这个分组应该在小程序物品组列表展示");
//case3:获取小程序物品分组列表:没有这个分组数据,因为分组内的物品为启用&关闭小程序售卖
......@@ -118,9 +125,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
for(int i=0;i<result2.size();i++){
if( ! result2.getJSONObject(1).getString("id").equals(id)){
success2=true;
break;
}
Assert.assertEquals(success2,true,"分组的物品是启用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示");
}
Assert.assertEquals(success2,true,"分组的物品是启用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示");
//case4:获取小程序物品分组列表:没有这个分组数据,因为分组内的物品为停用&关闭小程序售卖
......@@ -145,9 +153,10 @@ public class TestListXcxGoodsGroup extends BaseTestImpl {
for(int i=0;i<result3.size();i++){
if( ! result3.getJSONObject(1).getString("id").equals(id)){
success3=true;
break;
}
Assert.assertEquals(success3,true,"分组的物品是停用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示");
}
Assert.assertEquals(success3,true,"分组的物品是停用且关闭小程序售卖的,这个分组应该不在小程序物品组列表展示");
}
......
......@@ -299,7 +299,7 @@ public class GoodTools extends XMBaseTest {
jsonObject.put("groupId", "1873912725360504834");
jsonObject.put("multiSpec", true);
jsonObject.put("name", "自动化创建三规格" + RandomStringUtil.randomString(3));
jsonObject.put("name", "自动化创建三规格" + RandomStringUtil.randomString(6));
jsonObject.put("xcxSaleState",xcxSaleState);
......@@ -499,7 +499,7 @@ public class GoodTools extends XMBaseTest {
jsonObject.put("groupId", "1873903328974499841");
jsonObject.put("multiSpec", false);
jsonObject.put("name", "自动化创建单规格" + RandomStringUtil.randomString(2));
jsonObject.put("name", "自动化创建单规格" + RandomStringUtil.randomString(6));
jsonObject.put("xcxSaleState",xcxSaleState);
JSONObject jsonObject2 = new JSONObject();
......
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