Merge branch 'v1.1'
This commit is contained in:
commit
b04904d105
|
@ -217,7 +217,7 @@
|
|||
<dependency>
|
||||
<groupId>io.metersphere</groupId>
|
||||
<artifactId>jmeter-plugins-dubbo</artifactId>
|
||||
<version>2.7.8</version>
|
||||
<version>2.7.9</version>
|
||||
</dependency>
|
||||
|
||||
<!-- LDAP Module -->
|
||||
|
|
|
@ -126,8 +126,15 @@ public class Swagger2Parser extends ApiImportAbstractParser {
|
|||
Model schema = bodyParameter.getSchema();
|
||||
|
||||
if (schema instanceof RefModel) {
|
||||
String simpleRef = "";
|
||||
RefModel refModel = (RefModel) bodyParameter.getSchema();
|
||||
Model model = definitions.get(refModel.getSimpleRef());
|
||||
String originalRef = refModel.getOriginalRef();
|
||||
if (refModel.getOriginalRef().split("/").length > 3) {
|
||||
simpleRef = originalRef.replace("#/definitions/", "");
|
||||
} else {
|
||||
simpleRef = refModel.getSimpleRef();
|
||||
}
|
||||
Model model = definitions.get(simpleRef);
|
||||
JSONObject bodyParameters = getBodyJSONObjectParameters(model.getProperties(), definitions);
|
||||
body.setRaw(bodyParameters.toJSONString());
|
||||
} else if (schema instanceof ArrayModel) {
|
||||
|
|
|
@ -157,13 +157,9 @@
|
|||
saveTest() {
|
||||
this.save(() => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
if (this.create) {
|
||||
this.$router.push({
|
||||
path: '/api/test/edit?id=' + this.test.id
|
||||
})
|
||||
} else {
|
||||
this.$router.push({path: '/api/test/list/all'})
|
||||
}
|
||||
})
|
||||
},
|
||||
runTest() {
|
||||
|
@ -183,7 +179,6 @@
|
|||
})
|
||||
},
|
||||
cancel() {
|
||||
// console.log(this.test.toJMX().xml)
|
||||
this.$router.push('/api/test/list/all');
|
||||
},
|
||||
getOptions(url) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<el-aside :width="width" class="ms-aside-container"
|
||||
:style="{'margin-left': asideHidden ? '0' : '-' + width}">
|
||||
<div v-if="enableAsideHidden" class="hiddenBottom" @click="asideHidden = !asideHidden" :style="{'left': width}">
|
||||
<i v-if="asideHidden" class="el-icon-arrow-left"/>
|
||||
<i v-if="!asideHidden" class="el-icon-arrow-right"/>
|
||||
:style="{'margin-left': !asideHidden ? 0 : '-' + width}">
|
||||
<div v-if="enableAsideHidden" class="hiddenBottom" @click="asideHidden = !asideHidden" :style="{'left': asideHidden ? 0 : width}">
|
||||
<i v-if="!asideHidden" class="el-icon-arrow-left"/>
|
||||
<i v-if="asideHidden" class="el-icon-arrow-right"/>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</el-aside>
|
||||
|
@ -24,7 +24,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
asideHidden: true
|
||||
asideHidden: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,12 +39,9 @@
|
|||
box-sizing: border-box;
|
||||
background-color: #FFF;
|
||||
height: calc(100vh - 80px);
|
||||
position: relative;
|
||||
overflow: inherit;
|
||||
}
|
||||
|
||||
.hiddenBottom {
|
||||
z-index: 199;
|
||||
width: 8px;
|
||||
height: 50px;
|
||||
top: calc((100vh - 80px)/3);
|
||||
|
@ -56,6 +53,7 @@
|
|||
cursor: pointer;
|
||||
opacity: 0.2;
|
||||
font-size: 2px;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.hiddenBottom i {
|
||||
|
|
|
@ -356,6 +356,7 @@
|
|||
this.$nextTick(() => {
|
||||
if (this.testCase.method == 'auto') {
|
||||
if (this.$refs.apiTestDetail && this.testCase.type == 'api') {
|
||||
|
||||
this.$refs.apiTestDetail.init();
|
||||
} else if (this.testCase.type == 'performance') {
|
||||
this.$refs.performanceTestDetail.init();
|
||||
|
@ -422,10 +423,13 @@
|
|||
this.$post('/test/plan/edit/status/' + planId);
|
||||
},
|
||||
stepResultChange() {
|
||||
if (this.testCase.method == 'manual') {
|
||||
this.isFailure = this.testCase.steptResults.filter(s => {
|
||||
return !s.executeResult || s.executeResult === 'Failure' || s.executeResult === 'Blocking';
|
||||
}).length > 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</el-row>
|
||||
</el-header>
|
||||
|
||||
<ms-api-scenario-config :is-read-only="true" :scenarios="test.scenarioDefinition" ref="config"/>
|
||||
<ms-api-scenario-config :project-id="test.projectId" :is-read-only="true" :scenarios="test.scenarioDefinition" ref="config"/>
|
||||
|
||||
</el-container>
|
||||
</el-card>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
let url = "/api/report/get/" + this.reportId;
|
||||
this.$get(url, response => {
|
||||
this.report = response.data || {};
|
||||
if (this.report.status == 'Completed') {
|
||||
if (this.report.status == 'Completed' || this.report.status == 'Success' || this.report.status == 'Error') {
|
||||
this.content = JSON.parse(this.report.content);
|
||||
this.getFails();
|
||||
this.loading = false;
|
||||
|
|
Loading…
Reference in New Issue