From ad262ae0a54dd7ed6afca1d7d1ea63bc741f6bb6 Mon Sep 17 00:00:00 2001 From: "nathan.liu" Date: Wed, 21 Sep 2022 23:47:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI=E8=87=AA=E5=8A=A8=E5=8C=96):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=89=A7=E8=A1=8C?= =?UTF-8?q?UI=E5=BD=93grid=E6=9C=8D=E5=8A=A1=E5=81=9C=E6=AD=A2=E6=88=96?= =?UTF-8?q?=E8=80=85=E6=9C=AA=E9=85=8D=E7=BD=AEgrid=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=97=B6=E6=97=B6=E6=9C=AA=E8=BF=9B=E8=A1=8C=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016822 --user=刘瑶 【UI测试】测试计划-UI列表-操作-执行-当grid服务停止或者未配置grid地址时-未校验 https://www.tapd.cn/55049933/s/1249463 --- backend/src/main/java/io/metersphere/xpack | 2 +- .../comonents/api/TestPlanUiScenarioList.vue | 78 ++++++++++++++++++- frontend/src/business/components/xpack | 2 +- frontend/src/i18n/track/en-US.js | 2 + frontend/src/i18n/zh-CN.js | 2 + frontend/src/i18n/zh-TW.js | 2 + 6 files changed, 85 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index a7499a6363..e4e0bdd1a1 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit a7499a636342d4b58bb799c45468eb1245ce6e6b +Subproject commit e4e0bdd1a1272fda4ca654427a62f30cf90f672b diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanUiScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanUiScenarioList.vue index 2a767cde64..edc03a59c4 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanUiScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanUiScenarioList.vue @@ -467,7 +467,80 @@ export default { } }, - execute(row) { + async validateSeleniumSetting() { + //选择本地调试默认取消性能模式 + const h = this.$createElement; + //检测是否配置了 个人地址, 检测配置的ip端口 是否正常 + let result = await this.$get("/ui/automation/verify/seleniumServer"); + if (result.data) { + let res = result.data; + if (res.data === "ok") { + return true; + } else if (res.data === "connectionErr") { + this.showServerMessageBox( + h("p", null, [ + h( + "span", + null, + "连接失败,请检查 selenium-grid 服务状态" + ), + h( + "p", + { + style: "color: #aeb0b3;cursor:pointer;font-size: 10px;", + on: { + click: (value) => { + this.redirectSetting(); + }, + }, + }, + "查看配置信息" + ), + ]) + ); + return false; + } else { + this.showServerMessageBox( + h("p", null, [ + h("span", null, "连接失败,请检查 selenium-grid 地址信息"), + h( + "p", + { + style: "color: #aeb0b3;cursor:pointer;font-size: 10px;", + on: { + click: (value) => { + this.redirectSetting(); + }, + }, + }, + "查看配置信息" + ), + ]) + ); + return false; + } + } + return true; + }, + redirectSetting() { + window.open("/#/setting/systemparametersetting"); + }, + showServerMessageBox(msg) { + this.$msgbox({ + title: "", + message: msg, + confirmButtonText: this.$t("commons.confirm"), + cancelButtonText: this.$t("commons.cancel"), + }) + .then((action) => {}) + .catch(() => {}); + }, + async doExecute(row){ + //校验selenium + let serverResult = await this.validateSeleniumSetting(); + if(!serverResult){ + return; + } this.infoDb = false; let param ={planCaseIds: []}; this.reportId = ""; @@ -492,6 +565,9 @@ export default { }); } }, + execute(row) { + this.doExecute(row); + }, buildExecuteParam(param,row) { // param.id = row.id; param.id = getUUID(); diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 90ebdc95e7..d8e611f44c 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 90ebdc95e77e628581e2ac083568a3e543cb7c00 +Subproject commit d8e611f44c07a1e8d30f003f5f3107dec7d5ce65 diff --git a/frontend/src/i18n/track/en-US.js b/frontend/src/i18n/track/en-US.js index 05347a3c60..3b94f3fc9b 100644 --- a/frontend/src/i18n/track/en-US.js +++ b/frontend/src/i18n/track/en-US.js @@ -523,6 +523,8 @@ export default { fail_case: "Fail Case", issue_list: "Issue List", all_case: "All Case", + command_steps_label: "Command steps", + command_step_info: "Add a command step on the right", }, reporter: 'Reporter', lastmodify: 'Last Modify', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 7bf87e7de0..2b27e71d95 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -2988,6 +2988,8 @@ export default { delete_scenario_lable: "删除场景", delete_command_lable: "删除指令", command_name_label: "指令名称", + command_steps_label: "指令步骤", + command_step_info: "在右侧添加指令步骤", }, project_application: { workstation: { diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 654a6cf185..1780359457 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -2967,6 +2967,8 @@ export default { delete_scenario_lable: "刪除場景", delete_command_lable: "刪除指令", command_name_label: "指令名稱", + command_steps_label: "指令步驟", + command_step_info: "在右側添加指令步驟", }, project_application: { workstation: {