Commit b3474d9f by xuyamei

解决离职报错

parent 9dcf6d4b
......@@ -37,7 +37,7 @@ public class TestReinStateStudioAdmin extends BaseTestImpl {
@Test
public void testReinStateStudioAdmin() {
// 获取离职员工
String body = "{\"size\":10,\"current\":0,\"state\":\"LEFT\"}";
String body = "{\"size\":20,\"current\":0,\"state\":\"LEFT\"}";
JSONObject adminPage = adminTools.pageStudioAdmin(body);
int total = Integer.parseInt(adminPage.getJSONObject("result").getString("total"));
if (total>1){
......@@ -57,23 +57,23 @@ public class TestReinStateStudioAdmin extends BaseTestImpl {
body = "{\"id\":\""+adminId+"\"}";
xmAppApi.doRequest(RequestType.JSON,params,body,headers).assetsSuccess(true);
try {
Thread.sleep(1000);
Thread.sleep(2000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
// check 1:用手机号查询离职员工是否有这个员工
body = "{\"size\":10,\"current\":0,\"state\":\"DUTY\",\"searchContext\":\""+phone+"\"}";
body = "{\"size\":20,\"current\":0,\"state\":\"DUTY\",\"searchContext\":\""+phone+"\"}";
adminPage = adminTools.pageStudioAdmin(body);
total = Integer.parseInt(adminPage.getJSONObject("result").getString("total"));
Assert.assertEquals(total,1,"员工离职失败,用手机号查询离职员工未返回数据");
try {
Thread.sleep(12000);
Thread.sleep(15000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
// 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);
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