fix(接口测试): 修复保存为新用例提示错误的缺陷
--bug=1037290 --user=王孝刚 【接口测试】接口定义-调试-保存为新用例-当前项目下有该url接口-保存为新用例提示错误 https://www.tapd.cn/55049933/s/1477562
This commit is contained in:
parent
0bbfa425da
commit
002e44f680
|
@ -472,7 +472,11 @@
|
||||||
<a-select v-model:model-value="saveCaseModalForm.priority" :options="casePriorityOptions"></a-select>
|
<a-select v-model:model-value="saveCaseModalForm.priority" :options="casePriorityOptions"></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="status" :label="t('common.status')">
|
<a-form-item field="status" :label="t('common.status')">
|
||||||
<a-select v-model:model-value="saveCaseModalForm.status" :options="caseStatusOptions"></a-select>
|
<a-select v-model:model-value="saveCaseModalForm.status">
|
||||||
|
<a-option v-for="item in caseStatusOptions" :key="item.value" :value="item.value">
|
||||||
|
{{ t(item.label) }}
|
||||||
|
</a-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="tags" :label="t('common.tag')">
|
<a-form-item field="tags" :label="t('common.tag')">
|
||||||
<MsTagsInput
|
<MsTagsInput
|
||||||
|
@ -493,6 +497,7 @@
|
||||||
import { FormInstance, Message, SelectOptionData } from '@arco-design/web-vue';
|
import { FormInstance, Message, SelectOptionData } from '@arco-design/web-vue';
|
||||||
import { cloneDeep, debounce } from 'lodash-es';
|
import { cloneDeep, debounce } from 'lodash-es';
|
||||||
|
|
||||||
|
import { statusCodeOptions } from '@/components/pure/ms-advance-filter/index';
|
||||||
import { TabItem } from '@/components/pure/ms-editable-tab/types';
|
import { TabItem } from '@/components/pure/ms-editable-tab/types';
|
||||||
import MsFormCreate from '@/components/pure/ms-form-create/formCreate.vue';
|
import MsFormCreate from '@/components/pure/ms-form-create/formCreate.vue';
|
||||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||||
|
@ -1375,17 +1380,19 @@
|
||||||
// 未保存过的接口保存为用例,先保存接口定义,再保存为用例
|
// 未保存过的接口保存为用例,先保存接口定义,再保存为用例
|
||||||
await realSave(definitionParams, true);
|
await realSave(definitionParams, true);
|
||||||
}
|
}
|
||||||
const params: AddApiCaseParams = {
|
if (!requestVModel.value.isNew) {
|
||||||
...definitionParams,
|
const params: AddApiCaseParams = {
|
||||||
...saveCaseModalForm.value,
|
...definitionParams,
|
||||||
projectId: appStore.currentProjectId,
|
...saveCaseModalForm.value,
|
||||||
environmentId: props.currentEnvConfig?.id || '',
|
projectId: appStore.currentProjectId,
|
||||||
apiDefinitionId: requestVModel.value.id,
|
environmentId: props.currentEnvConfig?.id || '',
|
||||||
};
|
apiDefinitionId: requestVModel.value.id,
|
||||||
await addCase(params);
|
};
|
||||||
emit('addDone');
|
await addCase(params);
|
||||||
Message.success(t('common.saveSuccess'));
|
emit('addDone');
|
||||||
saveCaseModalVisible.value = false;
|
Message.success(t('common.saveSuccess'));
|
||||||
|
saveCaseModalVisible.value = false;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
Loading…
Reference in New Issue