feat(接口测试): 场景CSV变量增加 是否允许引号选项 #1005136
--bug=1005136 --user=赵勇 【github#4657】接口自... https://www.tapd.cn/55049933/s/1025495
This commit is contained in:
parent
a89b86ac6b
commit
307e063a49
|
@ -207,6 +207,7 @@ public abstract class MsTestElement {
|
|||
csvDataSet.setProperty("shareMode", shareMode);
|
||||
csvDataSet.setProperty("recycle", true);
|
||||
csvDataSet.setProperty("delimiter", item.getDelimiter());
|
||||
csvDataSet.setProperty("quotedData", item.isQuotedData());
|
||||
csvDataSet.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
|
||||
tree.add(csvDataSet);
|
||||
});
|
||||
|
|
|
@ -27,6 +27,7 @@ public class ScenarioVariable {
|
|||
*/
|
||||
private List<BodyFile> files;
|
||||
private String delimiter;
|
||||
private boolean quotedData;
|
||||
private String encoding;
|
||||
/**
|
||||
* counter
|
||||
|
|
|
@ -15,18 +15,18 @@
|
|||
<el-tabs v-model="activeName" @tab-click="handleClick" style="margin-left: 40px">
|
||||
<el-tab-pane :label="$t('variables.config')" name="config">
|
||||
<el-row>
|
||||
<el-col :span="4" style="margin-top: 5px">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.add_file')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-col :span="19">
|
||||
<ms-csv-file-upload :parameter="editData"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4" style="margin-top: 5px">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>Encoding</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-col :span="19">
|
||||
<el-autocomplete
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
|
@ -37,14 +37,24 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="4" style="margin-top: 5px">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.delimiter')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-col :span="19">
|
||||
<el-input v-model="editData.delimiter" size="small"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 10px">
|
||||
<el-col :span="5" style="margin-top: 5px">
|
||||
<span>{{$t('variables.quoted_data')}}</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-select v-model="editData.quotedData" size="small">
|
||||
<el-option label="True" :value="true"/>
|
||||
<el-option label="False" :value="false"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('schema.preview')" name="preview">
|
||||
<el-table
|
||||
|
|
|
@ -215,7 +215,7 @@ export default {
|
|||
}
|
||||
},
|
||||
handleClick(command) {
|
||||
this.editData = {delimiter: ","};
|
||||
this.editData = {delimiter: ",",quotedData: 'false'};
|
||||
this.editData.type = command;
|
||||
this.addParameters(this.editData);
|
||||
},
|
||||
|
@ -235,6 +235,7 @@ export default {
|
|||
v.id = getUUID();
|
||||
if (v.type === 'CSV') {
|
||||
v.delimiter = ",";
|
||||
v.quotedData = false;
|
||||
}
|
||||
this.variables.push(v);
|
||||
let index = 1;
|
||||
|
|
|
@ -1902,6 +1902,7 @@ export default {
|
|||
add_file: "Add file",
|
||||
delimiter: "Delimiter",
|
||||
format: "Output format",
|
||||
quoted_data: "Whether to allow quotes",
|
||||
},
|
||||
auth_source: {
|
||||
delete_prompt: 'This operation will delete the authentication source, do you want to continue? ',
|
||||
|
|
|
@ -1909,6 +1909,7 @@ export default {
|
|||
add_file: "添加文件",
|
||||
delimiter: "分隔符",
|
||||
format: "输出格式",
|
||||
quoted_data: "是否允许带引号",
|
||||
},
|
||||
auth_source: {
|
||||
delete_prompt: '此操作会删除认证源,是否继续?',
|
||||
|
|
|
@ -1909,6 +1909,7 @@ export default {
|
|||
add_file: "添加文件",
|
||||
delimiter: "分隔符",
|
||||
format: "輸出格式",
|
||||
quoted_data: "是否允许带引号",
|
||||
},
|
||||
auth_source: {
|
||||
delete_prompt: '此操作會刪除認證源,是否繼續?',
|
||||
|
|
Loading…
Reference in New Issue