fix(接口测试): 修复场景执行单步骤时提示csv不存在的缺陷

--bug=1025964 --user=王孝刚 【接口测试】新建场景-添加csv场景变量-单步骤调试失败引用csv文件失败
https://www.tapd.cn/55049933/s/1368703
This commit is contained in:
wxg0103 2023-05-05 14:05:22 +08:00 committed by fit2-zhao
parent d8bc95e2e9
commit 306c46d22d
4 changed files with 7 additions and 13 deletions

View File

@ -172,14 +172,6 @@
</div>
</template>
</api-base-component>
<ms-run
:debug="true"
:reportId="reportId"
:run-data="runData"
:env-map="environmentMap"
@runRefresh="runRefresh"
@errorRefresh="errorRefresh"
ref="runTest" />
</div>
</template>
@ -237,7 +229,6 @@ export default {
MsDubboBasisParameters: () => import('../../../definition/components/request/dubbo/BasisParameters'),
MsApiRequestForm: () => import('../../../definition/components/request/http/ApiHttpRequestForm'),
MsRequestResultTail: () => import('../../../definition/components/response/RequestResultTail'),
MsRun: () => import('../../../definition/components/Run'),
},
data() {
return {
@ -480,7 +471,7 @@ export default {
//
let variables = [];
if (this.currentScenario && this.currentScenario.variables) {
variables = JSON.parse(JSON.stringify(this.currentScenario.variables));
variables = this.currentScenario.variables;
}
let debugData = {
id: this.currentScenario.id,
@ -518,6 +509,9 @@ export default {
this.request.result = undefined;
/*触发执行操作*/
this.reportId = getUUID();
debugData.hashTree = [this.request];
debugData.stepScenario = true;
this.$emit('runScenario', debugData);
}
});
},

View File

@ -193,7 +193,7 @@ export default {
}
this.scenario.run = true;
let runScenario = JSON.parse(JSON.stringify(this.scenario));
let variables = JSON.parse(JSON.stringify(this.currentScenario.variables));
let variables = this.currentScenario.variables;
//
if (runScenario && runScenario.variableEnable && runScenario.variables) {

View File

@ -73,7 +73,7 @@ export default {
open(objStr) {
this.data = {};
try {
let stringedJSON = objStr.replace(/:\s*(?!.*\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2})\s([-+Ee0-9.]+)/g, ': "$1"');
let stringedJSON = objStr.replace(/(?<=[:\[,])\s*(-?\d+(\.\d+)?)(?=\s*([,\]}]))/g, '"$1"');
let param;
let JSONBig = require('json-bigint')({ storeAsString: true });
//

View File

@ -69,7 +69,7 @@ export default {
open(objStr) {
this.data = {};
try {
let stringedJSON = objStr.replace(/:\s*(?!.*\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2})\s([-+Ee0-9.]+)/g, ': "$1"');
let stringedJSON = objStr.replace(/(?<=[:\[,])\s*(-?\d+(\.\d+)?)(?=\s*([,\]}]))/g, '"$1"');
let param;
let JSONBig = require('json-bigint')({"storeAsString": true});
//