refactor(接口测试): 优化创建场景状态是空的缺陷 (#15836)
--bug=1014924 --user=王孝刚 【接口测试】场景-更多操作-创建场景,状态是空的 https://www.tapd.cn/55049933/s/1202822 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
6ab23d2224
commit
787c529490
|
@ -58,7 +58,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import {getCurrentProjectID, getCurrentUser, getUUID} from "@/common/js/utils";
|
||||
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
|
@ -97,6 +96,8 @@
|
|||
if (valid) {
|
||||
let path = "/api/automation/create";
|
||||
this.setParameter();
|
||||
this.scenarioForm.status = 'Underway';
|
||||
this.scenarioForm.level = 'P0';
|
||||
if (saveAs) {
|
||||
this.scenarioForm.request = JSON.stringify(this.scenarioForm.request);
|
||||
this.$emit('saveAsEdit', this.scenarioForm);
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
|
||||
<script>
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import {WORKSPACE_ID} from '../../../../../../common/js/constants';
|
||||
import {REQ_METHOD} from "../../model/JsonData";
|
||||
import {getCurrentProjectID, getCurrentUser} from "../../../../../../common/js/utils";
|
||||
import {createComponent, Request} from "../jmeter/components";
|
||||
|
@ -89,7 +88,11 @@
|
|||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
||||
{max: 100, message: this.$t('test_track.length_less_than') + '100', trigger: 'blur'}
|
||||
],
|
||||
path: [{required: true, message: this.$t('api_test.definition.request.path_info'), trigger: 'blur'}, {validator: validateURL, trigger: 'blur'}],
|
||||
path: [{
|
||||
required: true,
|
||||
message: this.$t('api_test.definition.request.path_info'),
|
||||
trigger: 'blur'
|
||||
}, {validator: validateURL, trigger: 'blur'}],
|
||||
userId: [{required: true, message: this.$t('test_track.case.input_maintainer'), trigger: 'change'}],
|
||||
},
|
||||
value: REQ_METHOD[0].id,
|
||||
|
@ -123,6 +126,7 @@
|
|||
let bodyFiles = [];
|
||||
let path = "/api/definition/create";
|
||||
this.setParameter();
|
||||
this.httpForm.status = 'Underway';
|
||||
// 历史数据兼容处理
|
||||
if (this.httpForm.request) {
|
||||
this.httpForm.request.clazzName = TYPE_TO_C.get(this.httpForm.request.type);
|
||||
|
|
Loading…
Reference in New Issue