Merge branch 'v1.6'
This commit is contained in:
commit
6e7560cf6a
|
@ -324,7 +324,10 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
|||
if (responseAssertionResult.isPass()) {
|
||||
requestResult.addPassAssertions();
|
||||
}
|
||||
responseResult.getAssertions().add(responseAssertionResult);
|
||||
//xpath 提取错误会添加断言错误
|
||||
if (!responseAssertionResult.getMessage().contains("The required item type of the first operand of")) {
|
||||
responseResult.getAssertions().add(responseAssertionResult);
|
||||
}
|
||||
}
|
||||
responseResult.setConsole(getConsole());
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
ref="codeEdit"/>
|
||||
</el-col>
|
||||
<el-col :span="4" class="script-index">
|
||||
<ms-dropdown :default-command="jsr223ProcessorData.language" :commands="languages" @command="languageChange"/>
|
||||
<ms-dropdown :default-command="jsr223ProcessorData.scriptLanguage" :commands="languages" @command="languageChange"/>
|
||||
<div class="template-title">{{$t('api_test.request.processor.code_template')}}</div>
|
||||
<div v-for="(template, index) in codeTemplates" :key="index" class="code-template">
|
||||
<el-link :disabled="template.disabled" @click="addTemplate(template)">{{template.title}}</el-link>
|
||||
|
@ -135,7 +135,7 @@
|
|||
this.jsr223ProcessorData.script = "";
|
||||
}
|
||||
this.jsr223ProcessorData.script += template.value;
|
||||
if (this.jsr223ProcessorData.language === 'beanshell') {
|
||||
if (this.jsr223ProcessorData.scriptLanguage === 'beanshell') {
|
||||
this.jsr223ProcessorData.script += ';';
|
||||
}
|
||||
this.reload();
|
||||
|
@ -151,7 +151,7 @@
|
|||
this.$nextTick(() => (this.isCodeEditAlive = true));
|
||||
},
|
||||
languageChange(language) {
|
||||
this.jsr223ProcessorData.language = language;
|
||||
this.jsr223ProcessorData.scriptLanguage = language;
|
||||
},
|
||||
changeActive() {
|
||||
this.jsr223ProcessorData.active = !this.jsr223ProcessorData.active;
|
||||
|
|
|
@ -15,7 +15,7 @@ export default class JSR223PostProcessor extends PostProcessor {
|
|||
constructor(options = DEFAULT_OPTIONS) {
|
||||
super(options);
|
||||
this.type = "JSR223PostProcessor";
|
||||
this.scriptLanguage = "java";
|
||||
this.scriptLanguage = "beanshell";
|
||||
this.parameters = [];
|
||||
this.filename = undefined;
|
||||
this.cacheKey = true;
|
||||
|
|
|
@ -15,7 +15,7 @@ export default class JSR223PreProcessor extends PostProcessor {
|
|||
constructor(options = DEFAULT_OPTIONS) {
|
||||
super(options);
|
||||
this.type = "JSR223PreProcessor";
|
||||
this.scriptLanguage = "java";
|
||||
this.scriptLanguage = "beanshell";
|
||||
this.parameters = [];
|
||||
this.filename = undefined;
|
||||
this.cacheKey = undefined;
|
||||
|
|
|
@ -122,7 +122,7 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
.protocol-select {
|
||||
width: 95px;
|
||||
width: 92px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
ref="codeEdit"/>
|
||||
</el-col>
|
||||
<el-col :span="4" class="script-index">
|
||||
<ms-dropdown :default-command="jsr223ProcessorData.language" :commands="languages" @command="languageChange"/>
|
||||
<ms-dropdown :default-command="jsr223ProcessorData.scriptLanguage" :commands="languages" @command="languageChange"/>
|
||||
<div class="template-title">{{$t('api_test.request.processor.code_template')}}</div>
|
||||
<div v-for="(template, index) in codeTemplates" :key="index" class="code-template">
|
||||
<el-link :disabled="template.disabled" @click="addTemplate(template)">{{template.title}}</el-link>
|
||||
|
@ -140,7 +140,7 @@
|
|||
this.jsr223ProcessorData.script = "";
|
||||
}
|
||||
this.jsr223ProcessorData.script += template.value;
|
||||
if (this.jsr223ProcessorData.language === 'beanshell') {
|
||||
if (this.jsr223ProcessorData.scriptLanguage === 'beanshell') {
|
||||
this.jsr223ProcessorData.script += ';';
|
||||
}
|
||||
this.reload();
|
||||
|
@ -156,7 +156,7 @@
|
|||
this.$nextTick(() => (this.isCodeEditAlive = true));
|
||||
},
|
||||
languageChange(language) {
|
||||
this.jsr223ProcessorData.language = language;
|
||||
this.jsr223ProcessorData.scriptLanguage = language;
|
||||
},
|
||||
changeActive() {
|
||||
this.active = !this.active;
|
||||
|
|
|
@ -842,8 +842,7 @@ export class JSR223Processor extends BaseConfig {
|
|||
this.active = false;
|
||||
this.type = "JSR223Processor";
|
||||
this.script = undefined;
|
||||
this.language = "beanshell";
|
||||
this.scriptLanguage = "java";
|
||||
this.scriptLanguage = "beanshell";
|
||||
this.enable = true;
|
||||
this.hashTree = [];
|
||||
this.set(options);
|
||||
|
|
|
@ -118,7 +118,21 @@ export default {
|
|||
},
|
||||
copyRequest(index) {
|
||||
let request = this.scenario.requests[index];
|
||||
this.scenario.requests.push(new RequestFactory(request));
|
||||
let item = new RequestFactory(request);
|
||||
if (item.body && item.body.kvs) {
|
||||
item.body.kvs.forEach(kv => {
|
||||
let files = [];
|
||||
if (kv.files) {
|
||||
kv.files.forEach(file => {
|
||||
let fileCopy = {};
|
||||
Object.assign(fileCopy, file);
|
||||
files.push(fileCopy);
|
||||
})
|
||||
}
|
||||
kv.files = files;
|
||||
});
|
||||
}
|
||||
this.scenario.requests.push(item);
|
||||
},
|
||||
disableRequest(index) {
|
||||
this.scenario.requests[index].enable = false;
|
||||
|
|
|
@ -62,6 +62,10 @@
|
|||
min-height: 700px;
|
||||
}
|
||||
|
||||
.tree-aside {
|
||||
max-height: 700px;
|
||||
}
|
||||
|
||||
.el-dialog >>> .el-dialog__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<template>
|
||||
<ckeditor v-if="!isReportView" :editor="editor" v-model="preview.content" :config="editorConfig"></ckeditor>
|
||||
<div v-if="isReportView" v-html="preview.content"></div>
|
||||
<div class="rich-text-content" v-if="isReportView" v-html="preview.content"></div>
|
||||
</template>
|
||||
|
||||
</common-component>
|
||||
|
@ -53,4 +53,11 @@
|
|||
|
||||
<style scoped>
|
||||
|
||||
.rich-text-content >>> .table td {
|
||||
border: solid 1px #e6e6e6;
|
||||
min-width: 2em;
|
||||
padding: .4em;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue