fix(UI自动化): 修复测试计划执行UI当grid服务停止或者未配置grid地址时时未进行检测

--bug=1016822 --user=刘瑶 【UI测试】测试计划-UI列表-操作-执行-当grid服务停止或者未配置grid地址时-未校验 https://www.tapd.cn/55049933/s/1249463
This commit is contained in:
nathan.liu 2022-09-21 23:47:13 +08:00 committed by nathanliu2022
parent 2e05e72475
commit ad262ae0a5
6 changed files with 85 additions and 3 deletions

@ -1 +1 @@
Subproject commit a7499a636342d4b58bb799c45468eb1245ce6e6b
Subproject commit e4e0bdd1a1272fda4ca654427a62f30cf90f672b

View File

@ -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();

@ -1 +1 @@
Subproject commit 90ebdc95e77e628581e2ac083568a3e543cb7c00
Subproject commit d8e611f44c07a1e8d30f003f5f3107dec7d5ce65

View File

@ -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',

View File

@ -2988,6 +2988,8 @@ export default {
delete_scenario_lable: "删除场景",
delete_command_lable: "删除指令",
command_name_label: "指令名称",
command_steps_label: "指令步骤",
command_step_info: "在右侧添加指令步骤",
},
project_application: {
workstation: {

View File

@ -2967,6 +2967,8 @@ export default {
delete_scenario_lable: "刪除場景",
delete_command_lable: "刪除指令",
command_name_label: "指令名稱",
command_steps_label: "指令步驟",
command_step_info: "在右側添加指令步驟",
},
project_application: {
workstation: {