Browse Source

工作桌面聚合搜索

yuanyuan 4 tháng trước cách đây
mục cha
commit
7c9ad35780
2 tập tin đã thay đổi với 25 bổ sung0 xóa
  1. 17 0
      cases/pc/登录功能/搜索功能/polymerizesearch.py
  2. 8 0
      lib/webapi.py

+ 17 - 0
cases/pc/登录功能/搜索功能/polymerizesearch.py

@@ -0,0 +1,17 @@
+import json
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    #测试用例名称
+    name='工作桌面聚合搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        res = apimgr.polymerize_search()
+        actual = res.json()
+        error_code = actual["error_code"]
+        # 设置检查点
+        STEP(stepNo=2, desc='第二步设置检查点')
+        CHECK_POINT('工作桌面聚合搜索是否正常', error_code == 0)

+ 8 - 0
lib/webapi.py

@@ -1874,6 +1874,14 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/base/included",headers = headers ,json = json)
         return response
 
+    #工作桌面聚合搜索
+    def polymerize_search(self):
+        headers = GSTORE['headers']
+        json = {
+            "searchCode": "建筑工程"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/core/polymerizeSearch",headers = headers ,json = json)
+        return response
 
 apimgr = APIMgr()