fix(接口定义): 修复用例多次运行结果未及时更新问题。

This commit is contained in:
fit2-zhao 2021-06-07 16:34:06 +08:00 committed by BugKing
parent fecf24e514
commit 7e7d726832
3 changed files with 74 additions and 66 deletions

View File

@ -32,7 +32,7 @@
}
},
created() {
if (!this.result) {
if (!this.result || !this.result.responseResult) {
this.getExecResult();
if (this.apiItem.isActive) {
// this.isActive = true;
@ -44,7 +44,11 @@
},
watch: {
result() {
if (this.result.responseResult) {
this.response = this.result;
} else {
this.getExecResult();
}
this.isActive = true;
},
apiItem() {

View File

@ -107,7 +107,7 @@
<esb-definition-response v-xpack v-if="showXpackCompnent" :currentProtocol="apiCase.request.protocol" :request="apiCase.request" :is-api-component="false" :show-options-button="false" :show-header="true" :api-item="apiCase"/>
</div>
<div v-else>
<api-response-component :currentProtocol="apiCase.request.protocol" :api-item="apiCase"/>
<api-response-component :currentProtocol="apiCase.request.protocol" :api-item="apiCase" :result="runResult"/>
</div>
<ms-jmx-step :request="apiCase.request" :response="apiCase.responseData"/>
@ -192,6 +192,7 @@
}
},
props: {
runResult:{},
apiCase: {
type: Object,
default() {

View File

@ -33,6 +33,7 @@
:environment="environment"
:is-case-edit="isCaseEdit"
:api="api"
:runResult="runResult"
:api-case="item" :index="index" ref="apiCaseItem"/>
</div>
</el-main>
@ -86,6 +87,7 @@ export default {
batchLoadingIds: [],
singleLoading: false,
singleRunId: "",
runResult: {},
runData: [],
selectdCases: [],
reportId: "",
@ -208,6 +210,7 @@ export default {
//
let obj = {envId: this.environment, show: true};
this.batchEdit(obj);
this.runResult = {testId: getUUID()};
this.$success(this.$t('organization.integration.successful_operation'));
},
errorRefresh() {
@ -434,7 +437,7 @@ export default {
this.$success(this.$t('commons.save_success'));
}
this.selectdCases = [];
this.getApiTest();
//this.getApiTest();
});
},
}