diff --git a/test-ui/src/assets/images/header.png b/test-ui/src/assets/images/header.png new file mode 100644 index 0000000..57030eb Binary files /dev/null and b/test-ui/src/assets/images/header.png differ diff --git a/test-ui/src/views/test/case/index.vue b/test-ui/src/views/test/case/index.vue index 471c478..fec42c2 100644 --- a/test-ui/src/views/test/case/index.vue +++ b/test-ui/src/views/test/case/index.vue @@ -62,7 +62,7 @@ export default { }); }, handleAdd() { - this.$prompt('请输入名称', '提示', { + this.$prompt('请输入名称', '新增', { confirmButtonText: '确定', cancelButtonText: '取消', inputPattern: /^(?!\s*$).+/, @@ -80,7 +80,7 @@ export default { }); }, handleRowClick(row) { - this.$tab.openPage("用例 - " + row.name, "/case/detail", {id: row.id}); + this.$tab.openPage(`用例[${row.name}]`, "/case/detail", {id: row.id}); }, handleDelete(id) { this.$modal.confirm('是否确认删除用例?').then(function () { diff --git a/test-ui/src/views/test/task/edit/clickOutside.js b/test-ui/src/views/test/task/edit/clickOutside.js new file mode 100644 index 0000000..f4019d3 --- /dev/null +++ b/test-ui/src/views/test/task/edit/clickOutside.js @@ -0,0 +1,18 @@ +// clickOutside.js +export default { + bind(el, binding, vnode) { + el.clickOutsideEvent = function (event) { + // 检查点击事件的目标元素是否是绑定指令的元素或其子元素 + if (!(el === event.target || el.contains(event.target))) { + // 如果不是,则调用传递给指令的方法 + vnode.context[binding.expression](event); + } + }; + // 添加事件监听器 + document.body.addEventListener("click", el.clickOutsideEvent); + }, + unbind(el) { + // 移除事件监听器 + document.body.removeEventListener("click", el.clickOutsideEvent); + }, +}; diff --git a/test-ui/src/views/test/task/edit/executionRecord.vue b/test-ui/src/views/test/task/edit/executionRecord.vue new file mode 100644 index 0000000..649104e --- /dev/null +++ b/test-ui/src/views/test/task/edit/executionRecord.vue @@ -0,0 +1,256 @@ + + + + + 搜索 + + + + + + + 刷新 + + + + + 定时任务执行记录 + + + + + 覆盖率趋势图 + + 选择应用 + + + + + + + + + + + + + + + + + + + + + {{ scope.row.status }} + + + + + + + + {{ scope.row.sendStatus }} + + + + + + + + 查看 + 编辑 + + + + + + + + + + + + + diff --git a/test-ui/src/views/test/task/edit/executiveReport.vue b/test-ui/src/views/test/task/edit/executiveReport.vue new file mode 100644 index 0000000..e69de29 diff --git a/test-ui/src/views/test/task/edit/index.vue b/test-ui/src/views/test/task/edit/index.vue new file mode 100644 index 0000000..403f376 --- /dev/null +++ b/test-ui/src/views/test/task/edit/index.vue @@ -0,0 +1,125 @@ + + + + + + 返回列表 + + + + 任务名称 + + + + + + + + + + + + + + + + + + + + diff --git a/test-ui/src/views/test/task/edit/lineChart.vue b/test-ui/src/views/test/task/edit/lineChart.vue new file mode 100644 index 0000000..0c26bb6 --- /dev/null +++ b/test-ui/src/views/test/task/edit/lineChart.vue @@ -0,0 +1,159 @@ + + + + + + diff --git a/test-ui/src/views/test/task/edit/lineChartCover.vue b/test-ui/src/views/test/task/edit/lineChartCover.vue new file mode 100644 index 0000000..79db731 --- /dev/null +++ b/test-ui/src/views/test/task/edit/lineChartCover.vue @@ -0,0 +1,168 @@ + + + + + + diff --git a/test-ui/src/views/test/task/edit/operationRecords.vue b/test-ui/src/views/test/task/edit/operationRecords.vue new file mode 100644 index 0000000..580607c --- /dev/null +++ b/test-ui/src/views/test/task/edit/operationRecords.vue @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + ID + + + + {{ scope.row.id }} + + + + + + + + 名称 + + + + {{ scope.row.name }} + + + + + + + + + + + + + diff --git a/test-ui/src/views/test/task/edit/report/components/pieChart.vue b/test-ui/src/views/test/task/edit/report/components/pieChart.vue new file mode 100644 index 0000000..e545247 --- /dev/null +++ b/test-ui/src/views/test/task/edit/report/components/pieChart.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/test-ui/src/views/test/task/edit/report/index.vue b/test-ui/src/views/test/task/edit/report/index.vue new file mode 100644 index 0000000..f1d06e9 --- /dev/null +++ b/test-ui/src/views/test/task/edit/report/index.vue @@ -0,0 +1,292 @@ + + + + + + 任务信息 + + 关联应用 + + + + 用例执行分布 + + + + 定时任务执行信息 + + + + 用例总数 + 2 + + + 用例步骤数 + 9 + + + 成功率 + 100% + + + + + + + 执行耗时 + + 111s + + + + + 开始执行时间 + + 2025-02-19 10:00:00 + + + + + 环境 + + + 中移商业保理平台-云龙测试-测试环境 + + + + + + + + + + + + 一致性 Consistency + + + 与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念; + + + 在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。 + + + + + 控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作; + + 页面反馈:操作后,通过页面元素的变化清晰地展现当前状态。 + + + 简化流程:设计简洁直观的操作流程; + + 清晰明确:语言表达清晰且表意明确,让用户快速理解进而作出决策; + + + 帮助用户识别:界面简单直白,让用户快速识别而非回忆,减少用户记忆负担。 + + + + + 用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策; + + + 结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。 + + + + + + + + + + + + diff --git a/test-ui/src/views/test/task/edit/taskDetails.vue b/test-ui/src/views/test/task/edit/taskDetails.vue new file mode 100644 index 0000000..9d1d425 --- /dev/null +++ b/test-ui/src/views/test/task/edit/taskDetails.vue @@ -0,0 +1,735 @@ + + + + + 任务信息 + + + + + + + 执行频率 + + + + + crontab表达式 + + + + + + + {{ inputItem.label }} + + + + + + crontab表达式展示 0 0 10 * * ? + + + + 最近三次执行时间 + + {{ item.time }} + + + + + + + + + + + + + + + + + 最小1次,最大10次 + + + + + + + + + 已选用例列表 + + + + 添加用例 + + + + + + + + + 全部用例 + + + + + + + + 中移商业保理平台 + 指定接口用例 + + + + 2 + + + + + + + + 中移商业保理平台 + + + + + + + + + + + + + + + A + 中 + {{ scope.row.example }} + + + + + + {{ scope.row.address }} + + + + + + {{ scope.row.tag }} + + + + + 用例执行优先级 + + + + + {{ scope.row.date || "未设置,点击输入" }} + + + + + + + + + + + + + + + + + + 关联应用 + + + + + 关联应用 + + + + + + + + + + + + + + + + 添加用例 + + + + + + + + + + + + + + + diff --git a/test-ui/src/views/test/task/edit/test1.vue b/test-ui/src/views/test/task/edit/test1.vue new file mode 100644 index 0000000..7d5e2f2 --- /dev/null +++ b/test-ui/src/views/test/task/edit/test1.vue @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/test-ui/src/views/test/task/edit/test2.vue b/test-ui/src/views/test/task/edit/test2.vue new file mode 100644 index 0000000..6d2fcd6 --- /dev/null +++ b/test-ui/src/views/test/task/edit/test2.vue @@ -0,0 +1,217 @@ + + + + 根据未覆盖代码,提供与其关联的用例和无用例覆盖的接口,补充用例并执行,重新观察全量覆盖率数值变化。 + + + + + 应用 + 实例 + + + + + {{ example.label }} + + {{ example.value }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 生成 + + + + + + + + + + + 查看 + 编辑 + + + + + + + + + + + +