feat(UI 自动化): 数据提取断言重构
--story=1007520 --user=张大海 【UI测试】高级设置断言和数据提取优化 (1.20分支同步上) https://www.tapd.cn/55049933/s/1204973
This commit is contained in:
parent
823cc1d5c7
commit
77f7f9567a
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<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
|
||||
v-for="item in operates"
|
||||
:key="item.id"
|
||||
|
@ -10,8 +10,17 @@
|
|||
</el-option>
|
||||
</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
|
||||
size="mini"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="add">
|
||||
{{ $t('api_test.request.assertions.add') }}
|
||||
|
@ -25,10 +34,12 @@
|
|||
|
||||
<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 {
|
||||
name: "addStepContainer",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
props: {
|
||||
showButton: {
|
||||
type: Boolean,
|
||||
|
@ -39,7 +50,10 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
operateModel: ''
|
||||
operateModel: '',
|
||||
//数据提取或者断言的子分类模型
|
||||
operateSubModel: '',
|
||||
subOperates: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -48,10 +62,30 @@ export default {
|
|||
watch: {
|
||||
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: {
|
||||
add() {
|
||||
if (this.subOperates && this.subOperates.length && !this.operateSubModel) {
|
||||
this.$message({
|
||||
message: this.$t('ui.check_subitem'),
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$emit('add');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3295,6 +3295,54 @@ export default {
|
|||
treatment_method: "Treatment method",
|
||||
scenario_steps: "Scenario steps",
|
||||
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: "处理方式",
|
||||
scenario_steps: "场景步骤",
|
||||
basic_information: "基础信息",
|
||||
check_element: "请勾选元素"
|
||||
check_element: "请勾选元素",
|
||||
check_subitem: '请选择子分类',
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3298,6 +3298,7 @@ export default {
|
|||
treatment_method: "處理方式",
|
||||
scenario_steps: "場景步驟",
|
||||
basic_information: "基礎信息",
|
||||
check_element: "請勾選元素"
|
||||
check_element: "請勾選元素",
|
||||
check_subitem: '請選擇子分類',
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue