Commit ebed1a63 by xyy

Merge remote-tracking branch 'origin/master'

parents 52403198 5f66a91e
...@@ -231,7 +231,7 @@ public class TestAddToQueue extends BaseTestImpl { ...@@ -231,7 +231,7 @@ public class TestAddToQueue extends BaseTestImpl {
groupScheduleTools.editGroupSchedule(scheduleId,startTime,chiefCoachId,1,2,dataUserInfo); groupScheduleTools.editGroupSchedule(scheduleId,startTime,chiefCoachId,1,2,dataUserInfo);
try { try {
Thread.sleep(5000); Thread.sleep(10000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -37,7 +37,7 @@ public class TestReinStateStudioAdmin extends BaseTestImpl { ...@@ -37,7 +37,7 @@ public class TestReinStateStudioAdmin extends BaseTestImpl {
@Test @Test
public void testReinStateStudioAdmin() { public void testReinStateStudioAdmin() {
// 获取离职员工 // 获取离职员工
String body = "{\"size\":10,\"current\":0,\"state\":\"LEFT\"}"; String body = "{\"size\":20,\"current\":0,\"state\":\"LEFT\"}";
JSONObject adminPage = adminTools.pageStudioAdmin(body); JSONObject adminPage = adminTools.pageStudioAdmin(body);
int total = Integer.parseInt(adminPage.getJSONObject("result").getString("total")); int total = Integer.parseInt(adminPage.getJSONObject("result").getString("total"));
if (total>1){ if (total>1){
...@@ -57,23 +57,23 @@ public class TestReinStateStudioAdmin extends BaseTestImpl { ...@@ -57,23 +57,23 @@ public class TestReinStateStudioAdmin extends BaseTestImpl {
body = "{\"id\":\""+adminId+"\"}"; body = "{\"id\":\""+adminId+"\"}";
xmAppApi.doRequest(RequestType.JSON,params,body,headers).assetsSuccess(true); xmAppApi.doRequest(RequestType.JSON,params,body,headers).assetsSuccess(true);
try { try {
Thread.sleep(1000); Thread.sleep(2000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
// check 1:用手机号查询离职员工是否有这个员工 // check 1:用手机号查询离职员工是否有这个员工
body = "{\"size\":10,\"current\":0,\"state\":\"DUTY\",\"searchContext\":\""+phone+"\"}"; body = "{\"size\":20,\"current\":0,\"state\":\"DUTY\",\"searchContext\":\""+phone+"\"}";
adminPage = adminTools.pageStudioAdmin(body); adminPage = adminTools.pageStudioAdmin(body);
total = Integer.parseInt(adminPage.getJSONObject("result").getString("total")); total = Integer.parseInt(adminPage.getJSONObject("result").getString("total"));
Assert.assertEquals(total,1,"员工离职失败,用手机号查询离职员工未返回数据"); Assert.assertEquals(total,1,"员工离职失败,用手机号查询离职员工未返回数据");
try { try {
Thread.sleep(12000); Thread.sleep(15000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
// check 2: 生成对应的操作日志 // check 2: 生成对应的操作日志
body = "{\"current\":0,\"size\":10,\"domainId\":\""+xmAppApi.getLoginInfo().getStudioId()+"\",\"content\": \""+name+"\",\"brandId\":\""+xmAppApi.getLoginInfo().getBrandId()+"\",\"studioId\": \""+xmAppApi.getLoginInfo().getStudioId()+"\",\"opEventKey\":\"RESTORE_ADMIN\"}"; body = "{\"current\":0,\"size\":20,\"domainId\":\""+xmAppApi.getLoginInfo().getStudioId()+"\",\"content\": \""+name+"\",\"brandId\":\""+xmAppApi.getLoginInfo().getBrandId()+"\",\"studioId\": \""+xmAppApi.getLoginInfo().getStudioId()+"\",\"opEventKey\":\"RESTORE_ADMIN\"}";
JSONObject response = configTools.getOpauditPage(body); JSONObject response = configTools.getOpauditPage(body);
Assert.assertEquals(response.getJSONObject("result").getJSONArray("records").getJSONObject(0).getJSONObject("target").getString("targetId"),adminId,"员工离职未生成操作日志"); Assert.assertEquals(response.getJSONObject("result").getJSONArray("records").getJSONObject(0).getJSONObject("target").getString("targetId"),adminId,"员工离职未生成操作日志");
......
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