parent
09d957ddae
commit
3182e52b4f
|
@ -30,19 +30,19 @@
|
|||
|
||||
<script>
|
||||
|
||||
import MsRequestResult from "./components/RequestResult";
|
||||
import MsRequestResultTail from "./components/RequestResultTail";
|
||||
import MsScenarioResult from "./components/ScenarioResult";
|
||||
import MsMetricChart from "./components/MetricChart";
|
||||
import MsScenarioResults from "./components/ScenarioResults";
|
||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||
import MsApiReportExport from "./ApiReportExport";
|
||||
import MsApiReportViewHeader from "./ApiReportViewHeader";
|
||||
import {RequestFactory} from "../../definition/model/ApiTestModel";
|
||||
import {windowPrint, getUUID, getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsRequestResult from "./components/RequestResult";
|
||||
import MsRequestResultTail from "./components/RequestResultTail";
|
||||
import MsScenarioResult from "./components/ScenarioResult";
|
||||
import MsMetricChart from "./components/MetricChart";
|
||||
import MsScenarioResults from "./components/ScenarioResults";
|
||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||
import MsApiReportExport from "./ApiReportExport";
|
||||
import MsApiReportViewHeader from "./ApiReportViewHeader";
|
||||
import {RequestFactory} from "../../definition/model/ApiTestModel";
|
||||
import {windowPrint, getUUID, getCurrentProjectID} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "MsApiReport",
|
||||
components: {
|
||||
MsApiReportViewHeader,
|
||||
|
@ -106,8 +106,8 @@
|
|||
res.scenarios.forEach(item => {
|
||||
if (item && item.requestResults) {
|
||||
item.requestResults.forEach(req => {
|
||||
resMap.set(req.id, req);
|
||||
req.name = item.name + "^@~@^" + req.name+ "UUID="+getUUID();
|
||||
resMap.set(req.id + req.name, req);
|
||||
req.name = item.name + "^@~@^" + req.name + "UUID=" + getUUID();
|
||||
array.push(req);
|
||||
})
|
||||
}
|
||||
|
@ -126,15 +126,15 @@
|
|||
//运行场景中如果连续将1个场景引入多次,会出现运行结果合并的情况。
|
||||
//为了解决这种问题,在转hashTree的时候给场景放了个新ID,前台加载解析的时候也要做处理
|
||||
let scenarioId = "";
|
||||
if(item.scenario !== null){
|
||||
if (item.scenario !== null) {
|
||||
let scenarioArr = JSON.parse(item.scenario);
|
||||
if(scenarioArr.length>1){
|
||||
if (scenarioArr.length > 1) {
|
||||
let scenarioIdArr = scenarioArr[0].split("_");
|
||||
scenarioId = scenarioIdArr[0];
|
||||
}
|
||||
}
|
||||
// 循环构建子节点
|
||||
for (let i = 0;i < nodeArray.length;i++) {
|
||||
for (let i = 0; i < nodeArray.length; i++) {
|
||||
if (!nodeArray[i]) {
|
||||
continue;
|
||||
}
|
||||
|
@ -157,23 +157,23 @@
|
|||
let idIsPath = true;
|
||||
//判断ID是否匹配 目前发现问题的只有重复场景,而重复场景是在第二个节点开始合并的。所以这里暂时只判断第二个场景问题。
|
||||
//如果出现了其他问题,则需要检查其他问题的数据结构。暂时采用具体问题具体分析的策略
|
||||
if(i === nodeArray.length-2){
|
||||
if (i === nodeArray.length - 2) {
|
||||
idIsPath = false;
|
||||
let childId = "";
|
||||
if(children[j].value != null && children[j].value.scenario !== null){
|
||||
if (children[j].value != null && children[j].value.scenario !== null) {
|
||||
let scenarioArr = JSON.parse(children[j].value.scenario);
|
||||
if(scenarioArr.length>1){
|
||||
if (scenarioArr.length > 1) {
|
||||
let childArr = scenarioArr[0].split("_");
|
||||
childId = childArr[0];
|
||||
}
|
||||
}
|
||||
if(scenarioId === ""){
|
||||
if (scenarioId === "") {
|
||||
idIsPath = true;
|
||||
}else if(scenarioId === childId){
|
||||
} else if (scenarioId === childId) {
|
||||
idIsPath = true;
|
||||
}
|
||||
}
|
||||
if(idIsPath){
|
||||
if (idIsPath) {
|
||||
if (i !== nodeArray.length - 1 && !children[j].children) {
|
||||
children[j].children = [];
|
||||
}
|
||||
|
@ -346,49 +346,49 @@
|
|||
return getCurrentProjectID();
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.report-container .el-tabs__header {
|
||||
.report-container .el-tabs__header {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.report-container {
|
||||
.report-container {
|
||||
height: calc(100vh - 155px);
|
||||
min-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.report-header {
|
||||
.report-header {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.report-header a {
|
||||
.report-header a {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.report-header .time {
|
||||
.report-header .time {
|
||||
color: #909399;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.report-container .fail {
|
||||
.report-container .fail {
|
||||
color: #F56C6C;
|
||||
}
|
||||
}
|
||||
|
||||
.report-container .is-active .fail {
|
||||
.report-container .is-active .fail {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.export-button {
|
||||
.export-button {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.scenario-result .icon.is-active {
|
||||
.scenario-result .icon.is-active {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<!--操作按钮-->
|
||||
<div class="ms-opt-btn">
|
||||
<el-link type="primary" style="margin-right: 20px" @click="openHis" v-if="path === '/api/automation/update'">{{$t('operating_log.change_history')}}</el-link>
|
||||
<el-link type="primary" style="margin-right: 20px" @click="openHis" v-if="path === '/api/automation/update'">{{ $t('operating_log.change_history') }}</el-link>
|
||||
|
||||
<el-button id="inputDelay" type="primary" size="small" v-prevent-re-click @click="editScenario"
|
||||
title="ctrl + s">
|
||||
|
@ -118,7 +118,7 @@
|
|||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="3" class="ms-col-one ms-font">
|
||||
{{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}}
|
||||
{{ $t('api_test.automation.step_total') }}:{{ scenarioDefinition.length }}
|
||||
</el-col>
|
||||
<el-col :span="3" class="ms-col-one ms-font">
|
||||
<el-link class="head" @click="showScenarioParameters">{{ $t('api_test.automation.scenario_total') }}
|
||||
|
@ -148,10 +148,10 @@
|
|||
<!-- 场景步骤内容 -->
|
||||
<div>
|
||||
<el-button class="el-icon-files ms-open-btn ms-open-btn-left" size="mini" v-prevent-re-click @click="openExpansion">
|
||||
{{$t('api_test.automation.open_expansion')}}
|
||||
{{ $t('api_test.automation.open_expansion') }}
|
||||
</el-button>
|
||||
<el-button class=" el-icon-notebook-1 ms-open-btn" size="mini" @click="closeExpansion">
|
||||
{{$t('api_test.automation.close_expansion')}}
|
||||
{{ $t('api_test.automation.close_expansion') }}
|
||||
</el-button>
|
||||
<el-tree node-key="resourceId" :props="props" :data="scenarioDefinition" class="ms-tree"
|
||||
:default-expanded-keys="expandedNode"
|
||||
|
@ -239,9 +239,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {API_STATUS, PRIORITY} from "../../definition/model/JsonData";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {
|
||||
import {API_STATUS, PRIORITY} from "../../definition/model/JsonData";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {
|
||||
Assertions,
|
||||
ConstantTimer,
|
||||
Extract,
|
||||
|
@ -249,32 +249,32 @@
|
|||
JSR223Processor,
|
||||
LoopController,
|
||||
TransactionController
|
||||
} from "../../definition/model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "./Setting";
|
||||
import MsApiCustomize from "./ApiCustomize";
|
||||
import {getUUID, objToStrMap, strMapToObj, handleCtrlSEvent, getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "@/business/components/api/test/components/ApiEnvironmentConfig";
|
||||
import MsInputTag from "./MsInputTag";
|
||||
import MsRun from "./DebugRun";
|
||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||
import MsVariableList from "./variable/VariableList";
|
||||
import ApiImport from "../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "./api/ApiRelevance";
|
||||
import ScenarioRelevance from "./api/ScenarioRelevance";
|
||||
import MsComponentConfig from "./component/ComponentConfig";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import MaximizeScenario from "./maximize/MaximizeScenario";
|
||||
import ScenarioHeader from "./maximize/ScenarioHeader";
|
||||
import MsDrawer from "../../../common/components/MsDrawer";
|
||||
import MsSelectTree from "../../../common/select-tree/SelectTree";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
import MsChangeHistory from "../../../history/ChangeHistory";
|
||||
} from "../../definition/model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "./Setting";
|
||||
import MsApiCustomize from "./ApiCustomize";
|
||||
import {getUUID, objToStrMap, strMapToObj, handleCtrlSEvent, getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "@/business/components/api/test/components/ApiEnvironmentConfig";
|
||||
import MsInputTag from "./MsInputTag";
|
||||
import MsRun from "./DebugRun";
|
||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||
import MsVariableList from "./variable/VariableList";
|
||||
import ApiImport from "../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "./api/ApiRelevance";
|
||||
import ScenarioRelevance from "./api/ScenarioRelevance";
|
||||
import MsComponentConfig from "./component/ComponentConfig";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import MaximizeScenario from "./maximize/MaximizeScenario";
|
||||
import ScenarioHeader from "./maximize/ScenarioHeader";
|
||||
import MsDrawer from "../../../common/components/MsDrawer";
|
||||
import MsSelectTree from "../../../common/select-tree/SelectTree";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
import MsChangeHistory from "../../../history/ChangeHistory";
|
||||
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
name: "EditApiScenario",
|
||||
props: {
|
||||
moduleOptions: Array,
|
||||
|
@ -667,12 +667,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (arr[i].hashTree != undefined && arr[i].hashTree.length > 0) {
|
||||
if (arr[i].hashTree !== undefined && arr[i].hashTree.length > 0) {
|
||||
this.recursiveSorting(arr[i].hashTree, arr[i].projectId);
|
||||
}
|
||||
// 添加debug结果
|
||||
if (this.debugResult && this.debugResult.get(arr[i].id)) {
|
||||
arr[i].requestResult = this.debugResult.get(arr[i].id);
|
||||
if (this.debugResult && this.debugResult.get(arr[i].id + arr[i].name)) {
|
||||
arr[i].requestResult = this.debugResult.get(arr[i].id + arr[i].name);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -698,19 +698,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (this.scenarioDefinition[i].hashTree != undefined && this.scenarioDefinition[i].hashTree.length > 0) {
|
||||
if (this.scenarioDefinition[i].hashTree !== undefined && this.scenarioDefinition[i].hashTree.length > 0) {
|
||||
this.recursiveSorting(this.scenarioDefinition[i].hashTree, this.scenarioDefinition[i].projectId);
|
||||
}
|
||||
// 添加debug结果
|
||||
if (this.debugResult && this.debugResult.get(this.scenarioDefinition[i].id)) {
|
||||
this.scenarioDefinition[i].requestResult = this.debugResult.get(this.scenarioDefinition[i].id);
|
||||
if (this.debugResult && this.debugResult.get(this.scenarioDefinition[i].id + this.scenarioDefinition[i].name)) {
|
||||
this.scenarioDefinition[i].requestResult = this.debugResult.get(this.scenarioDefinition[i].id + this.scenarioDefinition[i].name);
|
||||
}
|
||||
}
|
||||
},
|
||||
addCustomizeApi(request) {
|
||||
this.customizeVisible = false;
|
||||
request.enable === undefined ? request.enable = true : request.enable;
|
||||
if (this.selectedTreeNode != undefined) {
|
||||
if (this.selectedTreeNode !== undefined) {
|
||||
this.selectedTreeNode.hashTree.push(request);
|
||||
} else {
|
||||
this.scenarioDefinition.push(request);
|
||||
|
@ -730,7 +730,7 @@
|
|||
item.hashTree = [];
|
||||
}
|
||||
item.enable === undefined ? item.enable = true : item.enable;
|
||||
if (this.selectedTreeNode != undefined) {
|
||||
if (this.selectedTreeNode !== undefined) {
|
||||
this.selectedTreeNode.hashTree.push(item);
|
||||
} else {
|
||||
this.scenarioDefinition.push(item);
|
||||
|
@ -768,7 +768,7 @@
|
|||
if (referenced === 'REF' || !request.hashTree) {
|
||||
request.hashTree = [];
|
||||
}
|
||||
if (this.selectedTreeNode != undefined) {
|
||||
if (this.selectedTreeNode !== undefined) {
|
||||
this.selectedTreeNode.hashTree.push(request);
|
||||
} else {
|
||||
this.scenarioDefinition.push(request);
|
||||
|
@ -783,7 +783,7 @@
|
|||
this.reload();
|
||||
},
|
||||
getMaintainerOptions() {
|
||||
this.$post('/user/project/member/tester/list', {projectId: getCurrentProjectID()},response => {
|
||||
this.$post('/user/project/member/tester/list', {projectId: getCurrentProjectID()}, response => {
|
||||
this.maintainerOptions = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -802,7 +802,7 @@
|
|||
if (action === 'confirm') {
|
||||
const parent = node.parent
|
||||
const hashTree = parent.data.hashTree || parent.data;
|
||||
const index = hashTree.findIndex(d => d.resourceId != undefined && row.resourceId != undefined && d.resourceId === row.resourceId)
|
||||
const index = hashTree.findIndex(d => d.resourceId !== undefined && row.resourceId !== undefined && d.resourceId === row.resourceId)
|
||||
hashTree.splice(index, 1);
|
||||
this.sort();
|
||||
this.reload();
|
||||
|
@ -820,7 +820,7 @@
|
|||
obj.name = obj.name + '_copy';
|
||||
}
|
||||
const index = hashTree.findIndex(d => d.resourceId === row.resourceId);
|
||||
if (index != -1) {
|
||||
if (index !== -1) {
|
||||
hashTree.splice(index + 1, 0, obj);
|
||||
} else {
|
||||
hashTree.push(obj);
|
||||
|
@ -912,8 +912,7 @@
|
|||
allowDrop(draggingNode, dropNode, dropType) {
|
||||
if (dropType != "inner") {
|
||||
return true;
|
||||
}
|
||||
else if (dropType === "inner" && dropNode.data.referenced != 'REF' && dropNode.data.referenced != 'Deleted'
|
||||
} else if (dropType === "inner" && dropNode.data.referenced !== 'REF' && dropNode.data.referenced !== 'Deleted'
|
||||
&& ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) {
|
||||
return true;
|
||||
}
|
||||
|
@ -1167,155 +1166,155 @@
|
|||
this.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.card-content {
|
||||
.card-content {
|
||||
height: calc(100vh - 196px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-scenario-input {
|
||||
.ms-scenario-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-main-div {
|
||||
.ms-main-div {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-debug-div {
|
||||
.ms-debug-div {
|
||||
border: 1px #DCDFE6 solid;
|
||||
border-radius: 4px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-scenario-button {
|
||||
.ms-scenario-button {
|
||||
margin-left: 20px;
|
||||
padding: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
.tip {
|
||||
padding: 3px 5px;
|
||||
font-size: 16px;
|
||||
border-radius: 4px;
|
||||
border-left: 4px solid #783887;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-api-col {
|
||||
.ms-api-col {
|
||||
background-color: #7C3985;
|
||||
border-color: #7C3985;
|
||||
margin-right: 10px;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-font {
|
||||
.ms-font {
|
||||
color: #303133;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-col-one {
|
||||
.ms-col-one {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
#fab {
|
||||
#fab {
|
||||
right: 90px;
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-tree-node__content {
|
||||
/deep/ .el-tree-node__content {
|
||||
height: 100%;
|
||||
margin-top: 3px;
|
||||
vertical-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-card__body {
|
||||
/deep/ .el-card__body {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-drawer__body {
|
||||
/deep/ .el-drawer__body {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-step__icon.is-text {
|
||||
/deep/ .el-step__icon.is-text {
|
||||
border: 1px solid;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-drawer__header {
|
||||
/deep/ .el-drawer__header {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-link {
|
||||
/deep/ .el-link {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-checkbox {
|
||||
/deep/ .el-checkbox {
|
||||
color: #303133;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-checkbox__label {
|
||||
/deep/ .el-checkbox__label {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.head {
|
||||
.head {
|
||||
border-bottom: 1px solid #303133;
|
||||
color: #303133;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-opt-btn {
|
||||
.ms-opt-btn {
|
||||
position: fixed;
|
||||
right: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded {
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-icon-caret-right:before {
|
||||
.ms-tree >>> .el-icon-caret-right:before {
|
||||
content: '\e723';
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon.is-leaf {
|
||||
.ms-tree >>> .el-tree-node__expand-icon.is-leaf {
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon {
|
||||
.ms-tree >>> .el-tree-node__expand-icon {
|
||||
color: #7C3985;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
|
||||
color: #7C3985;
|
||||
content: "\e722";
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-sc-variable-header >>> .el-dialog__body {
|
||||
.ms-sc-variable-header >>> .el-dialog__body {
|
||||
padding: 0px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.alt-ico {
|
||||
.alt-ico {
|
||||
font-size: 15px;
|
||||
margin: 5px 10px 0px;
|
||||
float: right;
|
||||
color: #8c939d;
|
||||
}
|
||||
}
|
||||
|
||||
.alt-ico:hover {
|
||||
.alt-ico:hover {
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.scenario-name {
|
||||
.scenario-name {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
overflow-x: hidden;
|
||||
|
@ -1324,16 +1323,16 @@
|
|||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-open-btn {
|
||||
.ms-open-btn {
|
||||
margin: 5px 5px 0px;
|
||||
font-size: 10px;
|
||||
background-color: #F2F9EE;
|
||||
color: #67C23A;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-open-btn-left {
|
||||
.ms-open-btn-left {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -336,10 +336,10 @@ export default {
|
|||
if (this.node) {
|
||||
this.node.expanded = this.request.active;
|
||||
}
|
||||
if (this.node.expanded && this.expandedNode.indexOf(this.request.resourceId) === -1) {
|
||||
if (this.node.expanded && this.expandedNode && this.expandedNode.indexOf(this.request.resourceId) === -1) {
|
||||
this.expandedNode.push(this.request.resourceId);
|
||||
} else {
|
||||
if (this.expandedNode.indexOf(this.request.resourceId) !== -1) {
|
||||
if (this.expandedNode && this.expandedNode.indexOf(this.request.resourceId) !== -1) {
|
||||
this.expandedNode.splice(this.expandedNode.indexOf(this.request.resourceId), 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<!-- 场景步骤内容 -->
|
||||
<div v-loading="loading">
|
||||
<el-button class="el-icon-files ms-open-btn ms-open-btn-left" size="mini" @click="openExpansion">
|
||||
{{$t('api_test.automation.open_expansion')}}
|
||||
{{ $t('api_test.automation.open_expansion') }}
|
||||
</el-button>
|
||||
<el-button class="el-icon-notebook-1 ms-open-btn" size="mini" @click="closeExpansion">
|
||||
{{$t('api_test.automation.close_expansion')}}
|
||||
{{ $t('api_test.automation.close_expansion') }}
|
||||
</el-button>
|
||||
<el-tree node-key="resourceId"
|
||||
:props="props"
|
||||
|
@ -130,40 +130,40 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {API_STATUS, PRIORITY} from "../../../definition/model/JsonData";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {
|
||||
import {API_STATUS, PRIORITY} from "../../../definition/model/JsonData";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {
|
||||
Assertions,
|
||||
ConstantTimer,
|
||||
Extract,
|
||||
IfController,
|
||||
JSR223Processor,
|
||||
LoopController
|
||||
} from "../../../definition/model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "../Setting";
|
||||
import MsApiCustomize from "../ApiCustomize";
|
||||
import {getCurrentProjectID, getUUID, strMapToObj} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "@/business/components/api/test/components/ApiEnvironmentConfig";
|
||||
import MsInputTag from "../MsInputTag";
|
||||
import MsRun from "../DebugRun";
|
||||
import MsApiReportDetail from "../../report/ApiReportDetail";
|
||||
import MsVariableList from "../variable/VariableList";
|
||||
import ApiImport from "../../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "../api/ApiRelevance";
|
||||
import ScenarioRelevance from "../api/ScenarioRelevance";
|
||||
import MsComponentConfig from "../component/ComponentConfig";
|
||||
import {handleCtrlSEvent} from "../../../../../../common/js/utils";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import MsContainer from "../../../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../../../common/components/MsMainContainer";
|
||||
import MsAsideContainer from "./MsLeftContainer";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
} from "../../../definition/model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "../Setting";
|
||||
import MsApiCustomize from "../ApiCustomize";
|
||||
import {getCurrentProjectID, getUUID, strMapToObj} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "@/business/components/api/test/components/ApiEnvironmentConfig";
|
||||
import MsInputTag from "../MsInputTag";
|
||||
import MsRun from "../DebugRun";
|
||||
import MsApiReportDetail from "../../report/ApiReportDetail";
|
||||
import MsVariableList from "../variable/VariableList";
|
||||
import ApiImport from "../../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "../api/ApiRelevance";
|
||||
import ScenarioRelevance from "../api/ScenarioRelevance";
|
||||
import MsComponentConfig from "../component/ComponentConfig";
|
||||
import {handleCtrlSEvent} from "../../../../../../common/js/utils";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import MsContainer from "../../../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../../../common/components/MsMainContainer";
|
||||
import MsAsideContainer from "./MsLeftContainer";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
name: "MaximizeScenario",
|
||||
props: {
|
||||
moduleOptions: Array,
|
||||
|
@ -516,8 +516,8 @@
|
|||
this.recursiveSorting(arr[i].hashTree, arr[i].projectId);
|
||||
}
|
||||
// 添加debug结果
|
||||
if (this.debugResult && this.debugResult.get(arr[i].id)) {
|
||||
arr[i].requestResult = this.debugResult.get(arr[i].id);
|
||||
if (this.debugResult && this.debugResult.get(arr[i].id + arr[i].name)) {
|
||||
arr[i].requestResult = this.debugResult.get(arr[i].id + arr[i].name);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -539,8 +539,8 @@
|
|||
this.recursiveSorting(this.scenarioDefinition[i].hashTree, this.scenarioDefinition[i].projectId);
|
||||
}
|
||||
// 添加debug结果
|
||||
if (this.debugResult && this.debugResult.get(this.scenarioDefinition[i].id)) {
|
||||
this.scenarioDefinition[i].requestResult = this.debugResult.get(this.scenarioDefinition[i].id);
|
||||
if (this.debugResult && this.debugResult.get(this.scenarioDefinition[i].id + this.scenarioDefinition[i].name)) {
|
||||
this.scenarioDefinition[i].requestResult = this.debugResult.get(this.scenarioDefinition[i].id + this.scenarioDefinition[i].name);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -740,8 +740,7 @@
|
|||
allowDrop(draggingNode, dropNode, dropType) {
|
||||
if (dropType != "inner") {
|
||||
return true;
|
||||
}
|
||||
else if (dropType === "inner" && dropNode.data.referenced != 'REF' && dropNode.data.referenced != 'Deleted'
|
||||
} else if (dropType === "inner" && dropNode.data.referenced !== 'REF' && dropNode.data.referenced !== 'Deleted'
|
||||
&& ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) {
|
||||
return true;
|
||||
}
|
||||
|
@ -960,184 +959,184 @@
|
|||
this.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.card-content {
|
||||
.card-content {
|
||||
height: calc(100vh - 196px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-scenario-input {
|
||||
.ms-scenario-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-main-div {
|
||||
.ms-main-div {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-debug-div {
|
||||
.ms-debug-div {
|
||||
border: 1px #DCDFE6 solid;
|
||||
border-radius: 4px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-scenario-button {
|
||||
.ms-scenario-button {
|
||||
margin-left: 20px;
|
||||
padding: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
.tip {
|
||||
padding: 3px 5px;
|
||||
font-size: 16px;
|
||||
border-radius: 4px;
|
||||
border-left: 4px solid #783887;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-api-col {
|
||||
.ms-api-col {
|
||||
background-color: #7C3985;
|
||||
border-color: #7C3985;
|
||||
margin-right: 10px;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-font {
|
||||
.ms-font {
|
||||
color: #303133;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-col-one {
|
||||
.ms-col-one {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#fab {
|
||||
#fab {
|
||||
left: 100px;
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-tree-node__content {
|
||||
/deep/ .el-tree-node__content {
|
||||
height: 100%;
|
||||
margin-top: 8px;
|
||||
vertical-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-card__body {
|
||||
/deep/ .el-card__body {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-drawer__body {
|
||||
/deep/ .el-drawer__body {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-step__icon.is-text {
|
||||
/deep/ .el-step__icon.is-text {
|
||||
border: 1px solid;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-drawer__header {
|
||||
/deep/ .el-drawer__header {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-link {
|
||||
/deep/ .el-link {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-checkbox {
|
||||
/deep/ .el-checkbox {
|
||||
color: #303133;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-checkbox__label {
|
||||
/deep/ .el-checkbox__label {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.head {
|
||||
.head {
|
||||
border-bottom: 1px solid #303133;
|
||||
color: #303133;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-opt-btn {
|
||||
.ms-opt-btn {
|
||||
position: fixed;
|
||||
right: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded {
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-icon-caret-right:before {
|
||||
.ms-tree >>> .el-icon-caret-right:before {
|
||||
content: '\e723';
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon.is-leaf {
|
||||
.ms-tree >>> .el-tree-node__expand-icon.is-leaf {
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon {
|
||||
.ms-tree >>> .el-tree-node__expand-icon {
|
||||
color: #7C3985;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
|
||||
.ms-tree >>> .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
|
||||
color: #7C3985;
|
||||
content: "\e722";
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-sc-variable-header >>> .el-dialog__body {
|
||||
.ms-sc-variable-header >>> .el-dialog__body {
|
||||
padding: 0px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
.custom-tree-node {
|
||||
width: 1000px;
|
||||
}
|
||||
}
|
||||
|
||||
.father .child {
|
||||
.father .child {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.scenario-aside {
|
||||
.scenario-aside {
|
||||
min-width: 400px;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #EBEEF5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.scenario-main {
|
||||
.scenario-main {
|
||||
position: relative;
|
||||
margin-left: 20px;
|
||||
border: 1px solid #EBEEF5;
|
||||
}
|
||||
}
|
||||
|
||||
.scenario-list {
|
||||
.scenario-list {
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.father:hover .child {
|
||||
.father:hover .child {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-open-btn {
|
||||
.ms-open-btn {
|
||||
margin: 5px 5px 0px;
|
||||
font-size: 10px;
|
||||
background-color: #F2F9EE;
|
||||
color: #67C23A;
|
||||
}
|
||||
}
|
||||
|
||||
.ms-open-btn-left {
|
||||
.ms-open-btn-left {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue