feat(接口测试): 去除接口定义路径结尾空格
--bug=1033406 --user=宋昌昌 [接口测试]github#27838接口测试-接口定义,当接口路径最后有空格时,不会自动删除,会拼接到接口上 https://www.tapd.cn/55049933/s/1446804
This commit is contained in:
parent
7b0364f018
commit
8f617203b6
|
@ -57,20 +57,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { updateDefinition } from '@/api/definition';
|
import {updateDefinition} from '@/api/definition';
|
||||||
import { getMaintainer } from '@/api/project';
|
import {getMaintainer} from '@/api/project';
|
||||||
import MsEditCompleteHttpApi from './complete/EditCompleteHTTPApi';
|
import MsEditCompleteHttpApi from './complete/EditCompleteHTTPApi';
|
||||||
import MsEditCompleteTcpApi from './complete/EditCompleteTCPApi';
|
import MsEditCompleteTcpApi from './complete/EditCompleteTCPApi';
|
||||||
import MsEditCompleteDubboApi from './complete/EditCompleteDubboApi';
|
import MsEditCompleteDubboApi from './complete/EditCompleteDubboApi';
|
||||||
import MsEditCompleteSqlApi from './complete/EditCompleteSQLApi';
|
import MsEditCompleteSqlApi from './complete/EditCompleteSQLApi';
|
||||||
|
|
||||||
import { Body } from '../model/ApiTestModel';
|
import {Body} from '../model/ApiTestModel';
|
||||||
import { getUUID } from 'metersphere-frontend/src/utils';
|
import {getUUID} from 'metersphere-frontend/src/utils';
|
||||||
import { handleCtrlSEvent } from '@/api/base-network';
|
import {handleCtrlSEvent} from '@/api/base-network';
|
||||||
import { createComponent, Request } from './jmeter/components';
|
import {createComponent, Request} from './jmeter/components';
|
||||||
import Sampler from './jmeter/components/sampler/sampler';
|
import Sampler from './jmeter/components/sampler/sampler';
|
||||||
import { TYPE_TO_C } from '@/business/automation/scenario/Setting';
|
import {TYPE_TO_C} from '@/business/automation/scenario/Setting';
|
||||||
import { useApiStore } from '@/store';
|
import {useApiStore} from '@/store';
|
||||||
|
|
||||||
const store = useApiStore();
|
const store = useApiStore();
|
||||||
export default {
|
export default {
|
||||||
|
@ -334,6 +334,8 @@ export default {
|
||||||
this.sort(this.request.hashTree);
|
this.sort(this.request.hashTree);
|
||||||
},
|
},
|
||||||
setParameter(data) {
|
setParameter(data) {
|
||||||
|
// 去除Path结尾空格
|
||||||
|
data.path = data.path.trimEnd();
|
||||||
data.name = this.currentApi.name;
|
data.name = this.currentApi.name;
|
||||||
data.moduleId = this.currentApi.moduleId;
|
data.moduleId = this.currentApi.moduleId;
|
||||||
data.modulePath = this.currentApi.modulePath;
|
data.modulePath = this.currentApi.modulePath;
|
||||||
|
@ -431,6 +433,7 @@ export default {
|
||||||
setParameters(data) {
|
setParameters(data) {
|
||||||
data.projectId = this.projectId;
|
data.projectId = this.projectId;
|
||||||
this.request.name = this.currentApi.name;
|
this.request.name = this.currentApi.name;
|
||||||
|
this.request.path = this.currentApi.path.trimEnd();
|
||||||
data.protocol = this.currentProtocol;
|
data.protocol = this.currentProtocol;
|
||||||
data.request = this.request;
|
data.request = this.request;
|
||||||
data.request.name = data.name;
|
data.request.name = data.name;
|
||||||
|
|
Loading…
Reference in New Issue