feat(UI 自动化): 数据提取断言重构
--story=1007520 --user=张大海 【UI测试】高级设置断言和数据提取优化 (1.20分支同步上) https://www.tapd.cn/55049933/s/1204973
This commit is contained in:
parent
848c011831
commit
58834a6215
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
<el-select v-model="operateModel" size="mini" class="ms-select-step">
|
<el-select v-model="operateModel" size="small" class="ms-select-step">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in operates"
|
v-for="item in operates"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -10,8 +10,17 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
|
<el-select v-model="operateSubModel" size="small" class="ms-select-step" v-if="subOperates">
|
||||||
|
<el-option
|
||||||
|
v-for="item in subOperates"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add">
|
@click="add">
|
||||||
{{ $t('api_test.request.assertions.add') }}
|
{{ $t('api_test.request.assertions.add') }}
|
||||||
|
@ -25,10 +34,12 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
const requireComponent = require.context('@/business/components/xpack/', true, /\.js$/);
|
||||||
|
const CMD_CONSTANTS = requireComponent.keys().length > 0 ? requireComponent("./ui/definition/command/cmd-constants-utils.js") : {};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "addStepContainer",
|
name: "addStepContainer",
|
||||||
components: {
|
components: {},
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
showButton: {
|
showButton: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -39,7 +50,10 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
operateModel: ''
|
operateModel: '',
|
||||||
|
//数据提取或者断言的子分类模型
|
||||||
|
operateSubModel: '',
|
||||||
|
subOperates: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -48,10 +62,30 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
operateModel() {
|
operateModel() {
|
||||||
this.$emit('update:operate', this.operateModel);
|
this.$emit('update:operate', this.operateModel);
|
||||||
|
this.operateSubModel = null;
|
||||||
|
if (this.operateModel == "cmdExtraction") {
|
||||||
|
this.subOperates = null;
|
||||||
|
} else if (this.operateModel == "cmdValidation") {
|
||||||
|
this.subOperates = null;
|
||||||
|
} else if (this.operateModel == "cmdExtractElement") {
|
||||||
|
this.subOperates = CMD_CONSTANTS.EXTRACT_ELEMENT_OPTIONS
|
||||||
|
} else if (this.operateModel == "cmdExtractWindow") {
|
||||||
|
this.subOperates = CMD_CONSTANTS.EXTRACT_WINDOW_OPTIONS;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
operateSubModel() {
|
||||||
|
this.$emit('update:operate', this.operateSubModel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add() {
|
add() {
|
||||||
|
if (this.subOperates && this.subOperates.length && !this.operateSubModel) {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('ui.check_subitem'),
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('add');
|
this.$emit('add');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3295,6 +3295,54 @@ export default {
|
||||||
treatment_method: "Treatment method",
|
treatment_method: "Treatment method",
|
||||||
scenario_steps: "Scenario steps",
|
scenario_steps: "Scenario steps",
|
||||||
basic_information: "Basic information",
|
basic_information: "Basic information",
|
||||||
check_element: "Please select the elements"
|
check_element: "Please select the elements",
|
||||||
|
selenium_tip: "Support Selenium-IDE format",
|
||||||
|
selenium_export_tip: "Export side format",
|
||||||
|
elementObject: "Element Object",
|
||||||
|
elementLocator: "Element Locator",
|
||||||
|
elementType: "Element Type",
|
||||||
|
not_selected: "(Not Selected)",
|
||||||
|
not_selected_location: "(Not Selected Location)",
|
||||||
|
location: "Location",
|
||||||
|
run: "Run",
|
||||||
|
locate_type: "Locate Type",
|
||||||
|
coord: "Coord",
|
||||||
|
enable_or_not: "Enable/Disable",
|
||||||
|
enable: "Enable",
|
||||||
|
disable: "Disable",
|
||||||
|
resolution: "resolution",
|
||||||
|
ignore_fail: "ignore fail",
|
||||||
|
not_ignore_fail: "not ignore fail",
|
||||||
|
cmdValidation: "Assert",
|
||||||
|
cmdValidateValue: "Assert Value",
|
||||||
|
cmdValidateText: "Assert Text",
|
||||||
|
cmdValidateDropdown: "Assert Dropdown",
|
||||||
|
cmdValidateElement: "Assert Element",
|
||||||
|
cmdValidateTitle: "Assert Title",
|
||||||
|
cmdOpen: "Open",
|
||||||
|
cmdSelectWindow: "Select Window",
|
||||||
|
cmdSetWindowSize: "Set Window Size",
|
||||||
|
cmdSelectFrame: "Select Frame",
|
||||||
|
cmdDialog: "Dialog Operation",
|
||||||
|
cmdDropdownBox: "Dropdown Operation",
|
||||||
|
submit: "submit",
|
||||||
|
cmdSetItem: "Set Item",
|
||||||
|
cmdWaitElement: "Wait Element",
|
||||||
|
cmdInput: "Input",
|
||||||
|
cmdMouseClick: "Mouse Click",
|
||||||
|
cmdMouseMove: "Mouse Move",
|
||||||
|
cmdMouseDrag: "Mouse Drag",
|
||||||
|
cmdTimes: "Times",
|
||||||
|
cmdForEach: "ForEach",
|
||||||
|
cmdWhile: "While",
|
||||||
|
cmdIf: "If",
|
||||||
|
cmdElse: "Else",
|
||||||
|
cmdElseIf: "ElseIf",
|
||||||
|
close: "close",
|
||||||
|
cmdExtraction: "Extraction",
|
||||||
|
cmdExtractWindow: "Extract window",
|
||||||
|
cmdExtractElement: "Extract Element",
|
||||||
|
valiate_fail: "Validate fail",
|
||||||
|
check_subitem: 'check subitem'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -3351,6 +3351,7 @@ export default {
|
||||||
treatment_method: "处理方式",
|
treatment_method: "处理方式",
|
||||||
scenario_steps: "场景步骤",
|
scenario_steps: "场景步骤",
|
||||||
basic_information: "基础信息",
|
basic_information: "基础信息",
|
||||||
check_element: "请勾选元素"
|
check_element: "请勾选元素",
|
||||||
|
check_subitem: '请选择子分类',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -3298,6 +3298,7 @@ export default {
|
||||||
treatment_method: "處理方式",
|
treatment_method: "處理方式",
|
||||||
scenario_steps: "場景步驟",
|
scenario_steps: "場景步驟",
|
||||||
basic_information: "基礎信息",
|
basic_information: "基礎信息",
|
||||||
check_element: "請勾選元素"
|
check_element: "請勾選元素",
|
||||||
|
check_subitem: '請選擇子分類',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue