Prechádzať zdrojové kódy

聊天内容分页查询

liuyali@topnet.net.cn 3 mesiacov pred
rodič
commit
2eb025d55c

+ 15 - 0
cases/pc/登录功能/在线客服/findmessage.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '聊天内容分页查询'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.findmessage()
+        actual = res.json()
+        error_code = actual["error_code"]
+        count = actual["count"]
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查创建会话是否正常',error_code == 0 and count == 0)

+ 14 - 0
lib/webapi.py

@@ -1900,6 +1900,20 @@ class APIMgr():
         }
         response = self.s.post(f"{cfg.target_host}/jyapi/message/createChatSession", headers=headers, json=json)
         return response
+    #聊天内容分页查询
+    def findmessage(self):
+        headers = GSTORE['headers']
+        json = {
+            "userType": 2,
+            "msgType": 5,
+            "pageSize": 20,
+            "pageIndex": 1,
+            "sendId": "465d475c52",
+            "lastId": "0",
+            "sort": "asc"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/message/findMessage", headers=headers, json=json)
+        return response